diff --git a/.changeset/few-melons-run.md b/.changeset/few-melons-run.md new file mode 100644 index 00000000..5609fffb --- /dev/null +++ b/.changeset/few-melons-run.md @@ -0,0 +1,5 @@ +--- +"@exactly/protocol": patch +--- + +🚀 optimism: deploy staking, upgrade markets and rewards controller diff --git a/.openzeppelin/optimism.json b/.openzeppelin/optimism.json index c6888727..0bfcb6d4 100644 --- a/.openzeppelin/optimism.json +++ b/.openzeppelin/optimism.json @@ -190,6 +190,16 @@ "address": "0x10aDd85387101825B180B9f1b33C1603A34Dea80", "txHash": "0xa3888adaeabe17664d18d96bd37f010d646ffde03a06a2440d26dc23233f4550", "kind": "transparent" + }, + { + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "txHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "kind": "transparent" + }, + { + "address": "0x5C79494Df50D9dc56DE627f46d0b2E217683C641", + "txHash": "0x19a623d8af594827b9111358c5ffb5a3ede098d039e01fec9580d27c7cc17c42", + "kind": "transparent" } ], "impls": { @@ -18121,6 +18131,3987 @@ "types": {}, "namespaces": {} } + }, + "0x59611c1E363e76E85f246Dd26A821b324841930F": { + "address": "0x59611c1E363e76E85f246Dd26A821b324841930F", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/ContextUpgradeable.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "distribution", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_contract(Market)27481,t_struct(Distribution)31475_storage)", + "contract": "RewardsController", + "src": "contracts/RewardsController.sol:23" + }, + { + "label": "rewardEnabled", + "offset": 0, + "slot": "152", + "type": "t_mapping(t_contract(ERC20)47828,t_bool)", + "contract": "RewardsController", + "src": "contracts/RewardsController.sol:25" + }, + { + "label": "rewardList", + "offset": 0, + "slot": "153", + "type": "t_array(t_contract(ERC20)47828)dyn_storage", + "contract": "RewardsController", + "src": "contracts/RewardsController.sol:27" + }, + { + "label": "marketList", + "offset": 0, + "slot": "154", + "type": "t_array(t_contract(Market)27481)dyn_storage", + "contract": "RewardsController", + "src": "contracts/RewardsController.sol:29" + }, + { + "label": "nonces", + "offset": 0, + "slot": "155", + "type": "t_mapping(t_address,t_uint256)", + "contract": "RewardsController", + "src": "contracts/RewardsController.sol:31" + }, + { + "label": "_claimSender", + "offset": 0, + "slot": "156", + "type": "t_address", + "contract": "RewardsController", + "src": "contracts/RewardsController.sol:33" + }, + { + "label": "keepers", + "offset": 0, + "slot": "157", + "type": "t_mapping(t_address,t_address)", + "contract": "RewardsController", + "src": "contracts/RewardsController.sol:35" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_contract(ERC20)47828)dyn_storage": { + "label": "contract ERC20[]", + "numberOfBytes": "32" + }, + "t_array(t_contract(Market)27481)dyn_storage": { + "label": "contract Market[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(ERC20)47828": { + "label": "contract ERC20", + "numberOfBytes": "20" + }, + "t_contract(IPriceFeed)46863": { + "label": "contract IPriceFeed", + "numberOfBytes": "20" + }, + "t_contract(Market)27481": { + "label": "contract Market", + "numberOfBytes": "20" + }, + "t_int128": { + "label": "int128", + "numberOfBytes": "16" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_bool,t_struct(Account)31380_storage))": { + "label": "mapping(address => mapping(bool => struct RewardsController.Account))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bool,t_struct(Account)31380_storage)": { + "label": "mapping(bool => struct RewardsController.Account)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_mapping(t_contract(ERC20)47828,t_bool)": { + "label": "mapping(contract ERC20 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_contract(ERC20)47828,t_struct(RewardData)31459_storage)": { + "label": "mapping(contract ERC20 => struct RewardsController.RewardData)", + "numberOfBytes": "32" + }, + "t_mapping(t_contract(Market)27481,t_struct(Distribution)31475_storage)": { + "label": "mapping(contract Market => struct RewardsController.Distribution)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint128,t_contract(ERC20)47828)": { + "label": "mapping(uint128 => contract ERC20)", + "numberOfBytes": "32" + }, + "t_struct(Account)31380_storage": { + "label": "struct RewardsController.Account", + "members": [ + { + "label": "index", + "type": "t_uint128", + "offset": 0, + "slot": "0" + }, + { + "label": "accrued", + "type": "t_uint128", + "offset": 16, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Distribution)31475_storage": { + "label": "struct RewardsController.Distribution", + "members": [ + { + "label": "rewards", + "type": "t_mapping(t_contract(ERC20)47828,t_struct(RewardData)31459_storage)", + "offset": 0, + "slot": "0" + }, + { + "label": "availableRewards", + "type": "t_mapping(t_uint128,t_contract(ERC20)47828)", + "offset": 0, + "slot": "1" + }, + { + "label": "availableRewardsCount", + "type": "t_uint8", + "offset": 0, + "slot": "2" + }, + { + "label": "baseUnit", + "type": "t_uint256", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(RewardData)31459_storage": { + "label": "struct RewardsController.RewardData", + "members": [ + { + "label": "targetDebt", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "releaseRate", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "totalDistribution", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "undistributedFactor", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "lastUndistributed", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "flipSpeed", + "type": "t_int128", + "offset": 0, + "slot": "5" + }, + { + "label": "compensationFactor", + "type": "t_uint64", + "offset": 16, + "slot": "5" + }, + { + "label": "transitionFactor", + "type": "t_uint64", + "offset": 24, + "slot": "5" + }, + { + "label": "borrowAllocationWeightFactor", + "type": "t_uint64", + "offset": 0, + "slot": "6" + }, + { + "label": "depositAllocationWeightAddend", + "type": "t_uint64", + "offset": 8, + "slot": "6" + }, + { + "label": "depositAllocationWeightFactor", + "type": "t_uint64", + "offset": 16, + "slot": "6" + }, + { + "label": "borrowIndex", + "type": "t_uint128", + "offset": 0, + "slot": "7" + }, + { + "label": "depositIndex", + "type": "t_uint128", + "offset": 16, + "slot": "7" + }, + { + "label": "start", + "type": "t_uint32", + "offset": 0, + "slot": "8" + }, + { + "label": "end", + "type": "t_uint32", + "offset": 4, + "slot": "8" + }, + { + "label": "lastUpdate", + "type": "t_uint32", + "offset": 8, + "slot": "8" + }, + { + "label": "lastConfig", + "type": "t_uint32", + "offset": 12, + "slot": "8" + }, + { + "label": "lastConfigReleased", + "type": "t_uint256", + "offset": 0, + "slot": "9" + }, + { + "label": "priceFeed", + "type": "t_contract(IPriceFeed)46863", + "offset": 0, + "slot": "10" + }, + { + "label": "accounts", + "type": "t_mapping(t_address,t_mapping(t_bool,t_struct(Account)31380_storage))", + "offset": 0, + "slot": "11" + } + ], + "numberOfBytes": "384" + }, + "t_struct(RoleData)23_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "0xaD973EF23CD21dD9b38DC84132Adcb4Ff64F8da5": { + "address": "0xaD973EF23CD21dD9b38DC84132Adcb4Ff64F8da5", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/ContextUpgradeable.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "_paused", + "offset": 0, + "slot": "151", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol:116" + }, + { + "label": "name", + "offset": 0, + "slot": "201", + "type": "t_string_storage", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:21" + }, + { + "label": "symbol", + "offset": 0, + "slot": "202", + "type": "t_string_storage", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:23" + }, + { + "label": "totalSupply", + "offset": 0, + "slot": "203", + "type": "t_uint256", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:31" + }, + { + "label": "balanceOf", + "offset": 0, + "slot": "204", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:33" + }, + { + "label": "allowance", + "offset": 0, + "slot": "205", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:35" + }, + { + "label": "nonces", + "offset": 0, + "slot": "206", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:45" + }, + { + "label": "fixedDepositPositions", + "offset": 0, + "slot": "207", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))", + "contract": "Market", + "src": "contracts/Market.sol:31" + }, + { + "label": "fixedBorrowPositions", + "offset": 0, + "slot": "208", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))", + "contract": "Market", + "src": "contracts/Market.sol:33" + }, + { + "label": "fixedPools", + "offset": 0, + "slot": "209", + "type": "t_mapping(t_uint256,t_struct(Pool)15534_storage)", + "contract": "Market", + "src": "contracts/Market.sol:35" + }, + { + "label": "accounts", + "offset": 0, + "slot": "210", + "type": "t_mapping(t_address,t_struct(Account)11401_storage)", + "contract": "Market", + "src": "contracts/Market.sol:38" + }, + { + "label": "floatingBackupBorrowed", + "offset": 0, + "slot": "211", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:41" + }, + { + "label": "floatingDebt", + "offset": 0, + "slot": "212", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:43" + }, + { + "label": "earningsAccumulator", + "offset": 0, + "slot": "213", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:46" + }, + { + "label": "penaltyRate", + "offset": 0, + "slot": "214", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:48" + }, + { + "label": "backupFeeRate", + "offset": 0, + "slot": "215", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:50" + }, + { + "label": "dampSpeedUp", + "offset": 0, + "slot": "216", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:52" + }, + { + "label": "dampSpeedDown", + "offset": 0, + "slot": "217", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:54" + }, + { + "label": "maxFuturePools", + "offset": 0, + "slot": "218", + "type": "t_uint8", + "contract": "Market", + "src": "contracts/Market.sol:57" + }, + { + "label": "lastAccumulatorAccrual", + "offset": 1, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:59" + }, + { + "label": "lastFloatingDebtUpdate", + "offset": 5, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:61" + }, + { + "label": "lastAverageUpdate", + "offset": 9, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:63" + }, + { + "label": "interestRateModel", + "offset": 0, + "slot": "219", + "type": "t_contract(InterestRateModel)7266", + "contract": "Market", + "src": "contracts/Market.sol:66" + }, + { + "label": "earningsAccumulatorSmoothFactor", + "offset": 0, + "slot": "220", + "type": "t_uint128", + "contract": "Market", + "src": "contracts/Market.sol:69" + }, + { + "label": "reserveFactor", + "offset": 16, + "slot": "220", + "type": "t_uint128", + "contract": "Market", + "src": "contracts/Market.sol:71" + }, + { + "label": "floatingAssets", + "offset": 0, + "slot": "221", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:74" + }, + { + "label": "floatingAssetsAverage", + "offset": 0, + "slot": "222", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:76" + }, + { + "label": "totalFloatingBorrowShares", + "offset": 0, + "slot": "223", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:79" + }, + { + "label": "__gap", + "offset": 0, + "slot": "224", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:83", + "renamedFrom": "floatingUtilization" + }, + { + "label": "treasury", + "offset": 0, + "slot": "225", + "type": "t_address", + "contract": "Market", + "src": "contracts/Market.sol:86" + }, + { + "label": "treasuryFeeRate", + "offset": 0, + "slot": "226", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:88" + }, + { + "label": "rewardsController", + "offset": 0, + "slot": "227", + "type": "t_contract(RewardsController)14682", + "contract": "Market", + "src": "contracts/Market.sol:91" + }, + { + "label": "isFrozen", + "offset": 20, + "slot": "227", + "type": "t_bool", + "contract": "Market", + "src": "contracts/Market.sol:94" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(InterestRateModel)7266": { + "label": "contract InterestRateModel", + "numberOfBytes": "20" + }, + "t_contract(RewardsController)14682": { + "label": "contract RewardsController", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Account)11401_storage)": { + "label": "mapping(address => struct Market.Account)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Position)15540_storage)": { + "label": "mapping(address => struct FixedLib.Position)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))": { + "label": "mapping(uint256 => mapping(address => struct FixedLib.Position))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Pool)15534_storage)": { + "label": "mapping(uint256 => struct FixedLib.Pool)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Account)11401_storage": { + "label": "struct Market.Account", + "members": [ + { + "label": "fixedDeposits", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "fixedBorrows", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "floatingBorrowShares", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Pool)15534_storage": { + "label": "struct FixedLib.Pool", + "members": [ + { + "label": "borrowed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "supplied", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "unassignedEarnings", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "lastAccrual", + "type": "t_uint256", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(Position)15540_storage": { + "label": "struct FixedLib.Position", + "members": [ + { + "label": "principal", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "fee", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoleData)23_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "0xcE46bc1f3edB054dACF2087255670090Cdd60F38": { + "address": "0xcE46bc1f3edB054dACF2087255670090Cdd60F38", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/ContextUpgradeable.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "_paused", + "offset": 0, + "slot": "151", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol:116" + }, + { + "label": "name", + "offset": 0, + "slot": "201", + "type": "t_string_storage", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:21" + }, + { + "label": "symbol", + "offset": 0, + "slot": "202", + "type": "t_string_storage", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:23" + }, + { + "label": "totalSupply", + "offset": 0, + "slot": "203", + "type": "t_uint256", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:31" + }, + { + "label": "balanceOf", + "offset": 0, + "slot": "204", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:33" + }, + { + "label": "allowance", + "offset": 0, + "slot": "205", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:35" + }, + { + "label": "nonces", + "offset": 0, + "slot": "206", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:45" + }, + { + "label": "fixedDepositPositions", + "offset": 0, + "slot": "207", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))", + "contract": "Market", + "src": "contracts/Market.sol:31" + }, + { + "label": "fixedBorrowPositions", + "offset": 0, + "slot": "208", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))", + "contract": "Market", + "src": "contracts/Market.sol:33" + }, + { + "label": "fixedPools", + "offset": 0, + "slot": "209", + "type": "t_mapping(t_uint256,t_struct(Pool)15534_storage)", + "contract": "Market", + "src": "contracts/Market.sol:35" + }, + { + "label": "accounts", + "offset": 0, + "slot": "210", + "type": "t_mapping(t_address,t_struct(Account)11401_storage)", + "contract": "Market", + "src": "contracts/Market.sol:38" + }, + { + "label": "floatingBackupBorrowed", + "offset": 0, + "slot": "211", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:41" + }, + { + "label": "floatingDebt", + "offset": 0, + "slot": "212", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:43" + }, + { + "label": "earningsAccumulator", + "offset": 0, + "slot": "213", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:46" + }, + { + "label": "penaltyRate", + "offset": 0, + "slot": "214", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:48" + }, + { + "label": "backupFeeRate", + "offset": 0, + "slot": "215", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:50" + }, + { + "label": "dampSpeedUp", + "offset": 0, + "slot": "216", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:52" + }, + { + "label": "dampSpeedDown", + "offset": 0, + "slot": "217", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:54" + }, + { + "label": "maxFuturePools", + "offset": 0, + "slot": "218", + "type": "t_uint8", + "contract": "Market", + "src": "contracts/Market.sol:57" + }, + { + "label": "lastAccumulatorAccrual", + "offset": 1, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:59" + }, + { + "label": "lastFloatingDebtUpdate", + "offset": 5, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:61" + }, + { + "label": "lastAverageUpdate", + "offset": 9, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:63" + }, + { + "label": "interestRateModel", + "offset": 0, + "slot": "219", + "type": "t_contract(InterestRateModel)7266", + "contract": "Market", + "src": "contracts/Market.sol:66" + }, + { + "label": "earningsAccumulatorSmoothFactor", + "offset": 0, + "slot": "220", + "type": "t_uint128", + "contract": "Market", + "src": "contracts/Market.sol:69" + }, + { + "label": "reserveFactor", + "offset": 16, + "slot": "220", + "type": "t_uint128", + "contract": "Market", + "src": "contracts/Market.sol:71" + }, + { + "label": "floatingAssets", + "offset": 0, + "slot": "221", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:74" + }, + { + "label": "floatingAssetsAverage", + "offset": 0, + "slot": "222", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:76" + }, + { + "label": "totalFloatingBorrowShares", + "offset": 0, + "slot": "223", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:79" + }, + { + "label": "__gap", + "offset": 0, + "slot": "224", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:83", + "renamedFrom": "floatingUtilization" + }, + { + "label": "treasury", + "offset": 0, + "slot": "225", + "type": "t_address", + "contract": "Market", + "src": "contracts/Market.sol:86" + }, + { + "label": "treasuryFeeRate", + "offset": 0, + "slot": "226", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:88" + }, + { + "label": "rewardsController", + "offset": 0, + "slot": "227", + "type": "t_contract(RewardsController)14682", + "contract": "Market", + "src": "contracts/Market.sol:91" + }, + { + "label": "isFrozen", + "offset": 20, + "slot": "227", + "type": "t_bool", + "contract": "Market", + "src": "contracts/Market.sol:94" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(InterestRateModel)7266": { + "label": "contract InterestRateModel", + "numberOfBytes": "20" + }, + "t_contract(RewardsController)14682": { + "label": "contract RewardsController", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Account)11401_storage)": { + "label": "mapping(address => struct Market.Account)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Position)15540_storage)": { + "label": "mapping(address => struct FixedLib.Position)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))": { + "label": "mapping(uint256 => mapping(address => struct FixedLib.Position))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Pool)15534_storage)": { + "label": "mapping(uint256 => struct FixedLib.Pool)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Account)11401_storage": { + "label": "struct Market.Account", + "members": [ + { + "label": "fixedDeposits", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "fixedBorrows", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "floatingBorrowShares", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Pool)15534_storage": { + "label": "struct FixedLib.Pool", + "members": [ + { + "label": "borrowed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "supplied", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "unassignedEarnings", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "lastAccrual", + "type": "t_uint256", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(Position)15540_storage": { + "label": "struct FixedLib.Position", + "members": [ + { + "label": "principal", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "fee", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoleData)23_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "0xCAA6136c4f85Bca3b309b28E559Fd3a27e0c40B3": { + "address": "0xCAA6136c4f85Bca3b309b28E559Fd3a27e0c40B3", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/ContextUpgradeable.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "_paused", + "offset": 0, + "slot": "151", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol:116" + }, + { + "label": "name", + "offset": 0, + "slot": "201", + "type": "t_string_storage", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:21" + }, + { + "label": "symbol", + "offset": 0, + "slot": "202", + "type": "t_string_storage", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:23" + }, + { + "label": "totalSupply", + "offset": 0, + "slot": "203", + "type": "t_uint256", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:31" + }, + { + "label": "balanceOf", + "offset": 0, + "slot": "204", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:33" + }, + { + "label": "allowance", + "offset": 0, + "slot": "205", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:35" + }, + { + "label": "nonces", + "offset": 0, + "slot": "206", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:45" + }, + { + "label": "fixedDepositPositions", + "offset": 0, + "slot": "207", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))", + "contract": "Market", + "src": "contracts/Market.sol:31" + }, + { + "label": "fixedBorrowPositions", + "offset": 0, + "slot": "208", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))", + "contract": "Market", + "src": "contracts/Market.sol:33" + }, + { + "label": "fixedPools", + "offset": 0, + "slot": "209", + "type": "t_mapping(t_uint256,t_struct(Pool)15534_storage)", + "contract": "Market", + "src": "contracts/Market.sol:35" + }, + { + "label": "accounts", + "offset": 0, + "slot": "210", + "type": "t_mapping(t_address,t_struct(Account)11401_storage)", + "contract": "Market", + "src": "contracts/Market.sol:38" + }, + { + "label": "floatingBackupBorrowed", + "offset": 0, + "slot": "211", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:41" + }, + { + "label": "floatingDebt", + "offset": 0, + "slot": "212", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:43" + }, + { + "label": "earningsAccumulator", + "offset": 0, + "slot": "213", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:46" + }, + { + "label": "penaltyRate", + "offset": 0, + "slot": "214", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:48" + }, + { + "label": "backupFeeRate", + "offset": 0, + "slot": "215", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:50" + }, + { + "label": "dampSpeedUp", + "offset": 0, + "slot": "216", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:52" + }, + { + "label": "dampSpeedDown", + "offset": 0, + "slot": "217", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:54" + }, + { + "label": "maxFuturePools", + "offset": 0, + "slot": "218", + "type": "t_uint8", + "contract": "Market", + "src": "contracts/Market.sol:57" + }, + { + "label": "lastAccumulatorAccrual", + "offset": 1, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:59" + }, + { + "label": "lastFloatingDebtUpdate", + "offset": 5, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:61" + }, + { + "label": "lastAverageUpdate", + "offset": 9, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:63" + }, + { + "label": "interestRateModel", + "offset": 0, + "slot": "219", + "type": "t_contract(InterestRateModel)7266", + "contract": "Market", + "src": "contracts/Market.sol:66" + }, + { + "label": "earningsAccumulatorSmoothFactor", + "offset": 0, + "slot": "220", + "type": "t_uint128", + "contract": "Market", + "src": "contracts/Market.sol:69" + }, + { + "label": "reserveFactor", + "offset": 16, + "slot": "220", + "type": "t_uint128", + "contract": "Market", + "src": "contracts/Market.sol:71" + }, + { + "label": "floatingAssets", + "offset": 0, + "slot": "221", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:74" + }, + { + "label": "floatingAssetsAverage", + "offset": 0, + "slot": "222", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:76" + }, + { + "label": "totalFloatingBorrowShares", + "offset": 0, + "slot": "223", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:79" + }, + { + "label": "__gap", + "offset": 0, + "slot": "224", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:83", + "renamedFrom": "floatingUtilization" + }, + { + "label": "treasury", + "offset": 0, + "slot": "225", + "type": "t_address", + "contract": "Market", + "src": "contracts/Market.sol:86" + }, + { + "label": "treasuryFeeRate", + "offset": 0, + "slot": "226", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:88" + }, + { + "label": "rewardsController", + "offset": 0, + "slot": "227", + "type": "t_contract(RewardsController)14682", + "contract": "Market", + "src": "contracts/Market.sol:91" + }, + { + "label": "isFrozen", + "offset": 20, + "slot": "227", + "type": "t_bool", + "contract": "Market", + "src": "contracts/Market.sol:94" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(InterestRateModel)7266": { + "label": "contract InterestRateModel", + "numberOfBytes": "20" + }, + "t_contract(RewardsController)14682": { + "label": "contract RewardsController", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Account)11401_storage)": { + "label": "mapping(address => struct Market.Account)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Position)15540_storage)": { + "label": "mapping(address => struct FixedLib.Position)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))": { + "label": "mapping(uint256 => mapping(address => struct FixedLib.Position))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Pool)15534_storage)": { + "label": "mapping(uint256 => struct FixedLib.Pool)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Account)11401_storage": { + "label": "struct Market.Account", + "members": [ + { + "label": "fixedDeposits", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "fixedBorrows", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "floatingBorrowShares", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Pool)15534_storage": { + "label": "struct FixedLib.Pool", + "members": [ + { + "label": "borrowed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "supplied", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "unassignedEarnings", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "lastAccrual", + "type": "t_uint256", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(Position)15540_storage": { + "label": "struct FixedLib.Position", + "members": [ + { + "label": "principal", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "fee", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoleData)23_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "0x7D3dff15129716A41eFF2c64d225F69872E84C96": { + "address": "0x7D3dff15129716A41eFF2c64d225F69872E84C96", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/ContextUpgradeable.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "_paused", + "offset": 0, + "slot": "151", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol:116" + }, + { + "label": "name", + "offset": 0, + "slot": "201", + "type": "t_string_storage", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:21" + }, + { + "label": "symbol", + "offset": 0, + "slot": "202", + "type": "t_string_storage", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:23" + }, + { + "label": "totalSupply", + "offset": 0, + "slot": "203", + "type": "t_uint256", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:31" + }, + { + "label": "balanceOf", + "offset": 0, + "slot": "204", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:33" + }, + { + "label": "allowance", + "offset": 0, + "slot": "205", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:35" + }, + { + "label": "nonces", + "offset": 0, + "slot": "206", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:45" + }, + { + "label": "fixedDepositPositions", + "offset": 0, + "slot": "207", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))", + "contract": "Market", + "src": "contracts/Market.sol:31" + }, + { + "label": "fixedBorrowPositions", + "offset": 0, + "slot": "208", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))", + "contract": "Market", + "src": "contracts/Market.sol:33" + }, + { + "label": "fixedPools", + "offset": 0, + "slot": "209", + "type": "t_mapping(t_uint256,t_struct(Pool)15534_storage)", + "contract": "Market", + "src": "contracts/Market.sol:35" + }, + { + "label": "accounts", + "offset": 0, + "slot": "210", + "type": "t_mapping(t_address,t_struct(Account)11401_storage)", + "contract": "Market", + "src": "contracts/Market.sol:38" + }, + { + "label": "floatingBackupBorrowed", + "offset": 0, + "slot": "211", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:41" + }, + { + "label": "floatingDebt", + "offset": 0, + "slot": "212", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:43" + }, + { + "label": "earningsAccumulator", + "offset": 0, + "slot": "213", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:46" + }, + { + "label": "penaltyRate", + "offset": 0, + "slot": "214", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:48" + }, + { + "label": "backupFeeRate", + "offset": 0, + "slot": "215", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:50" + }, + { + "label": "dampSpeedUp", + "offset": 0, + "slot": "216", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:52" + }, + { + "label": "dampSpeedDown", + "offset": 0, + "slot": "217", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:54" + }, + { + "label": "maxFuturePools", + "offset": 0, + "slot": "218", + "type": "t_uint8", + "contract": "Market", + "src": "contracts/Market.sol:57" + }, + { + "label": "lastAccumulatorAccrual", + "offset": 1, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:59" + }, + { + "label": "lastFloatingDebtUpdate", + "offset": 5, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:61" + }, + { + "label": "lastAverageUpdate", + "offset": 9, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:63" + }, + { + "label": "interestRateModel", + "offset": 0, + "slot": "219", + "type": "t_contract(InterestRateModel)7266", + "contract": "Market", + "src": "contracts/Market.sol:66" + }, + { + "label": "earningsAccumulatorSmoothFactor", + "offset": 0, + "slot": "220", + "type": "t_uint128", + "contract": "Market", + "src": "contracts/Market.sol:69" + }, + { + "label": "reserveFactor", + "offset": 16, + "slot": "220", + "type": "t_uint128", + "contract": "Market", + "src": "contracts/Market.sol:71" + }, + { + "label": "floatingAssets", + "offset": 0, + "slot": "221", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:74" + }, + { + "label": "floatingAssetsAverage", + "offset": 0, + "slot": "222", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:76" + }, + { + "label": "totalFloatingBorrowShares", + "offset": 0, + "slot": "223", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:79" + }, + { + "label": "__gap", + "offset": 0, + "slot": "224", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:83", + "renamedFrom": "floatingUtilization" + }, + { + "label": "treasury", + "offset": 0, + "slot": "225", + "type": "t_address", + "contract": "Market", + "src": "contracts/Market.sol:86" + }, + { + "label": "treasuryFeeRate", + "offset": 0, + "slot": "226", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:88" + }, + { + "label": "rewardsController", + "offset": 0, + "slot": "227", + "type": "t_contract(RewardsController)14682", + "contract": "Market", + "src": "contracts/Market.sol:91" + }, + { + "label": "isFrozen", + "offset": 20, + "slot": "227", + "type": "t_bool", + "contract": "Market", + "src": "contracts/Market.sol:94" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(InterestRateModel)7266": { + "label": "contract InterestRateModel", + "numberOfBytes": "20" + }, + "t_contract(RewardsController)14682": { + "label": "contract RewardsController", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Account)11401_storage)": { + "label": "mapping(address => struct Market.Account)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Position)15540_storage)": { + "label": "mapping(address => struct FixedLib.Position)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))": { + "label": "mapping(uint256 => mapping(address => struct FixedLib.Position))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Pool)15534_storage)": { + "label": "mapping(uint256 => struct FixedLib.Pool)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Account)11401_storage": { + "label": "struct Market.Account", + "members": [ + { + "label": "fixedDeposits", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "fixedBorrows", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "floatingBorrowShares", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Pool)15534_storage": { + "label": "struct FixedLib.Pool", + "members": [ + { + "label": "borrowed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "supplied", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "unassignedEarnings", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "lastAccrual", + "type": "t_uint256", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(Position)15540_storage": { + "label": "struct FixedLib.Position", + "members": [ + { + "label": "principal", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "fee", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoleData)23_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "0x3E5A7019e3e59f355e2575556Cf8baf83F3f4c2A": { + "address": "0x3E5A7019e3e59f355e2575556Cf8baf83F3f4c2A", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/ContextUpgradeable.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "_paused", + "offset": 0, + "slot": "151", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol:116" + }, + { + "label": "name", + "offset": 0, + "slot": "201", + "type": "t_string_storage", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:21" + }, + { + "label": "symbol", + "offset": 0, + "slot": "202", + "type": "t_string_storage", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:23" + }, + { + "label": "totalSupply", + "offset": 0, + "slot": "203", + "type": "t_uint256", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:31" + }, + { + "label": "balanceOf", + "offset": 0, + "slot": "204", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:33" + }, + { + "label": "allowance", + "offset": 0, + "slot": "205", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:35" + }, + { + "label": "nonces", + "offset": 0, + "slot": "206", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:45" + }, + { + "label": "fixedDepositPositions", + "offset": 0, + "slot": "207", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))", + "contract": "Market", + "src": "contracts/Market.sol:31" + }, + { + "label": "fixedBorrowPositions", + "offset": 0, + "slot": "208", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))", + "contract": "Market", + "src": "contracts/Market.sol:33" + }, + { + "label": "fixedPools", + "offset": 0, + "slot": "209", + "type": "t_mapping(t_uint256,t_struct(Pool)15534_storage)", + "contract": "Market", + "src": "contracts/Market.sol:35" + }, + { + "label": "accounts", + "offset": 0, + "slot": "210", + "type": "t_mapping(t_address,t_struct(Account)11401_storage)", + "contract": "Market", + "src": "contracts/Market.sol:38" + }, + { + "label": "floatingBackupBorrowed", + "offset": 0, + "slot": "211", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:41" + }, + { + "label": "floatingDebt", + "offset": 0, + "slot": "212", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:43" + }, + { + "label": "earningsAccumulator", + "offset": 0, + "slot": "213", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:46" + }, + { + "label": "penaltyRate", + "offset": 0, + "slot": "214", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:48" + }, + { + "label": "backupFeeRate", + "offset": 0, + "slot": "215", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:50" + }, + { + "label": "dampSpeedUp", + "offset": 0, + "slot": "216", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:52" + }, + { + "label": "dampSpeedDown", + "offset": 0, + "slot": "217", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:54" + }, + { + "label": "maxFuturePools", + "offset": 0, + "slot": "218", + "type": "t_uint8", + "contract": "Market", + "src": "contracts/Market.sol:57" + }, + { + "label": "lastAccumulatorAccrual", + "offset": 1, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:59" + }, + { + "label": "lastFloatingDebtUpdate", + "offset": 5, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:61" + }, + { + "label": "lastAverageUpdate", + "offset": 9, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:63" + }, + { + "label": "interestRateModel", + "offset": 0, + "slot": "219", + "type": "t_contract(InterestRateModel)7266", + "contract": "Market", + "src": "contracts/Market.sol:66" + }, + { + "label": "earningsAccumulatorSmoothFactor", + "offset": 0, + "slot": "220", + "type": "t_uint128", + "contract": "Market", + "src": "contracts/Market.sol:69" + }, + { + "label": "reserveFactor", + "offset": 16, + "slot": "220", + "type": "t_uint128", + "contract": "Market", + "src": "contracts/Market.sol:71" + }, + { + "label": "floatingAssets", + "offset": 0, + "slot": "221", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:74" + }, + { + "label": "floatingAssetsAverage", + "offset": 0, + "slot": "222", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:76" + }, + { + "label": "totalFloatingBorrowShares", + "offset": 0, + "slot": "223", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:79" + }, + { + "label": "__gap", + "offset": 0, + "slot": "224", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:83", + "renamedFrom": "floatingUtilization" + }, + { + "label": "treasury", + "offset": 0, + "slot": "225", + "type": "t_address", + "contract": "Market", + "src": "contracts/Market.sol:86" + }, + { + "label": "treasuryFeeRate", + "offset": 0, + "slot": "226", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:88" + }, + { + "label": "rewardsController", + "offset": 0, + "slot": "227", + "type": "t_contract(RewardsController)14682", + "contract": "Market", + "src": "contracts/Market.sol:91" + }, + { + "label": "isFrozen", + "offset": 20, + "slot": "227", + "type": "t_bool", + "contract": "Market", + "src": "contracts/Market.sol:94" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(InterestRateModel)7266": { + "label": "contract InterestRateModel", + "numberOfBytes": "20" + }, + "t_contract(RewardsController)14682": { + "label": "contract RewardsController", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Account)11401_storage)": { + "label": "mapping(address => struct Market.Account)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Position)15540_storage)": { + "label": "mapping(address => struct FixedLib.Position)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))": { + "label": "mapping(uint256 => mapping(address => struct FixedLib.Position))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Pool)15534_storage)": { + "label": "mapping(uint256 => struct FixedLib.Pool)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Account)11401_storage": { + "label": "struct Market.Account", + "members": [ + { + "label": "fixedDeposits", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "fixedBorrows", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "floatingBorrowShares", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Pool)15534_storage": { + "label": "struct FixedLib.Pool", + "members": [ + { + "label": "borrowed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "supplied", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "unassignedEarnings", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "lastAccrual", + "type": "t_uint256", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(Position)15540_storage": { + "label": "struct FixedLib.Position", + "members": [ + { + "label": "principal", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "fee", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoleData)23_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "0x0BceA5139048557C89d394c3D003F2de382d4D00": { + "address": "0x0BceA5139048557C89d394c3D003F2de382d4D00", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/ContextUpgradeable.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "_paused", + "offset": 0, + "slot": "151", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol:116" + }, + { + "label": "name", + "offset": 0, + "slot": "201", + "type": "t_string_storage", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:21" + }, + { + "label": "symbol", + "offset": 0, + "slot": "202", + "type": "t_string_storage", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:23" + }, + { + "label": "totalSupply", + "offset": 0, + "slot": "203", + "type": "t_uint256", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:31" + }, + { + "label": "balanceOf", + "offset": 0, + "slot": "204", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:33" + }, + { + "label": "allowance", + "offset": 0, + "slot": "205", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:35" + }, + { + "label": "nonces", + "offset": 0, + "slot": "206", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20", + "src": "solmate/src/tokens/ERC20.sol:45" + }, + { + "label": "fixedDepositPositions", + "offset": 0, + "slot": "207", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))", + "contract": "Market", + "src": "contracts/Market.sol:31" + }, + { + "label": "fixedBorrowPositions", + "offset": 0, + "slot": "208", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))", + "contract": "Market", + "src": "contracts/Market.sol:33" + }, + { + "label": "fixedPools", + "offset": 0, + "slot": "209", + "type": "t_mapping(t_uint256,t_struct(Pool)15534_storage)", + "contract": "Market", + "src": "contracts/Market.sol:35" + }, + { + "label": "accounts", + "offset": 0, + "slot": "210", + "type": "t_mapping(t_address,t_struct(Account)11401_storage)", + "contract": "Market", + "src": "contracts/Market.sol:38" + }, + { + "label": "floatingBackupBorrowed", + "offset": 0, + "slot": "211", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:41" + }, + { + "label": "floatingDebt", + "offset": 0, + "slot": "212", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:43" + }, + { + "label": "earningsAccumulator", + "offset": 0, + "slot": "213", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:46" + }, + { + "label": "penaltyRate", + "offset": 0, + "slot": "214", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:48" + }, + { + "label": "backupFeeRate", + "offset": 0, + "slot": "215", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:50" + }, + { + "label": "dampSpeedUp", + "offset": 0, + "slot": "216", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:52" + }, + { + "label": "dampSpeedDown", + "offset": 0, + "slot": "217", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:54" + }, + { + "label": "maxFuturePools", + "offset": 0, + "slot": "218", + "type": "t_uint8", + "contract": "Market", + "src": "contracts/Market.sol:57" + }, + { + "label": "lastAccumulatorAccrual", + "offset": 1, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:59" + }, + { + "label": "lastFloatingDebtUpdate", + "offset": 5, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:61" + }, + { + "label": "lastAverageUpdate", + "offset": 9, + "slot": "218", + "type": "t_uint32", + "contract": "Market", + "src": "contracts/Market.sol:63" + }, + { + "label": "interestRateModel", + "offset": 0, + "slot": "219", + "type": "t_contract(InterestRateModel)7266", + "contract": "Market", + "src": "contracts/Market.sol:66" + }, + { + "label": "earningsAccumulatorSmoothFactor", + "offset": 0, + "slot": "220", + "type": "t_uint128", + "contract": "Market", + "src": "contracts/Market.sol:69" + }, + { + "label": "reserveFactor", + "offset": 16, + "slot": "220", + "type": "t_uint128", + "contract": "Market", + "src": "contracts/Market.sol:71" + }, + { + "label": "floatingAssets", + "offset": 0, + "slot": "221", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:74" + }, + { + "label": "floatingAssetsAverage", + "offset": 0, + "slot": "222", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:76" + }, + { + "label": "totalFloatingBorrowShares", + "offset": 0, + "slot": "223", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:79" + }, + { + "label": "__gap", + "offset": 0, + "slot": "224", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:83", + "renamedFrom": "floatingUtilization" + }, + { + "label": "treasury", + "offset": 0, + "slot": "225", + "type": "t_address", + "contract": "Market", + "src": "contracts/Market.sol:86" + }, + { + "label": "treasuryFeeRate", + "offset": 0, + "slot": "226", + "type": "t_uint256", + "contract": "Market", + "src": "contracts/Market.sol:88" + }, + { + "label": "rewardsController", + "offset": 0, + "slot": "227", + "type": "t_contract(RewardsController)14682", + "contract": "Market", + "src": "contracts/Market.sol:91" + }, + { + "label": "isFrozen", + "offset": 20, + "slot": "227", + "type": "t_bool", + "contract": "Market", + "src": "contracts/Market.sol:94" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(InterestRateModel)7266": { + "label": "contract InterestRateModel", + "numberOfBytes": "20" + }, + "t_contract(RewardsController)14682": { + "label": "contract RewardsController", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Account)11401_storage)": { + "label": "mapping(address => struct Market.Account)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Position)15540_storage)": { + "label": "mapping(address => struct FixedLib.Position)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))": { + "label": "mapping(uint256 => mapping(address => struct FixedLib.Position))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Pool)15534_storage)": { + "label": "mapping(uint256 => struct FixedLib.Pool)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Account)11401_storage": { + "label": "struct Market.Account", + "members": [ + { + "label": "fixedDeposits", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "fixedBorrows", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "floatingBorrowShares", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Pool)15534_storage": { + "label": "struct FixedLib.Pool", + "members": [ + { + "label": "borrowed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "supplied", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "unassignedEarnings", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "lastAccrual", + "type": "t_uint256", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(Position)15540_storage": { + "label": "struct FixedLib.Position", + "members": [ + { + "label": "principal", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "fee", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoleData)23_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "0x33c69e5c0a7A2BAD42D178eC11b881aCDbE682a1": { + "address": "0x33c69e5c0a7A2BAD42D178eC11b881aCDbE682a1", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "rewardsTokens", + "offset": 0, + "slot": "0", + "type": "t_array(t_contract(IERC20)16592)dyn_storage", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:46" + }, + { + "label": "minTime", + "offset": 0, + "slot": "1", + "type": "t_uint256", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:51" + }, + { + "label": "refTime", + "offset": 0, + "slot": "2", + "type": "t_uint256", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:53" + }, + { + "label": "excessFactor", + "offset": 0, + "slot": "3", + "type": "t_uint256", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:55" + }, + { + "label": "penaltyGrowth", + "offset": 0, + "slot": "4", + "type": "t_uint256", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:57" + }, + { + "label": "penaltyThreshold", + "offset": 0, + "slot": "5", + "type": "t_uint256", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:59" + }, + { + "label": "market", + "offset": 0, + "slot": "6", + "type": "t_contract(Market)27481", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:62" + }, + { + "label": "provider", + "offset": 0, + "slot": "7", + "type": "t_address", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:64" + }, + { + "label": "savings", + "offset": 0, + "slot": "8", + "type": "t_address", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:66" + }, + { + "label": "providerRatio", + "offset": 0, + "slot": "9", + "type": "t_uint256", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:68" + }, + { + "label": "rewards", + "offset": 0, + "slot": "10", + "type": "t_mapping(t_contract(IERC20)16592,t_struct(RewardData)33876_storage)", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:71" + }, + { + "label": "avgStart", + "offset": 0, + "slot": "11", + "type": "t_mapping(t_address,t_uint256)", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:73" + }, + { + "label": "avgIndexes", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_address,t_mapping(t_contract(IERC20)16592,t_uint256))", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:75" + }, + { + "label": "claimed", + "offset": 0, + "slot": "13", + "type": "t_mapping(t_address,t_mapping(t_contract(IERC20)16592,t_uint256))", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:77" + }, + { + "label": "saved", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_address,t_mapping(t_contract(IERC20)16592,t_uint256))", + "contract": "StakedEXA", + "src": "contracts/StakedEXA.sol:79" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IERC20)6026": { + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)2441_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AccessControlStorage)2451_storage": { + "label": "struct AccessControlUpgradeable.AccessControlStorage", + "members": [ + { + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)2441_storage)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(EIP712Storage)3376_storage": { + "label": "struct EIP712Upgradeable.EIP712Storage", + "members": [ + { + "label": "_hashedName", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "_hashedVersion", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + }, + { + "label": "_name", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_version", + "type": "t_string_storage", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(ERC20Storage)2660_storage": { + "label": "struct ERC20Upgradeable.ERC20Storage", + "members": [ + { + "label": "_balances", + "type": "t_mapping(t_address,t_uint256)", + "offset": 0, + "slot": "0" + }, + { + "label": "_allowances", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "offset": 0, + "slot": "1" + }, + { + "label": "_totalSupply", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "_name", + "type": "t_string_storage", + "offset": 0, + "slot": "3" + }, + { + "label": "_symbol", + "type": "t_string_storage", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_struct(ERC4626Storage)2943_storage": { + "label": "struct ERC4626Upgradeable.ERC4626Storage", + "members": [ + { + "label": "_asset", + "type": "t_contract(IERC20)6026", + "offset": 0, + "slot": "0" + }, + { + "label": "_underlyingDecimals", + "type": "t_uint8", + "offset": 20, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)2575_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(NoncesStorage)3235_storage": { + "label": "struct NoncesUpgradeable.NoncesStorage", + "members": [ + { + "label": "_nonces", + "type": "t_mapping(t_address,t_uint256)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(PausableStorage)3294_storage": { + "label": "struct PausableUpgradeable.PausableStorage", + "members": [ + { + "label": "_paused", + "type": "t_bool", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)2441_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "hasRole", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + }, + "t_array(t_contract(IERC20)16592)dyn_storage": { + "label": "contract IERC20[]", + "numberOfBytes": "32" + }, + "t_contract(IERC20)16592": { + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_contract(Market)27481": { + "label": "contract Market", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_contract(IERC20)16592,t_uint256))": { + "label": "mapping(address => mapping(contract IERC20 => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_contract(IERC20)16592,t_struct(RewardData)33876_storage)": { + "label": "mapping(contract IERC20 => struct RewardData)", + "numberOfBytes": "32" + }, + "t_mapping(t_contract(IERC20)16592,t_uint256)": { + "label": "mapping(contract IERC20 => uint256)", + "numberOfBytes": "32" + }, + "t_struct(RewardData)33876_storage": { + "label": "struct RewardData", + "members": [ + { + "label": "duration", + "type": "t_uint40", + "offset": 0, + "slot": "0" + }, + { + "label": "finishAt", + "type": "t_uint40", + "offset": 5, + "slot": "0" + }, + { + "label": "updatedAt", + "type": "t_uint40", + "offset": 10, + "slot": "0" + }, + { + "label": "index", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "rate", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint40": { + "label": "uint40", + "numberOfBytes": "5" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Nonces": [ + { + "contract": "NoncesUpgradeable", + "label": "_nonces", + "type": "t_mapping(t_address,t_uint256)", + "src": "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol:17", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.EIP712": [ + { + "contract": "EIP712Upgradeable", + "label": "_hashedName", + "type": "t_bytes32", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:39", + "offset": 0, + "slot": "0" + }, + { + "contract": "EIP712Upgradeable", + "label": "_hashedVersion", + "type": "t_bytes32", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:41", + "offset": 0, + "slot": "1" + }, + { + "contract": "EIP712Upgradeable", + "label": "_name", + "type": "t_string_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:43", + "offset": 0, + "slot": "2" + }, + { + "contract": "EIP712Upgradeable", + "label": "_version", + "type": "t_string_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:44", + "offset": 0, + "slot": "3" + } + ], + "erc7201:openzeppelin.storage.ERC4626": [ + { + "contract": "ERC4626Upgradeable", + "label": "_asset", + "type": "t_contract(IERC20)6026", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC4626Upgradeable.sol:56", + "offset": 0, + "slot": "0" + }, + { + "contract": "ERC4626Upgradeable", + "label": "_underlyingDecimals", + "type": "t_uint8", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC4626Upgradeable.sol:57", + "offset": 20, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.ERC20": [ + { + "contract": "ERC20Upgradeable", + "label": "_balances", + "type": "t_mapping(t_address,t_uint256)", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:38", + "offset": 0, + "slot": "0" + }, + { + "contract": "ERC20Upgradeable", + "label": "_allowances", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40", + "offset": 0, + "slot": "1" + }, + { + "contract": "ERC20Upgradeable", + "label": "_totalSupply", + "type": "t_uint256", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42", + "offset": 0, + "slot": "2" + }, + { + "contract": "ERC20Upgradeable", + "label": "_name", + "type": "t_string_storage", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44", + "offset": 0, + "slot": "3" + }, + { + "contract": "ERC20Upgradeable", + "label": "_symbol", + "type": "t_string_storage", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:45", + "offset": 0, + "slot": "4" + } + ], + "erc7201:openzeppelin.storage.Pausable": [ + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:21", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.AccessControl": [ + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)2441_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + }, + "0x615dDF715D8696d0553021aE7363191de8443584": { + "address": "0x615dDF715D8696d0553021aE7363191de8443584", + "layout": { + "solcVersion": "0.8.26", + "storage": [], + "types": {}, + "namespaces": {} + } } } } diff --git a/deployments/optimism/MarketOP.json b/deployments/optimism/MarketOP.json index 724aac04..91ddb2da 100644 --- a/deployments/optimism/MarketOP.json +++ b/deployments/optimism/MarketOP.json @@ -2989,12 +2989,12 @@ "0xfBa759BCd1a99a7724c5068FEddb4F5b844b941A", "0x9f73066e00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000006c51c1718dc482b8001fbec5649174c9fb7d41bb00000000000000000000000000000000000000000000000000000035e55f1909000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000001057acf5f78000000000000000000000000000000000000000000000000000058d15e176280000" ], - "numDeployments": 7, + "numDeployments": 8, "solcInputHash": "85c8bc749730c336d6cf31aaa3d211b2", "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"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\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"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.\",\"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`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"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\":{\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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.5.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 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(\\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(\\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\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"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/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../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 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(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) 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 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 Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\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\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 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(\\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 (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\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 /// @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\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405260405162000b5038038062000b5083398101604081905262000026916200038b565b828162000036828260006200004d565b50620000449050826200008a565b50505062000489565b6200005883620000e5565b600082511180620000665750805b1562000085576200008383836200012760201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000b562000156565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e2816200018f565b50565b620000f081620001ed565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200014f838360405180606001604052806027815260200162000b296027913962000247565b9392505050565b60006200018060008051602062000b0983398151915260001b620002c660201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b038116620001a357600080fd5b80620001cc60008051602062000b0983398151915260001b620002c660201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200020381620002c960201b6200025a1760201c565b6200020d57600080fd5b80620001cc7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b620002c660201b620001ea1760201c565b6060600080856001600160a01b0316856040516200026691906200046b565b600060405180830381855af49150503d8060008114620002a3576040519150601f19603f3d011682016040523d82523d6000602084013e620002a8565b606091505b509092509050620002bc86838387620002d8565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200030857825160000362000300576001600160a01b0385163b6200030057600080fd5b508162000314565b6200031483836200031c565b949350505050565b8151156200032d5781518083602001fd5b600080fd5b80516001600160a01b03811681146200034a57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200038257818101518382015260200162000368565b50506000910152565b600080600060608486031215620003a157600080fd5b620003ac8462000332565b9250620003bc6020850162000332565b60408501519092506001600160401b0380821115620003da57600080fd5b818601915086601f830112620003ef57600080fd5b8151818111156200040457620004046200034f565b604051601f8201601f19908116603f011681019083821181831017156200042f576200042f6200034f565b816040528281528960208487010111156200044957600080fd5b6200045c83602083016020880162000365565b80955050505050509250925092565b600082516200047f81846020870162000365565b9190910192915050565b61067080620004996000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b610080366004610546565b610118565b61005b610093366004610561565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e4366004610546565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b610116610111610285565b61028f565b565b6101206102b3565b6001600160a01b0316330361014d5761014a816040518060200160405280600081525060006102e6565b50565b61014a6100fe565b61015d6102b3565b6001600160a01b031633036101b4576101af8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506102e6915050565b505050565b6101af6100fe565b60006101c66102b3565b6001600160a01b031633036101e2576101dd610285565b905090565b6101ea6100fe565b90565b6101f56102b3565b6001600160a01b0316330361014d5761014a81610311565b60006102176102b3565b6001600160a01b031633036101e2576101dd6102b3565b6060610253838360405180606001604052806027815260200161061460279139610365565b9392505050565b6001600160a01b03163b151590565b6102716102b3565b6001600160a01b0316330361011657600080fd5b60006101dd6103dd565b3660008037600080366000845af43d6000803e8080156102ae573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6102ef83610405565b6000825111806102fc5750805b156101af5761030b838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61033a6102b3565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610445565b6060600080856001600160a01b03168560405161038291906105e4565b600060405180830381855af49150503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091506103d38683838761049c565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6102d7565b61040e816104da565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661045857600080fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156104c85782516000036104c1576001600160a01b0385163b6104c157600080fd5b50816104d2565b6104d28383610515565b949350505050565b6001600160a01b0381163b6104ee57600080fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61047b565b8151156105255781518083602001fd5b600080fd5b80356001600160a01b038116811461054157600080fd5b919050565b60006020828403121561055857600080fd5b6102538261052a565b60008060006040848603121561057657600080fd5b61057f8461052a565b9250602084013567ffffffffffffffff8082111561059c57600080fd5b818601915086601f8301126105b057600080fd5b8135818111156105bf57600080fd5b8760208285010111156105d157600080fd5b6020830194508093505050509250925092565b6000825160005b8181101561060557602081860181015185830152016105eb565b50600092019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203011748945e626a6c7d6bd1969f4e5640e829c89504a5d4e52671d90f482851564736f6c63430008110033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b610080366004610546565b610118565b61005b610093366004610561565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e4366004610546565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b610116610111610285565b61028f565b565b6101206102b3565b6001600160a01b0316330361014d5761014a816040518060200160405280600081525060006102e6565b50565b61014a6100fe565b61015d6102b3565b6001600160a01b031633036101b4576101af8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506102e6915050565b505050565b6101af6100fe565b60006101c66102b3565b6001600160a01b031633036101e2576101dd610285565b905090565b6101ea6100fe565b90565b6101f56102b3565b6001600160a01b0316330361014d5761014a81610311565b60006102176102b3565b6001600160a01b031633036101e2576101dd6102b3565b6060610253838360405180606001604052806027815260200161061460279139610365565b9392505050565b6001600160a01b03163b151590565b6102716102b3565b6001600160a01b0316330361011657600080fd5b60006101dd6103dd565b3660008037600080366000845af43d6000803e8080156102ae573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6102ef83610405565b6000825111806102fc5750805b156101af5761030b838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61033a6102b3565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610445565b6060600080856001600160a01b03168560405161038291906105e4565b600060405180830381855af49150503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091506103d38683838761049c565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6102d7565b61040e816104da565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661045857600080fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156104c85782516000036104c1576001600160a01b0385163b6104c157600080fd5b50816104d2565b6104d28383610515565b949350505050565b6001600160a01b0381163b6104ee57600080fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61047b565b8151156105255781518083602001fd5b600080fd5b80356001600160a01b038116811461054157600080fd5b919050565b60006020828403121561055857600080fd5b6102538261052a565b60008060006040848603121561057657600080fd5b61057f8461052a565b9250602084013567ffffffffffffffff8082111561059c57600080fd5b818601915086601f8301126105b057600080fd5b8135818111156105bf57600080fd5b8760208285010111156105d157600080fd5b6020830194508093505050509250925092565b6000825160005b8181101561060557602081860181015185830152016105eb565b50600092019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203011748945e626a6c7d6bd1969f4e5640e829c89504a5d4e52671d90f482851564736f6c63430008110033", - "implementation": "0x448DDdb964de96b5Ad183777f5E420384E4d120c", + "implementation": "0x0BceA5139048557C89d394c3D003F2de382d4D00", "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.", "kind": "dev", diff --git a/deployments/optimism/MarketOP_Implementation.json b/deployments/optimism/MarketOP_Implementation.json index b6260418..ddfff0cf 100644 --- a/deployments/optimism/MarketOP_Implementation.json +++ b/deployments/optimism/MarketOP_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x448DDdb964de96b5Ad183777f5E420384E4d120c", + "address": "0x0BceA5139048557C89d394c3D003F2de382d4D00", "abi": [ { "inputs": [ @@ -2736,32 +2736,32 @@ "type": "function" } ], - "transactionHash": "0xb02134d404fa40542f4da7889d54bc88fe15cb77e34189cde70bf97c61d6b613", + "transactionHash": "0x28b98d184bd7906b1da3cdaa64f0a16afe5148fe21eabfc4820c7edd77cf0694", "receipt": { "to": null, "from": "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", - "contractAddress": "0x448DDdb964de96b5Ad183777f5E420384E4d120c", - "transactionIndex": 13, - "gasUsed": "5364770", - "logsBloom": "0x00000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000010000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xee8607436495ea8a22f5d0ffc0f3e4f8efe157b34e62bc6cd3c61d42db6b6ecd", - "transactionHash": "0xb02134d404fa40542f4da7889d54bc88fe15cb77e34189cde70bf97c61d6b613", + "contractAddress": "0x0BceA5139048557C89d394c3D003F2de382d4D00", + "transactionIndex": 1, + "gasUsed": "5409607", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000002000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000", + "blockHash": "0x3696f605587271120ad6ccf6e006690cbceaa95f6cf37e356458d3a9e50660a5", + "transactionHash": "0x28b98d184bd7906b1da3cdaa64f0a16afe5148fe21eabfc4820c7edd77cf0694", "logs": [ { - "transactionIndex": 13, - "blockNumber": 118840735, - "transactionHash": "0xb02134d404fa40542f4da7889d54bc88fe15cb77e34189cde70bf97c61d6b613", - "address": "0x448DDdb964de96b5Ad183777f5E420384E4d120c", + "transactionIndex": 1, + "blockNumber": 124901311, + "transactionHash": "0x28b98d184bd7906b1da3cdaa64f0a16afe5148fe21eabfc4820c7edd77cf0694", + "address": "0x0BceA5139048557C89d394c3D003F2de382d4D00", "topics": [ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" ], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 31, - "blockHash": "0xee8607436495ea8a22f5d0ffc0f3e4f8efe157b34e62bc6cd3c61d42db6b6ecd" + "logIndex": 0, + "blockHash": "0x3696f605587271120ad6ccf6e006690cbceaa95f6cf37e356458d3a9e50660a5" } ], - "blockNumber": 118840735, - "cumulativeGasUsed": "6988344", + "blockNumber": 124901311, + "cumulativeGasUsed": "5453434", "status": 1, "byzantium": true }, @@ -2769,758 +2769,15 @@ "0x4200000000000000000000000000000000000042", "0xaEb62e6F27BC103702E7BC879AE98bceA56f027E" ], - "numDeployments": 7, - "solcInputHash": "e3ac7af802d0124bd24cbb337b6ddc93", - "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"contract Auditor\",\"name\":\"auditor_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Disagreement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientProtocolLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketFrozen\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaturityOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAuditor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPausingRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SelfLiquidation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolState\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"alternativeState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolStates\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBorrow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRepay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWithdraw\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AccumulatorAccrual\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"backupFeeRate\",\"type\":\"uint256\"}],\"name\":\"BackupFeeRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"BorrowAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedUp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedDown\",\"type\":\"uint256\"}],\"name\":\"DampSpeedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"DepositAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulatorSmoothFactor\",\"type\":\"uint256\"}],\"name\":\"EarningsAccumulatorSmoothFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"}],\"name\":\"FixedEarningsUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilization\",\"type\":\"uint256\"}],\"name\":\"FloatingDebtUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isFrozen\",\"type\":\"bool\"}],\"name\":\"Frozen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel\",\"type\":\"address\"}],\"name\":\"InterestRateModelSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lendersAssets\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizedAssets\",\"type\":\"uint256\"}],\"name\":\"Liquidate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDepositShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDebt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulator\",\"type\":\"uint256\"}],\"name\":\"MarketUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxFuturePools\",\"type\":\"uint256\"}],\"name\":\"MaxFuturePoolsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyRate\",\"type\":\"uint256\"}],\"name\":\"PenaltyRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Repay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"name\":\"RepayAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveFactor\",\"type\":\"uint256\"}],\"name\":\"ReserveFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController\",\"type\":\"address\"}],\"name\":\"RewardsControllerSet\",\"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\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"SpreadBadDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate\",\"type\":\"uint256\"}],\"name\":\"TreasurySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"WithdrawAtMaturity\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EMERGENCY_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"accountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fixedDeposits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fixedBorrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auditor\",\"outputs\":[{\"internalType\":\"contract Auditor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"backupFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrowAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsOwed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"clearBadDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"depositAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulatorSmoothFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedBorrowPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedDepositPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"fixedPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplied\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastAccrual\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingBackupBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"maxFuturePools_\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedUp_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedDown_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAccumulatorAccrual\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAverageUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFloatingDebtUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxFuturePools\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"previewDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"debt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewFloatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRefund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewRepay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repayAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepayAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsController\",\"outputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"}],\"name\":\"setAssetSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setBackupFeeRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"up\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"down\",\"type\":\"uint256\"}],\"name\":\"setDampSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"}],\"name\":\"setEarningsAccumulatorSmoothFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isFrozen_\",\"type\":\"bool\"}],\"name\":\"setFrozen\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"futurePools\",\"type\":\"uint8\"}],\"name\":\"setMaxFuturePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"}],\"name\":\"setReserveFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController_\",\"type\":\"address\"}],\"name\":\"setRewardsController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setTreasury\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasuryFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsDiscounted\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\"}},\"BackupFeeRateSet(uint256)\":{\"params\":{\"backupFeeRate\":\"rate charged to the fixed pools to be accrued by the floating depositors.\"}},\"Borrow(address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"receiver\":\"address that received the borrowed assets.\",\"shares\":\"amount of borrow shares assigned to the account.\"}},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"fee\":\"extra amount that will need to be paid at maturity.\",\"maturity\":\"maturity in which the account will have to repay the loan.\",\"receiver\":\"address that received the borrowed assets.\"}},\"DampSpeedSet(uint256,uint256)\":{\"params\":{\"dampSpeedDown\":\"represented with 18 decimals.\",\"dampSpeedUp\":\"represented with 18 decimals.\"}},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were deposited.\",\"caller\":\"address which deposited the assets.\",\"fee\":\"is the extra amount that it will be collected at maturity.\",\"maturity\":\"maturity at which the account will be able to collect his deposit + his fee.\",\"owner\":\"address that will be able to withdraw the deposited assets.\"}},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"params\":{\"earningsAccumulatorSmoothFactor\":\"factor represented with 18 decimals.\"}},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"params\":{\"maturity\":\"maturity date where the earnings were updated.\",\"timestamp\":\"current timestamp.\",\"unassignedEarnings\":\"pending unassigned earnings.\"}},\"FloatingDebtUpdate(uint256,uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\",\"utilization\":\"new floating utilization.\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InterestRateModelSet(address)\":{\"params\":{\"interestRateModel\":\"new interest rate model to be used to calculate rates.\"}},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were repaid.\",\"borrower\":\"address which had the original debt.\",\"lendersAssets\":\"incentive paid to lenders.\",\"receiver\":\"address which repaid the previously borrowed amount.\",\"seizeMarket\":\"address of the asset that were seized by the liquidator.\",\"seizedAssets\":\"amount seized of the collateral.\"}},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"earningsAccumulator\":\"earnings accumulator.\",\"floatingAssets\":\"total floating supply assets.\",\"floatingBorrowShares\":\"total floating borrow shares.\",\"floatingDebt\":\"total floating borrow assets.\",\"floatingDepositShares\":\"total floating supply shares.\",\"timestamp\":\"current timestamp.\"}},\"MaxFuturePoolsSet(uint256)\":{\"params\":{\"maxFuturePools\":\"represented with 0 decimals.\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PenaltyRateSet(uint256)\":{\"params\":{\"penaltyRate\":\"penaltyRate percentage per second represented with 18 decimals.\"}},\"Repay(address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"shares\":\"amount of borrow shares that were subtracted from the account's accountability.\"}},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"maturity\":\"maturity where the account repaid its borrowed amounts.\",\"positionAssets\":\"amount of the debt that was covered in this repayment (penalties could have been repaid).\"}},\"ReserveFactorSet(uint256)\":{\"params\":{\"reserveFactor\":\"reserveFactor percentage.\"}},\"RewardsControllerSet(address)\":{\"params\":{\"rewardsController\":\"new rewards controller to update account rewards when operating with the Market.\"}},\"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`)\"},\"Seize(address,address,uint256)\":{\"params\":{\"assets\":\"amount seized of the collateral.\",\"borrower\":\"address which had the original debt.\",\"liquidator\":\"address which seized this collateral.\"}},\"SpreadBadDebt(address,uint256)\":{\"params\":{\"assets\":\"amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\",\"borrower\":\"address which was cleared from bad debt.\"}},\"TreasurySet(address,uint256)\":{\"params\":{\"treasury\":\"address of the treasury that will receive the minted eTokens.\",\"treasuryFeeRate\":\"represented with 18 decimals.\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets withdrawn (can include a discount for early withdraw).\",\"caller\":\"address which withdraw the asset.\",\"maturity\":\"maturity where the account withdraw its deposits.\",\"owner\":\"address which had the assets withdrawn.\",\"positionAssets\":\"position size reduced.\",\"receiver\":\"address which will be collecting the assets.\"}}},\"kind\":\"dev\",\"methods\":{\"accountSnapshot(address)\":{\"params\":{\"account\":\"account to return status snapshot in the specified maturity date.\"},\"returns\":{\"_0\":\"the amount deposited to the floating pool and the amount owed to floating and fixed pools.\"}},\"borrow(uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"borrowShares\":\"shares corresponding to the borrowed assets.\"}},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"maturity\":\"maturity date for repayment.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"assetsOwed\":\"total amount of assets (principal + fee) to be repaid at maturity.\"}},\"clearBadDebt(address)\":{\"details\":\"Can only be called from the auditor.\",\"params\":{\"borrower\":\"account with insufficient collateral to be cleared the debt.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"assets\":\"amount to receive from the msg.sender.\",\"maturity\":\"maturity date where the assets will be deposited.\",\"minAssetsRequired\":\"minimum amount of assets required by the depositor for the transaction to be accepted.\",\"receiver\":\"address that will be able to withdraw the deposited assets.\"},\"returns\":{\"positionAssets\":\"total amount of assets (principal + fee) to be withdrawn at maturity.\"}},\"fixedPoolBalance(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed and supplied amount of the fixed pool.\"}},\"fixedPoolBorrowed(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed amount of the fixed pool.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"details\":\"can only be called once.\"},\"liquidate(address,uint256,address)\":{\"details\":\"Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.\",\"params\":{\"borrower\":\"account that has an outstanding debt across floating or fixed pools.\",\"maxAssets\":\"maximum amount of debt that the liquidator is willing to accept. (it can be less)\",\"seizeMarket\":\"market from which the collateral will be seized to give to the liquidator.\"},\"returns\":{\"repaidAssets\":\"actual amount repaid.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"previewBorrow(uint256)\":{\"params\":{\"assets\":\"amount of assets to borrow.\"},\"returns\":{\"_0\":\"amount of shares that will be asigned to the account after the borrow.\"}},\"previewDebt(address)\":{\"params\":{\"borrower\":\"account to return status snapshot for fixed and floating borrows.\"},\"returns\":{\"debt\":\"the total debt, denominated in number of assets.\"}},\"previewFloatingAssetsAverage()\":{\"returns\":{\"_0\":\"projected `floatingAssetsAverage`.\"}},\"previewRefund(uint256)\":{\"params\":{\"shares\":\"amount of shares to subtract from caller's accountability.\"},\"returns\":{\"_0\":\"amount of assets that will be repaid.\"}},\"previewRepay(uint256)\":{\"params\":{\"assets\":\"amount of assets to repay.\"},\"returns\":{\"_0\":\"amount of shares that will be subtracted from the account after the repay.\"}},\"redeem(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\",\"shares\":\"amount of shares to be redeemed for underlying asset.\"},\"returns\":{\"assets\":\"amount of underlying asset that was withdrawn.\"}},\"refund(uint256,address)\":{\"params\":{\"borrowShares\":\"shares to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualShares\":\"actual subtracted shares from the borrower's accountability.\",\"assets\":\"subtracted assets from the borrower's accountability.\"}},\"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.\"},\"repay(uint256,address)\":{\"params\":{\"assets\":\"assets to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualRepay\":\"the actual amount that should be transferred into the protocol.\",\"borrowShares\":\"subtracted shares from the borrower's accountability.\"}},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"borrower\":\"address of the account that has the debt.\",\"maturity\":\"maturity date where the assets will be repaid.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept to be repaid.\",\"positionAssets\":\"amount to be paid for the borrower's debt.\"},\"returns\":{\"actualRepayAssets\":\"the actual amount that was transferred into the protocol.\"}},\"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.\"},\"seize(address,address,uint256)\":{\"details\":\"Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\",\"params\":{\"assets\":\"amount to be removed from borrower's possession.\",\"borrower\":\"address from which the assets will be seized.\",\"liquidator\":\"address which will receive the seized assets.\"}},\"setAssetSymbol(string)\":{\"params\":{\"assetSymbol\":\"the symbol for the underlying asset.\"}},\"setBackupFeeRate(uint256)\":{\"params\":{\"backupFeeRate_\":\"percentage amount represented with 18 decimals.\"}},\"setDampSpeed(uint256,uint256)\":{\"params\":{\"down\":\"damp speed down, represented with 18 decimals.\",\"up\":\"damp speed up, represented with 18 decimals.\"}},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"params\":{\"earningsAccumulatorSmoothFactor_\":\"represented with 18 decimals.\"}},\"setInterestRateModel(address)\":{\"params\":{\"interestRateModel_\":\"new interest rate model.\"}},\"setMaxFuturePools(uint8)\":{\"details\":\"If value is decreased, VALID maturities will become NOT_READY.\",\"params\":{\"futurePools\":\"number of pools to be active at the same time.\"}},\"setPenaltyRate(uint256)\":{\"params\":{\"penaltyRate_\":\"percentage represented with 18 decimals.\"}},\"setReserveFactor(uint128)\":{\"params\":{\"reserveFactor_\":\"parameter represented with 18 decimals.\"}},\"setRewardsController(address)\":{\"params\":{\"rewardsController_\":\"new rewards controller.\"}},\"setTreasury(address,uint256)\":{\"params\":{\"treasuryFeeRate_\":\"represented with 18 decimals.\",\"treasury_\":\"address of the treasury that will receive the minted eTokens.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalAssets()\":{\"returns\":{\"_0\":\"actual floatingAssets plus earnings to be accrued at current timestamp.\"}},\"totalFloatingBorrowAssets()\":{\"returns\":{\"_0\":\"actual floating debt plus projected interest.\"}},\"transfer(address,uint256)\":{\"details\":\"Makes sure that the caller doesn't have shortfall after transferring.\",\"params\":{\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Makes sure that `from` address doesn't have shortfall after transferring.\",\"params\":{\"from\":\"address from which the assets will be transferred.\",\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"withdraw(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"assets\":\"amount of underlying to be withdrawn.\",\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\"},\"returns\":{\"shares\":\"amount of shares redeemed for underlying asset.\"}},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"maturity\":\"maturity date where the assets will be withdrawn.\",\"minAssetsRequired\":\"minimum amount required by the account (if discount included for early withdrawal).\",\"owner\":\"address that previously deposited the assets.\",\"positionAssets\":\"position size to be reduced.\",\"receiver\":\"address that will receive the withdrawn assets.\"},\"returns\":{\"assetsDiscounted\":\"amount of assets withdrawn (can include a discount for early withdraw).\"}}},\"stateVariables\":{\"__gap\":{\"custom:oz-renamed-from\":\"floatingUtilization\",\"details\":\"gap from deprecated state.\"},\"auditor\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"notice\":\"Emitted when accumulator distributes earnings.\"},\"BackupFeeRateSet(uint256)\":{\"notice\":\"Emitted when the backupFeeRate parameter is changed by admin.\"},\"Borrow(address,address,address,uint256,uint256)\":{\"notice\":\"Event emitted when an account borrows amount of assets from a floating pool.\"},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account borrows amount of an asset from a certain maturity date.\"},\"DampSpeedSet(uint256,uint256)\":{\"notice\":\"Emitted when the damp speeds are changed by admin.\"},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period.\"},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"notice\":\"Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\"},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"notice\":\"Emitted when the earnings of a maturity are updated.\"},\"FloatingDebtUpdate(uint256,uint256)\":{\"notice\":\"Emitted when the floating debt is updated.\"},\"Frozen(address,bool)\":{\"notice\":\"Emitted when `account` sets the `isFrozen` flag.\"},\"InterestRateModelSet(address)\":{\"notice\":\"Emitted when the interestRateModel is changed by admin.\"},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"notice\":\"Emitted when an account's position had a liquidation.\"},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when market state is updated.\"},\"MaxFuturePoolsSet(uint256)\":{\"notice\":\"Emitted when the maxFuturePools is changed by admin.\"},\"PenaltyRateSet(uint256)\":{\"notice\":\"Emitted when the penaltyRate is changed by admin.\"},\"Repay(address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays amount of assets to a floating pool.\"},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays its borrows after maturity.\"},\"ReserveFactorSet(uint256)\":{\"notice\":\"Emitted when the reserveFactor is changed by admin.\"},\"RewardsControllerSet(address)\":{\"notice\":\"Emitted when the rewardsController is changed by admin.\"},\"Seize(address,address,uint256)\":{\"notice\":\"Emitted when an account's collateral has been seized.\"},\"SpreadBadDebt(address,uint256)\":{\"notice\":\"Emitted when an account is cleared from bad debt.\"},\"TreasurySet(address,uint256)\":{\"notice\":\"Emitted when the treasury variables are changed by admin.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account withdraws from a fixed rate pool.\"}},\"kind\":\"user\",\"methods\":{\"accountSnapshot(address)\":{\"notice\":\"Gets current snapshot for an account across all maturities.\"},\"accounts(address)\":{\"notice\":\"Tracks fixed deposit and borrow map and floating borrow shares of an account.\"},\"backupFeeRate()\":{\"notice\":\"Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\"},\"borrow(uint256,address,address)\":{\"notice\":\"Borrows a certain amount from the floating pool.\"},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Borrows a certain amount from a maturity.\"},\"clearBadDebt(address)\":{\"notice\":\"Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\"},\"dampSpeedDown()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\"},\"dampSpeedUp()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Deposits a certain amount to a maturity.\"},\"earningsAccumulator()\":{\"notice\":\"Accumulated earnings from extraordinary sources to be gradually distributed.\"},\"earningsAccumulatorSmoothFactor()\":{\"notice\":\"Factor used for gradual accrual of earnings to the floating pool.\"},\"fixedBorrowPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed borrow positions by maturity, account and position.\"},\"fixedDepositPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed deposit positions by maturity, account and position.\"},\"fixedPoolBalance(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed and supplied amount.\"},\"fixedPoolBorrowed(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed amount.\"},\"fixedPools(uint256)\":{\"notice\":\"Tracks fixed pools state by maturity.\"},\"floatingAssets()\":{\"notice\":\"Amount of floating assets deposited to the pool.\"},\"floatingAssetsAverage()\":{\"notice\":\"Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\"},\"floatingBackupBorrowed()\":{\"notice\":\"Amount of assets lent by the floating pool to the fixed pools.\"},\"floatingDebt()\":{\"notice\":\"Amount of assets lent by the floating pool to accounts.\"},\"initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"notice\":\"Initializes the contract.\"},\"interestRateModel()\":{\"notice\":\"Interest rate model contract used to get the borrow rates.\"},\"isFrozen()\":{\"notice\":\"Flag to prevent new borrows and deposits.\"},\"lastAccumulatorAccrual()\":{\"notice\":\"Last time the accumulator distributed earnings.\"},\"lastAverageUpdate()\":{\"notice\":\"Last time the floating assets average was updated.\"},\"lastFloatingDebtUpdate()\":{\"notice\":\"Last time the floating debt was updated.\"},\"liquidate(address,uint256,address)\":{\"notice\":\"Liquidates undercollateralized fixed/floating (or both) position(s).\"},\"maxFuturePools()\":{\"notice\":\"Number of fixed pools to be active at the same time.\"},\"pause()\":{\"notice\":\"Sets the pause state to true in case of emergency, triggered by an authorized account.\"},\"penaltyRate()\":{\"notice\":\"Rate per second to be charged to delayed fixed pools borrowers after maturity.\"},\"previewBorrow(uint256)\":{\"notice\":\"Simulates the effects of a borrow at the current time, given current contract conditions.\"},\"previewDebt(address)\":{\"notice\":\"Gets all borrows and penalties for an account.\"},\"previewFloatingAssetsAverage()\":{\"notice\":\"Returns the current `floatingAssetsAverage` without updating the storage variable.\"},\"previewRefund(uint256)\":{\"notice\":\"Simulates the effects of a refund at the current time, given current contract conditions.\"},\"previewRepay(uint256)\":{\"notice\":\"Simulates the effects of a repay at the current time, given current contract conditions.\"},\"redeem(uint256,address,address)\":{\"notice\":\"Redeems the owner's floating pool assets to the receiver address.\"},\"refund(uint256,address)\":{\"notice\":\"Repays a certain amount of shares to the floating pool.\"},\"repay(uint256,address)\":{\"notice\":\"Repays a certain amount of assets to the floating pool.\"},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Repays a certain amount to a maturity.\"},\"reserveFactor()\":{\"notice\":\"Percentage factor that represents the liquidity reserves that can't be borrowed.\"},\"rewardsController()\":{\"notice\":\"Address of the rewards controller that will accrue rewards for accounts operating with the Market.\"},\"seize(address,address,uint256)\":{\"notice\":\"Public function to seize a certain amount of assets.\"},\"setAssetSymbol(string)\":{\"notice\":\"Sets name and symbol for the Market.\"},\"setBackupFeeRate(uint256)\":{\"notice\":\"Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity.\"},\"setDampSpeed(uint256,uint256)\":{\"notice\":\"Sets the damp speed used to update the floatingAssetsAverage.\"},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"notice\":\"Sets the factor used when smoothly accruing earnings to the floating pool.\"},\"setFrozen(bool)\":{\"notice\":\"Sets `isFrozen` state, triggered by an authorized account.\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model to be used to calculate rates.\"},\"setMaxFuturePools(uint8)\":{\"notice\":\"Sets the protocol's max future pools for fixed borrowing and lending.\"},\"setPenaltyRate(uint256)\":{\"notice\":\"Sets the penalty rate per second.\"},\"setReserveFactor(uint128)\":{\"notice\":\"Sets the percentage that represents the liquidity reserves that can't be borrowed.\"},\"setRewardsController(address)\":{\"notice\":\"Sets the rewards controller to update account rewards when operating with the Market.\"},\"setTreasury(address,uint256)\":{\"notice\":\"Sets the treasury variables.\"},\"totalAssets()\":{\"notice\":\"Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator.\"},\"totalFloatingBorrowAssets()\":{\"notice\":\"Calculates the total floating debt, considering elapsed time since last update and current interest rate.\"},\"totalFloatingBorrowShares()\":{\"notice\":\"Total amount of floating borrow shares assigned to floating borrow accounts.\"},\"transfer(address,uint256)\":{\"notice\":\"Moves amount of shares from the caller's account to `to`.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Moves amount of shares from `from` to `to` using the allowance mechanism.\"},\"treasury()\":{\"notice\":\"Address of the treasury that will receive the allocated earnings.\"},\"treasuryFeeRate()\":{\"notice\":\"Rate to be charged by the treasury to floating and fixed borrows.\"},\"unpause()\":{\"notice\":\"Sets the pause state to false when threat is gone, triggered by an authorized account.\"},\"withdraw(uint256,address,address)\":{\"notice\":\"Withdraws the owner's floating pool assets to the receiver address.\"},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Withdraws a certain amount from a maturity.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Market.sol\":\"Market\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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 {Initializable} from \\\"../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 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 function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_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(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\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"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/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\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\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"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 (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport {Initializable} from \\\"../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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\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\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"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 {Initializable} from \\\"../../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\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"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/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\"},\"contracts/Auditor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract Auditor is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n\\n /// @notice Address that a market should have as price feed to consider as base price and avoid external price call.\\n address public constant BASE_FEED = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n /// @notice Target health factor that the account should have after it's liquidated to prevent cascade liquidations.\\n uint256 public constant TARGET_HEALTH = 1.25e18;\\n /// @notice Maximum value the liquidator can send and still have granular control of max assets.\\n /// Above this threshold, they should send `type(uint256).max`.\\n uint256 public constant ASSETS_THRESHOLD = type(uint256).max / 1e18;\\n\\n /// @notice Decimals that the answer of all price feeds should have.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 public immutable priceDecimals;\\n /// @notice Base factor to scale the price returned by the feed to 18 decimals.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable baseFactor;\\n /// @notice Base price used if the feed to fetch the price from is `BASE_FEED`.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable basePrice;\\n\\n /// @notice Tracks the markets' indexes that an account has entered as collateral.\\n mapping(address => uint256) public accountMarkets;\\n /// @notice Stores market parameters per each enabled market.\\n mapping(Market => MarketData) public markets;\\n /// @notice Array of all enabled markets.\\n Market[] public marketList;\\n\\n /// @notice Liquidation incentive factors for the liquidator and the lenders of the market where the debt is repaid.\\n LiquidationIncentive public liquidationIncentive;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(uint256 priceDecimals_) {\\n priceDecimals = priceDecimals_;\\n baseFactor = 10 ** (18 - priceDecimals_);\\n basePrice = 10 ** priceDecimals_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(LiquidationIncentive memory liquidationIncentive_) external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setLiquidationIncentive(liquidationIncentive_);\\n }\\n\\n /// @notice Allows assets of a certain market to be used as collateral for borrowing other assets.\\n /// @param market market to enabled as collateral.\\n function enterMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) != 0) return;\\n accountMarkets[msg.sender] = marketMap | marketMask;\\n\\n emit MarketEntered(market, msg.sender);\\n }\\n\\n /// @notice Removes market from sender's account liquidity calculation.\\n /// @dev Sender must not have an outstanding borrow balance in the asset, or be providing necessary collateral\\n /// for an outstanding borrow.\\n /// @param market market to be disabled as collateral.\\n function exitMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n (uint256 assets, uint256 debt) = market.accountSnapshot(msg.sender);\\n\\n // fail if the sender has a borrow balance\\n if (debt != 0) revert RemainingDebt();\\n\\n // fail if the sender is not permitted to redeem all of their assets\\n checkShortfall(market, msg.sender, assets);\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) == 0) return;\\n accountMarkets[msg.sender] = marketMap & ~marketMask;\\n\\n emit MarketExited(market, msg.sender);\\n }\\n\\n /// @notice Returns account's liquidity calculation.\\n /// @param account account in which the liquidity will be calculated.\\n /// @param marketToSimulate market in which to simulate withdraw operation.\\n /// @param withdrawAmount amount to simulate as withdraw.\\n /// @return sumCollateral sum of all collateral, already multiplied by each adjust factor (denominated in base).\\n /// @return sumDebtPlusEffects sum of all debt divided by adjust factor considering withdrawal (denominated in base).\\n function accountLiquidity(\\n address account,\\n Market marketToSimulate,\\n uint256 withdrawAmount\\n ) public view returns (uint256 sumCollateral, uint256 sumDebtPlusEffects) {\\n AccountLiquidity memory vars; // holds all our calculation results\\n\\n // for each asset the account is in\\n uint256 marketMap = accountMarkets[account];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 baseUnit = 10 ** m.decimals;\\n uint256 adjustFactor = m.adjustFactor;\\n\\n // read the balances\\n (vars.balance, vars.borrowBalance) = market.accountSnapshot(account);\\n\\n // get the normalized price of the asset (18 decimals)\\n vars.price = assetPrice(m.priceFeed);\\n\\n // sum all the collateral prices\\n sumCollateral += vars.balance.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n\\n // sum all the debt\\n sumDebtPlusEffects += vars.borrowBalance.mulDivUp(vars.price, baseUnit).divWadUp(adjustFactor);\\n\\n // simulate the effects of withdrawing from a pool\\n if (market == marketToSimulate) {\\n // calculate the effects of redeeming markets\\n // (having less collateral is the same as having more debt for this calculation)\\n if (withdrawAmount != 0) {\\n sumDebtPlusEffects += withdrawAmount.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n }\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Validates that the current state of the position and system are valid.\\n /// @dev To be called after adding the borrowed debt to the account position.\\n /// @param market address of the market where the borrow is made.\\n /// @param borrower address of the account that will repay the debt.\\n function checkBorrow(Market market, address borrower) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[borrower];\\n uint256 marketMask = 1 << m.index;\\n\\n // validate borrow state\\n if ((marketMap & marketMask) == 0) {\\n // only markets may call checkBorrow if borrower not in market\\n if (msg.sender != address(market)) revert NotMarket();\\n\\n accountMarkets[borrower] = marketMap | marketMask;\\n emit MarketEntered(market, borrower);\\n }\\n\\n // verify that current liquidity is not short\\n (uint256 collateral, uint256 debt) = accountLiquidity(borrower, Market(address(0)), 0);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Checks if the account has liquidity shortfall.\\n /// @param market address of the market where the operation will happen.\\n /// @param account address of the account to check for possible shortfall.\\n /// @param amount amount that the account wants to withdraw or transfer.\\n function checkShortfall(Market market, address account, uint256 amount) public view {\\n // if the account is not 'in' the market, bypass the liquidity check\\n if ((accountMarkets[account] & (1 << markets[market].index)) == 0) return;\\n\\n // otherwise, perform a hypothetical liquidity check to guard against shortfall\\n (uint256 collateral, uint256 debt) = accountLiquidity(account, market, amount);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Allows/rejects liquidation of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt is being repaid.\\n /// @param seizeMarket market from where the liquidator will seize assets.\\n /// @param borrower address in which the assets are being liquidated.\\n /// @param maxLiquidatorAssets maximum amount of debt the liquidator is willing to accept.\\n /// @return maxRepayAssets capped amount of debt the liquidator is allowed to repay.\\n function checkLiquidation(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 maxLiquidatorAssets\\n ) external view returns (uint256 maxRepayAssets) {\\n // if markets are listed, they have the same auditor\\n if (!markets[repayMarket].isListed || !markets[seizeMarket].isListed) revert MarketNotListed();\\n\\n MarketVars memory repay;\\n LiquidityVars memory base;\\n uint256 marketMap = accountMarkets[borrower];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage marketData = markets[market];\\n MarketVars memory m = MarketVars({\\n price: assetPrice(marketData.priceFeed),\\n adjustFactor: marketData.adjustFactor,\\n baseUnit: 10 ** marketData.decimals\\n });\\n\\n if (market == repayMarket) repay = m;\\n\\n (uint256 collateral, uint256 debt) = market.accountSnapshot(borrower);\\n\\n uint256 value = debt.mulDivUp(m.price, m.baseUnit);\\n base.totalDebt += value;\\n base.adjustedDebt += value.divWadUp(m.adjustFactor);\\n\\n value = collateral.mulDivDown(m.price, m.baseUnit);\\n base.totalCollateral += value;\\n base.adjustedCollateral += value.mulWadDown(m.adjustFactor);\\n if (market == seizeMarket) base.seizeAvailable = value;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (base.adjustedCollateral >= base.adjustedDebt) revert InsufficientShortfall();\\n\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n uint256 adjustFactor = base.adjustedCollateral.mulWadDown(base.totalDebt).divWadUp(\\n base.adjustedDebt.mulWadUp(base.totalCollateral)\\n );\\n uint256 closeFactor = (TARGET_HEALTH - base.adjustedCollateral.divWadUp(base.adjustedDebt)).divWadUp(\\n TARGET_HEALTH - adjustFactor.mulWadDown(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n );\\n maxRepayAssets = Math.min(\\n Math\\n .min(\\n base.totalDebt.mulWadUp(Math.min(1e18, closeFactor)),\\n base.seizeAvailable.divWadUp(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n )\\n .mulDivUp(repay.baseUnit, repay.price),\\n maxLiquidatorAssets < ASSETS_THRESHOLD\\n ? maxLiquidatorAssets.divWadDown(1e18 + memIncentive.lenders)\\n : maxLiquidatorAssets\\n );\\n }\\n\\n /// @notice Allow/rejects seizing of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market where the assets will be seized.\\n function checkSeize(Market repayMarket, Market seizeMarket) external view {\\n // if markets are listed, they also point to the same Auditor\\n if (!markets[seizeMarket].isListed || !markets[repayMarket].isListed) revert MarketNotListed();\\n }\\n\\n /// @notice Calculates the amount of collateral to be seized when a position is undercollateralized.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market from where the assets will be seized by the liquidator.\\n /// @param borrower account in which assets are being seized.\\n /// @param actualRepayAssets amount being repaid.\\n /// @return lendersAssets amount to be added for other lenders as a compensation of bad debt clearing.\\n /// @return seizeAssets amount that can be seized by the liquidator.\\n function calculateSeize(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 actualRepayAssets\\n ) external view returns (uint256 lendersAssets, uint256 seizeAssets) {\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n lendersAssets = actualRepayAssets.mulWadDown(memIncentive.lenders);\\n\\n // read prices for borrowed and collateral markets\\n uint256 priceBorrowed = assetPrice(markets[repayMarket].priceFeed);\\n uint256 priceCollateral = assetPrice(markets[seizeMarket].priceFeed);\\n uint256 baseAmount = actualRepayAssets.mulDivUp(priceBorrowed, 10 ** markets[repayMarket].decimals);\\n\\n seizeAssets = Math.min(\\n baseAmount.mulDivUp(10 ** markets[seizeMarket].decimals, priceCollateral).mulWadUp(\\n 1e18 + memIncentive.liquidator + memIncentive.lenders\\n ),\\n seizeMarket.maxWithdraw(borrower)\\n );\\n }\\n\\n /// @notice Checks if account has debt with no collateral, if so then call `clearBadDebt` from each market.\\n /// @dev Collateral is multiplied by price and adjust factor to be accurately evaluated as positive collateral asset.\\n /// @param account account in which debt is being checked.\\n function handleBadDebt(address account) external {\\n uint256 memMarketMap = accountMarkets[account];\\n uint256 marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 assets = market.maxWithdraw(account);\\n if (assets.mulDivDown(assetPrice(m.priceFeed), 10 ** m.decimals).mulWadDown(m.adjustFactor) > 0) return;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) marketList[i].clearBadDebt(account);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the asset price of a price feed.\\n /// @dev If Chainlink's asset price is <= 0 the call is reverted.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price.\\n /// @return The price of the asset scaled to 18-digit decimals.\\n function assetPrice(IPriceFeed priceFeed) public view returns (uint256) {\\n if (address(priceFeed) == BASE_FEED) return basePrice;\\n\\n int256 price = priceFeed.latestAnswer();\\n if (price <= 0) revert InvalidPrice();\\n return uint256(price) * baseFactor;\\n }\\n\\n /// @notice Retrieves all markets.\\n function allMarkets() external view returns (Market[] memory) {\\n return marketList;\\n }\\n\\n /// @notice Enables a certain market.\\n /// @dev Enabling more than 256 markets will cause an overflow when casting market index to uint8.\\n /// @param market market to add to the protocol.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n /// @param adjustFactor market's adjust factor for the underlying asset.\\n function enableMarket(\\n Market market,\\n IPriceFeed priceFeed,\\n uint128 adjustFactor\\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (market.auditor() != this) revert AuditorMismatch();\\n if (markets[market].isListed) revert MarketAlreadyListed();\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n\\n uint8 decimals = market.decimals();\\n markets[market] = MarketData({\\n isListed: true,\\n adjustFactor: adjustFactor,\\n decimals: decimals,\\n index: uint8(marketList.length),\\n priceFeed: priceFeed\\n });\\n\\n marketList.push(market);\\n\\n emit MarketListed(market, decimals);\\n emit PriceFeedSet(market, priceFeed);\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the adjust factor for a certain market.\\n /// @param market address of the market to change adjust factor for.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n function setAdjustFactor(Market market, uint128 adjustFactor) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (!markets[market].isListed) revert MarketNotListed();\\n\\n markets[market].adjustFactor = adjustFactor;\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the Chainlink Price Feed Aggregator source for a market.\\n /// @param market market address of the asset.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n function setPriceFeed(Market market, IPriceFeed priceFeed) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n markets[market].priceFeed = priceFeed;\\n emit PriceFeedSet(market, priceFeed);\\n }\\n\\n /// @notice Sets liquidation incentive (liquidator and lenders) for the whole ecosystem.\\n /// @param liquidationIncentive_ new liquidation incentive.\\n function setLiquidationIncentive(\\n LiquidationIncentive memory liquidationIncentive_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n liquidationIncentive = liquidationIncentive_;\\n emit LiquidationIncentiveSet(liquidationIncentive_);\\n }\\n\\n /// @notice Emitted when a new market is listed for borrow/lending.\\n /// @param market address of the market that was listed.\\n /// @param decimals decimals of the market's underlying asset.\\n event MarketListed(Market indexed market, uint8 decimals);\\n\\n /// @notice Emitted when an account enters a market to use his deposit as collateral for a loan.\\n /// @param market address of the market that the account entered.\\n /// @param account address of the account that just entered a market.\\n event MarketEntered(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when an account leaves a market.\\n /// Means that they would stop using their deposit as collateral and won't ask for any loans in this market.\\n /// @param market address of the market that the account just left.\\n /// @param account address of the account that just left a market.\\n event MarketExited(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when a adjust factor is changed by admin.\\n /// @param market address of the market that has a new adjust factor.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n event AdjustFactorSet(Market indexed market, uint256 adjustFactor);\\n\\n /// @notice Emitted when a new liquidationIncentive has been set.\\n /// @param liquidationIncentive represented with 18 decimals.\\n event LiquidationIncentiveSet(LiquidationIncentive liquidationIncentive);\\n\\n /// @notice Emitted when a market and prie feed is changed by admin.\\n /// @param market address of the asset used to get the price.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n event PriceFeedSet(Market indexed market, IPriceFeed indexed priceFeed);\\n\\n /// @notice Stores the market parameters used for liquidity calculations.\\n /// @param adjustFactor used to asses the lending power of the market's underlying asset.\\n /// @param decimals number of decimals of the market's underlying asset.\\n /// @param index index of the market in the `marketList`.\\n /// @param isListed true if the market is enabled.\\n /// @param priceFeed address of the price feed used to query the asset's price.\\n struct MarketData {\\n uint128 adjustFactor;\\n uint8 decimals;\\n uint8 index;\\n bool isListed;\\n IPriceFeed priceFeed;\\n }\\n\\n /// @notice Stores the liquidator and lenders factors used in liquidations to calculate the amount to seize.\\n /// @param liquidator factor used to calculate the extra bonus a liquidator can seize.\\n /// @param lenders factor used to calculate the bonus that the pool lenders receive.\\n struct LiquidationIncentive {\\n uint128 liquidator;\\n uint128 lenders;\\n }\\n\\n /// @notice Used as memory access to temporary store account liquidity data.\\n /// @param balance collateral balance of the account.\\n /// @param borrowBalance borrow balance of the account.\\n /// @param price asset price returned by the price feed with 18 decimals.\\n struct AccountLiquidity {\\n uint256 balance;\\n uint256 borrowBalance;\\n uint256 price;\\n }\\n}\\n\\nerror AuditorMismatch();\\nerror InsufficientAccountLiquidity();\\nerror InsufficientShortfall();\\nerror InvalidPrice();\\nerror InvalidPriceFeed();\\nerror MarketAlreadyListed();\\nerror MarketNotListed();\\nerror NotMarket();\\nerror RemainingDebt();\\n\\nstruct MarketVars {\\n uint256 price;\\n uint256 baseUnit;\\n uint128 adjustFactor;\\n}\\n\\nstruct LiquidityVars {\\n uint256 totalDebt;\\n uint256 totalCollateral;\\n uint256 adjustedDebt;\\n uint256 adjustedCollateral;\\n uint256 seizeAvailable;\\n}\\n\",\"keccak256\":\"0xa5facf0b53ee0f3a07843361add23000e569743c9b5a3cdf7817dc51a833040b\",\"license\":\"BUSL-1.1\"},\"contracts/InterestRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract InterestRateModel {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for int256;\\n using SafeCast for uint256;\\n using SafeCast for int256;\\n\\n /// @notice Scale factor of the floating curve.\\n uint256 public immutable floatingCurveA;\\n /// @notice Origin intercept of the floating curve.\\n int256 public immutable floatingCurveB;\\n /// @notice Asymptote of the floating curve.\\n uint256 public immutable floatingMaxUtilization;\\n\\n /// @notice natural level of utilization, represented with 18 decimals.\\n uint256 public immutable naturalUtilization;\\n /// @notice speed of growth for the base rate, represented with 18 decimals.\\n int256 public immutable growthSpeed;\\n /// @notice speed of the sigmoid curve, represented with 18 decimals.\\n int256 public immutable sigmoidSpeed;\\n /// @notice spread factor for the fixed rate, represented with 18 decimals.\\n int256 public immutable spreadFactor;\\n /// @notice speed of maturity for the fixed rate, represented with 18 decimals.\\n int256 public immutable maturitySpeed;\\n /// @notice time preference for the fixed rate, represented with 18 decimals.\\n int256 public immutable timePreference;\\n /// @notice liquidity naturally designated to fixed pools, represented with 18 decimals.\\n uint256 public immutable fixedAllocation;\\n /// @notice maximum interest rate, represented with 18 decimals.\\n uint256 public immutable maxRate;\\n\\n /// @dev maximum input value for expWad, ~ln((2^255 - 1) / 1e18), represented with 18 decimals.\\n int256 internal constant EXP_THRESHOLD = 135305999368893231588;\\n /// @dev auxiliary variable to save an extra operation.\\n int256 internal immutable auxSigmoid;\\n\\n /// @notice set of parameters used to initialize the interest rate model.\\n Parameters internal _parameters;\\n\\n constructor(Parameters memory p, Market market_) {\\n assert(\\n p.minRate > 0 &&\\n p.naturalRate > 0 &&\\n p.maxUtilization > 1e18 &&\\n p.naturalUtilization > 0 &&\\n p.naturalUtilization < 1e18 &&\\n p.growthSpeed > 0 &&\\n p.sigmoidSpeed > 0 &&\\n p.spreadFactor > 0 &&\\n p.maturitySpeed > 0 &&\\n p.maxRate > 0 &&\\n p.maxRate <= 15_000e16\\n );\\n\\n _parameters = p;\\n growthSpeed = p.growthSpeed.toInt256();\\n sigmoidSpeed = p.sigmoidSpeed.toInt256();\\n spreadFactor = p.spreadFactor.toInt256();\\n maturitySpeed = p.maturitySpeed.toInt256();\\n floatingMaxUtilization = p.maxUtilization;\\n naturalUtilization = p.naturalUtilization;\\n\\n floatingCurveA =\\n ((p.naturalRate.mulWadUp(\\n uint256(((growthSpeed * (1e18 - int256(p.naturalUtilization / 2)).lnWad()) / 1e18).expWad())\\n ) - p.minRate) *\\n (p.maxUtilization - p.naturalUtilization) *\\n (p.maxUtilization)) /\\n (p.naturalUtilization * 1e18);\\n floatingCurveB = int256(p.minRate) - int256(floatingCurveA.divWadDown(p.maxUtilization));\\n\\n market = market_;\\n fixedCurveA = address(market_) != address(0) ? floatingCurveA : 0;\\n fixedCurveB = address(market_) != address(0) ? floatingCurveB : int256(0);\\n fixedMaxUtilization = address(market_) != address(0) ? p.maxUtilization : 0;\\n\\n timePreference = p.timePreference;\\n fixedAllocation = p.fixedAllocation;\\n maxRate = p.maxRate;\\n\\n auxSigmoid = int256(naturalUtilization.divWadDown(1e18 - naturalUtilization)).lnWad();\\n\\n // reverts if it's an invalid curve (such as one yielding a negative interest rate).\\n fixedRate(block.timestamp + FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL), 2, 1, 1, 2);\\n baseRate(1e18 - 1, 1e18 - 1);\\n }\\n\\n /// @notice fixed rate with given conditions, represented with 18 decimals.\\n /// @param maturity maturity of the pool.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param uFixed fixed utilization of the pool.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `base * spread` and `maxRate` with given conditions.\\n function fixedRate(\\n uint256 maturity,\\n uint256 maxPools,\\n uint256 uFixed,\\n uint256 uFloating,\\n uint256 uGlobal\\n ) public view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n if (uFixed > uGlobal) revert UtilizationExceeded();\\n if (uGlobal == 0) return baseRate(uFloating, 0);\\n\\n FixedVars memory v;\\n v.sqFNatPools = (maxPools * 1e18).divWadDown(fixedAllocation);\\n v.fNatPools = (v.sqFNatPools * 1e18).sqrt();\\n v.fixedFactor = (maxPools * uFixed).mulDivDown(1e36, uGlobal * fixedAllocation);\\n v.natPools =\\n ((2e18 - v.sqFNatPools.toInt256()) * 1e36) /\\n (v.fNatPools.toInt256() * (1e18 - v.fNatPools.toInt256()));\\n v.maturityFactor = (maturity - block.timestamp).divWadDown(\\n block.timestamp + maxPools * FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL)\\n );\\n\\n uint256 spread = (1e18 +\\n (((maturitySpeed * (v.maturityFactor).toInt256().lnWad()) / 1e18).expWad() *\\n (timePreference +\\n (spreadFactor *\\n ((v.natPools * (v.fixedFactor * 1e18).sqrt().toInt256()) /\\n 1e18 +\\n ((1e18 - v.natPools) * v.fixedFactor.toInt256()) /\\n 1e18 -\\n 1e18)) /\\n 1e18)) /\\n 1e18).toUint256();\\n uint256 base = baseRate(uFloating, uGlobal);\\n\\n if (base >= maxRate.divWadDown(spread)) return maxRate;\\n return base.mulWadUp(spread);\\n }\\n\\n /// @notice base rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the base rate, without capping.\\n function baseRate(uint256 uFloating, uint256 uGlobal) internal view returns (uint256) {\\n if (uFloating > uGlobal) revert UtilizationExceeded();\\n if (uGlobal >= 1e18) return type(uint256).max;\\n\\n uint256 r = ((floatingCurveA.divWadDown(floatingMaxUtilization - uFloating)).toInt256() + floatingCurveB)\\n .toUint256();\\n\\n if (uGlobal == 0) return r;\\n\\n int256 x = -((sigmoidSpeed * (int256(uGlobal.divWadDown(1e18 - uGlobal)).lnWad() - auxSigmoid)) / 1e18);\\n uint256 sigmoid = x > EXP_THRESHOLD ? 0 : uint256(1e18).divWadDown(1e18 + x.expWad().toUint256());\\n x = (-growthSpeed * (1e18 - sigmoid.mulWadDown(uGlobal)).toInt256().lnWad()) / 1e18;\\n uint256 globalFactor = ((x > EXP_THRESHOLD ? EXP_THRESHOLD : x).expWad()).toUint256();\\n\\n if (globalFactor > type(uint256).max / r) return type(uint256).max;\\n\\n return r.mulWadUp(globalFactor);\\n }\\n\\n /// @notice floating rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `baseRate` and `maxRate` with given conditions.\\n function floatingRate(uint256 uFloating, uint256 uGlobal) public view returns (uint256) {\\n return Math.min(baseRate(uFloating, uGlobal), maxRate);\\n }\\n\\n function parameters() external view returns (Parameters memory) {\\n return _parameters;\\n }\\n\\n // Legacy interface, kept for compatibility.\\n\\n /// @notice Market where the interest rate model is used. Keeps compatibility with legacy interest rate model.\\n Market public immutable market;\\n uint256 public immutable fixedCurveA;\\n int256 public immutable fixedCurveB;\\n uint256 public immutable fixedMaxUtilization;\\n\\n /// @dev Deprecated in favor of `floatingRate(uFloating, uGlobal)`.\\n function floatingRate(uint256) public view returns (uint256) {\\n uint256 floatingAssets = market.floatingAssets();\\n uint256 floatingDebt = market.floatingDebt();\\n return\\n floatingRate(\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed())\\n );\\n }\\n\\n /// @dev Deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function fixedBorrowRate(\\n uint256 maturity,\\n uint256 amount,\\n uint256 borrowed,\\n uint256 supplied,\\n uint256\\n ) external view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n uint256 floatingAssets = previewFloatingAssetsAverage(maturity);\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n uint256 newBorrowed = borrowed + amount;\\n uint256 backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, supplied), newBorrowed);\\n\\n return\\n fixedRate(\\n maturity,\\n market.maxFuturePools(),\\n fixedUtilization(supplied, newBorrowed, floatingAssets),\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed() + backupDebtAddition)\\n ).mulDivDown(maturity - block.timestamp, 365 days);\\n }\\n\\n /// @dev deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function minFixedRate(uint256, uint256, uint256) external view returns (uint256 rate, uint256 utilization) {\\n uint256 floatingAssets = market.floatingAssetsAverage();\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n utilization = globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed());\\n rate = baseRate(floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0, utilization);\\n }\\n\\n function previewFloatingAssetsAverage(uint256 maturity) internal view returns (uint256) {\\n FixedLib.Pool memory pool;\\n (pool.borrowed, pool.supplied, pool.unassignedEarnings, pool.lastAccrual) = market.fixedPools(maturity);\\n uint256 memFloatingAssets = market.floatingAssets() +\\n pool.unassignedEarnings.mulDivDown(block.timestamp - pool.lastAccrual, maturity - pool.lastAccrual);\\n uint256 memFloatingAssetsAverage = market.floatingAssetsAverage();\\n uint256 averageFactor = (1e18 -\\n (\\n -int256(\\n memFloatingAssets < memFloatingAssetsAverage\\n ? market.dampSpeedDown()\\n : market.dampSpeedUp() * (block.timestamp - market.lastAverageUpdate())\\n )\\n ).expWad()).toUint256();\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n function globalUtilization(\\n uint256 floatingAssets,\\n uint256 floatingDebt,\\n uint256 backupBorrowed\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 ? (floatingDebt + backupBorrowed).divWadUp(floatingAssets) : 0;\\n }\\n\\n function fixedUtilization(\\n uint256 supplied,\\n uint256 borrowed,\\n uint256 floatingAssets\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(floatingAssets) : 0;\\n }\\n}\\n\\nerror AlreadyMatured();\\nerror UtilizationExceeded();\\n\\nstruct Parameters {\\n uint256 minRate;\\n uint256 naturalRate;\\n uint256 maxUtilization;\\n uint256 naturalUtilization;\\n uint256 growthSpeed;\\n uint256 sigmoidSpeed;\\n uint256 spreadFactor;\\n uint256 maturitySpeed;\\n int256 timePreference;\\n uint256 fixedAllocation;\\n uint256 maxRate;\\n}\\n\\nstruct FixedVars {\\n uint256 sqFNatPools;\\n uint256 fNatPools;\\n uint256 fixedFactor;\\n int256 natPools;\\n uint256 maturityFactor;\\n}\\n\",\"keccak256\":\"0x9df5219d8182a14f123a725c73a586aed83c3d39c17b45a0a59e3923e4fe6532\",\"license\":\"BUSL-1.1\"},\"contracts/Market.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { PausableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { ERC4626, ERC20, SafeTransferLib } from \\\"solmate/src/mixins/ERC4626.sol\\\";\\nimport { InterestRateModel } from \\\"./InterestRateModel.sol\\\";\\nimport { RewardsController } from \\\"./RewardsController.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Auditor } from \\\"./Auditor.sol\\\";\\n\\ncontract Market is Initializable, AccessControlUpgradeable, PausableUpgradeable, ERC4626 {\\n using FixedPointMathLib for int256;\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint128;\\n using SafeTransferLib for ERC20;\\n using FixedLib for FixedLib.Pool;\\n using FixedLib for FixedLib.Position;\\n using FixedLib for uint256;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant EMERGENCY_ADMIN_ROLE = keccak256(\\\"EMERGENCY_ADMIN_ROLE\\\");\\n\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n Auditor public immutable auditor;\\n\\n /// @notice Tracks account's fixed deposit positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedDepositPositions;\\n /// @notice Tracks account's fixed borrow positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedBorrowPositions;\\n /// @notice Tracks fixed pools state by maturity.\\n mapping(uint256 => FixedLib.Pool) public fixedPools;\\n\\n /// @notice Tracks fixed deposit and borrow map and floating borrow shares of an account.\\n mapping(address => Account) public accounts;\\n\\n /// @notice Amount of assets lent by the floating pool to the fixed pools.\\n uint256 public floatingBackupBorrowed;\\n /// @notice Amount of assets lent by the floating pool to accounts.\\n uint256 public floatingDebt;\\n\\n /// @notice Accumulated earnings from extraordinary sources to be gradually distributed.\\n uint256 public earningsAccumulator;\\n /// @notice Rate per second to be charged to delayed fixed pools borrowers after maturity.\\n uint256 public penaltyRate;\\n /// @notice Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\\n uint256 public backupFeeRate;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\\n uint256 public dampSpeedUp;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\\n uint256 public dampSpeedDown;\\n\\n /// @notice Number of fixed pools to be active at the same time.\\n uint8 public maxFuturePools;\\n /// @notice Last time the accumulator distributed earnings.\\n uint32 public lastAccumulatorAccrual;\\n /// @notice Last time the floating debt was updated.\\n uint32 public lastFloatingDebtUpdate;\\n /// @notice Last time the floating assets average was updated.\\n uint32 public lastAverageUpdate;\\n\\n /// @notice Interest rate model contract used to get the borrow rates.\\n InterestRateModel public interestRateModel;\\n\\n /// @notice Factor used for gradual accrual of earnings to the floating pool.\\n uint128 public earningsAccumulatorSmoothFactor;\\n /// @notice Percentage factor that represents the liquidity reserves that can't be borrowed.\\n uint128 public reserveFactor;\\n\\n /// @notice Amount of floating assets deposited to the pool.\\n uint256 public floatingAssets;\\n /// @notice Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\\n uint256 public floatingAssetsAverage;\\n\\n /// @notice Total amount of floating borrow shares assigned to floating borrow accounts.\\n uint256 public totalFloatingBorrowShares;\\n\\n /// @dev gap from deprecated state.\\n /// @custom:oz-renamed-from floatingUtilization\\n uint256 private __gap;\\n\\n /// @notice Address of the treasury that will receive the allocated earnings.\\n address public treasury;\\n /// @notice Rate to be charged by the treasury to floating and fixed borrows.\\n uint256 public treasuryFeeRate;\\n\\n /// @notice Address of the rewards controller that will accrue rewards for accounts operating with the Market.\\n RewardsController public rewardsController;\\n\\n /// @notice Flag to prevent new borrows and deposits.\\n bool public isFrozen;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(ERC20 asset_, Auditor auditor_) ERC4626(asset_, \\\"\\\", \\\"\\\") {\\n auditor = auditor_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(\\n string calldata assetSymbol,\\n uint8 maxFuturePools_,\\n uint128 earningsAccumulatorSmoothFactor_,\\n InterestRateModel interestRateModel_,\\n uint256 penaltyRate_,\\n uint256 backupFeeRate_,\\n uint128 reserveFactor_,\\n uint256 dampSpeedUp_,\\n uint256 dampSpeedDown_\\n ) external initializer {\\n __AccessControl_init();\\n __Pausable_init();\\n\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n lastAverageUpdate = uint32(block.timestamp);\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setAssetSymbol(assetSymbol);\\n setMaxFuturePools(maxFuturePools_);\\n setEarningsAccumulatorSmoothFactor(earningsAccumulatorSmoothFactor_);\\n setInterestRateModel(interestRateModel_);\\n setPenaltyRate(penaltyRate_);\\n setBackupFeeRate(backupFeeRate_);\\n setReserveFactor(reserveFactor_);\\n setDampSpeed(dampSpeedUp_, dampSpeedDown_);\\n }\\n\\n /// @notice Borrows a certain amount from the floating pool.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return borrowShares shares corresponding to the borrowed assets.\\n function borrow(\\n uint256 assets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 borrowShares) {\\n spendAllowance(borrower, assets);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n\\n borrowShares = previewBorrow(assets);\\n\\n uint256 newFloatingDebt = floatingDebt + assets;\\n floatingDebt = newFloatingDebt;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed, also considering the reserves\\n if (floatingBackupBorrowed + newFloatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n\\n totalFloatingBorrowShares += borrowShares;\\n accounts[borrower].floatingBorrowShares += borrowShares;\\n\\n emit Borrow(msg.sender, receiver, borrower, assets, borrowShares);\\n emitMarketUpdate();\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Repays a certain amount of assets to the floating pool.\\n /// @param assets assets to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepay the actual amount that should be transferred into the protocol.\\n /// @return borrowShares subtracted shares from the borrower's accountability.\\n function repay(\\n uint256 assets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepay, uint256 borrowShares) {\\n (actualRepay, borrowShares) = noTransferRefund(previewRepay(assets), borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), actualRepay);\\n }\\n\\n /// @notice Repays a certain amount of shares to the floating pool.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return assets subtracted assets from the borrower's accountability.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function refund(\\n uint256 borrowShares,\\n address borrower\\n ) external whenNotPaused returns (uint256 assets, uint256 actualShares) {\\n (assets, actualShares) = noTransferRefund(borrowShares, borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Allows to (partially) repay a floating borrow. It does not transfer assets.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower the address of the account that has the debt.\\n /// @return assets the actual amount that should be transferred into the protocol.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function noTransferRefund(\\n uint256 borrowShares,\\n address borrower\\n ) internal returns (uint256 assets, uint256 actualShares) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n Account storage account = accounts[borrower];\\n uint256 accountBorrowShares = account.floatingBorrowShares;\\n actualShares = Math.min(borrowShares, accountBorrowShares);\\n assets = previewRefund(actualShares);\\n\\n if (assets == 0) revert ZeroRepay();\\n\\n floatingDebt -= assets;\\n account.floatingBorrowShares = accountBorrowShares - actualShares;\\n totalFloatingBorrowShares -= actualShares;\\n\\n emit Repay(msg.sender, borrower, assets, actualShares);\\n }\\n\\n /// @notice Deposits a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be deposited.\\n /// @param assets amount to receive from the msg.sender.\\n /// @param minAssetsRequired minimum amount of assets required by the depositor for the transaction to be accepted.\\n /// @param receiver address that will be able to withdraw the deposited assets.\\n /// @return positionAssets total amount of assets (principal + fee) to be withdrawn at maturity.\\n function depositAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 minAssetsRequired,\\n address receiver\\n ) external whenNotPaused whenNotFrozen returns (uint256 positionAssets) {\\n if (assets == 0) revert ZeroDeposit();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n floatingAssets += backupEarnings;\\n\\n (uint256 fee, uint256 backupFee) = pool.calculateDeposit(assets, backupFeeRate);\\n positionAssets = assets + fee;\\n if (positionAssets < minAssetsRequired) revert Disagreement();\\n\\n floatingBackupBorrowed -= pool.deposit(assets);\\n pool.unassignedEarnings -= fee + backupFee;\\n earningsAccumulator += backupFee;\\n\\n // update account's position\\n FixedLib.Position storage position = fixedDepositPositions[maturity][receiver];\\n\\n // if account doesn't have a current position, add it to the list\\n if (position.principal == 0) {\\n Account storage account = accounts[receiver];\\n account.fixedDeposits = account.fixedDeposits.setMaturity(maturity);\\n }\\n\\n position.principal += assets;\\n position.fee += fee;\\n\\n emit DepositAtMaturity(maturity, msg.sender, receiver, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Borrows a certain amount from a maturity.\\n /// @param maturity maturity date for repayment.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return assetsOwed total amount of assets (principal + fee) to be repaid at maturity.\\n function borrowAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 maxAssets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 assetsOwed) {\\n if (assets == 0) revert ZeroBorrow();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n {\\n uint256 backupDebtAddition = pool.borrow(assets);\\n if (backupDebtAddition != 0) {\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed + backupDebtAddition;\\n depositToTreasury(updateFloatingDebt());\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n }\\n uint256 fee;\\n {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, floatingBackupBorrowed)\\n );\\n fee = assets.mulWadDown(fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n }\\n assetsOwed = assets + fee;\\n\\n // validate that the account is not taking arbitrary fees\\n if (assetsOwed > maxAssets) revert Disagreement();\\n\\n spendAllowance(borrower, assetsOwed);\\n\\n {\\n // if account doesn't have a current position, add it to the list\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n if (position.principal == 0) {\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.setMaturity(maturity);\\n }\\n\\n // calculate what portion of the fees are to be accrued and what portion goes to earnings accumulator\\n (uint256 newUnassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(fee),\\n assets\\n );\\n if (newUnassignedEarnings != 0) pool.unassignedEarnings += newUnassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n fixedBorrowPositions[maturity][borrower] = FixedLib.Position(position.principal + assets, position.fee + fee);\\n }\\n\\n emit BorrowAtMaturity(maturity, msg.sender, receiver, borrower, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Withdraws a certain amount from a maturity.\\n /// @param maturity maturity date where the assets will be withdrawn.\\n /// @param positionAssets position size to be reduced.\\n /// @param minAssetsRequired minimum amount required by the account (if discount included for early withdrawal).\\n /// @param receiver address that will receive the withdrawn assets.\\n /// @param owner address that previously deposited the assets.\\n /// @return assetsDiscounted amount of assets withdrawn (can include a discount for early withdraw).\\n function withdrawAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 minAssetsRequired,\\n address receiver,\\n address owner\\n ) external whenNotPaused returns (uint256 assetsDiscounted) {\\n if (positionAssets == 0) revert ZeroWithdraw();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n FixedLib.Position memory position = fixedDepositPositions[maturity][owner];\\n\\n if (positionAssets > position.principal + position.fee) positionAssets = position.principal + position.fee;\\n\\n {\\n // remove the supply from the fixed rate pool\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed +\\n pool.withdraw(\\n FixedLib.Position(position.principal, position.fee).scaleProportionally(positionAssets).principal\\n );\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets) revert InsufficientProtocolLiquidity();\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n\\n // verify if there are any penalties/fee for the account because of early withdrawal, if so discount\\n if (block.timestamp < maturity) {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingBackupBorrowed = floatingBackupBorrowed;\\n\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, memFloatingBackupBorrowed)\\n );\\n assetsDiscounted = positionAssets.divWadDown(1e18 + fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n } else {\\n assetsDiscounted = positionAssets;\\n }\\n\\n if (assetsDiscounted < minAssetsRequired) revert Disagreement();\\n\\n spendAllowance(owner, assetsDiscounted);\\n\\n // all the fees go to unassigned or to the floating pool\\n (uint256 unassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(positionAssets - assetsDiscounted),\\n assetsDiscounted\\n );\\n pool.unassignedEarnings += unassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n // the account gets discounted the full amount\\n position.reduceProportionally(positionAssets);\\n if (position.principal | position.fee == 0) {\\n delete fixedDepositPositions[maturity][owner];\\n Account storage account = accounts[owner];\\n account.fixedDeposits = account.fixedDeposits.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedDepositPositions[maturity][owner] = position;\\n }\\n\\n emit WithdrawAtMaturity(maturity, msg.sender, receiver, owner, positionAssets, assetsDiscounted);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransfer(receiver, assetsDiscounted);\\n }\\n\\n /// @notice Repays a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be repaid.\\n /// @param positionAssets amount to be paid for the borrower's debt.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepayAssets the actual amount that was transferred into the protocol.\\n function repayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepayAssets) {\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n actualRepayAssets = noTransferRepayAtMaturity(maturity, positionAssets, maxAssets, borrower, true);\\n emitMarketUpdate();\\n\\n asset.safeTransferFrom(msg.sender, address(this), actualRepayAssets);\\n }\\n\\n /// @notice Allows to (partially) repay a fixed rate position. It does not transfer assets.\\n /// @param maturity the maturity to access the pool.\\n /// @param positionAssets the amount of debt of the pool that should be paid.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower the address of the account that has the debt.\\n /// @param canDiscount should early repay discounts be applied.\\n /// @return actualRepayAssets the actual amount that should be transferred into the protocol.\\n function noTransferRepayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower,\\n bool canDiscount\\n ) internal returns (uint256 actualRepayAssets) {\\n if (positionAssets == 0) revert ZeroRepay();\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n floatingAssets += backupEarnings;\\n\\n FixedLib.Position memory position = fixedBorrowPositions[maturity][borrower];\\n\\n uint256 debtCovered = Math.min(positionAssets, position.principal + position.fee);\\n\\n uint256 principalCovered = FixedLib\\n .Position(position.principal, position.fee)\\n .scaleProportionally(debtCovered)\\n .principal;\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n // early repayment allows a discount from the unassigned earnings\\n if (block.timestamp < maturity) {\\n if (canDiscount) {\\n // calculate the deposit fee considering the amount of debt the account'll pay\\n (uint256 discountFee, uint256 backupFee) = pool.calculateDeposit(principalCovered, backupFeeRate);\\n\\n // remove the fee from unassigned earnings\\n pool.unassignedEarnings -= discountFee + backupFee;\\n\\n // the fee charged to the fixed pool supplier goes to the earnings accumulator\\n earningsAccumulator += backupFee;\\n\\n // the fee gets discounted from the account through `actualRepayAssets`\\n actualRepayAssets = debtCovered - discountFee;\\n } else {\\n actualRepayAssets = debtCovered;\\n }\\n } else {\\n actualRepayAssets = debtCovered + debtCovered.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n\\n // all penalties go to the earnings accumulator\\n earningsAccumulator += actualRepayAssets - debtCovered;\\n }\\n\\n // verify that the account agrees to this discount or penalty\\n if (actualRepayAssets > maxAssets) revert Disagreement();\\n\\n // reduce the borrowed from the pool and might decrease the floating backup borrowed\\n floatingBackupBorrowed -= pool.repay(principalCovered);\\n\\n // update the account position\\n position.reduceProportionally(debtCovered);\\n if (position.principal | position.fee == 0) {\\n delete fixedBorrowPositions[maturity][borrower];\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedBorrowPositions[maturity][borrower] = position;\\n }\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, actualRepayAssets, debtCovered);\\n emitFixedEarningsUpdate(maturity);\\n }\\n\\n /// @notice Liquidates undercollateralized fixed/floating (or both) position(s).\\n /// @dev Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool,\\n /// or/and for multiple fixed pools, seizing a portion of borrower's collateral.\\n /// @param borrower account that has an outstanding debt across floating or fixed pools.\\n /// @param maxAssets maximum amount of debt that the liquidator is willing to accept. (it can be less)\\n /// @param seizeMarket market from which the collateral will be seized to give to the liquidator.\\n /// @return repaidAssets actual amount repaid.\\n function liquidate(\\n address borrower,\\n uint256 maxAssets,\\n Market seizeMarket\\n ) external whenNotPaused returns (uint256 repaidAssets) {\\n if (msg.sender == borrower) revert SelfLiquidation();\\n\\n maxAssets = auditor.checkLiquidation(this, seizeMarket, borrower, maxAssets);\\n if (maxAssets == 0) revert ZeroRepay();\\n\\n Account storage account = accounts[borrower];\\n\\n {\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0 && maxAssets != 0) {\\n if (packedMaturities & 1 != 0) {\\n uint256 actualRepay;\\n if (block.timestamp < maturity) {\\n actualRepay = noTransferRepayAtMaturity(maturity, maxAssets, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n } else {\\n uint256 position;\\n {\\n FixedLib.Position storage p = fixedBorrowPositions[maturity][borrower];\\n position = p.principal + p.fee;\\n }\\n uint256 debt = position + position.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n actualRepay = debt > maxAssets ? maxAssets.mulDivDown(position, debt) : maxAssets;\\n\\n if (actualRepay == 0) maxAssets = 0;\\n else {\\n actualRepay = noTransferRepayAtMaturity(maturity, actualRepay, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n }\\n }\\n repaidAssets += actualRepay;\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n\\n if (maxAssets != 0 && account.floatingBorrowShares != 0) {\\n uint256 borrowShares = previewRepay(maxAssets);\\n if (borrowShares != 0) {\\n (uint256 actualRepayAssets, ) = noTransferRefund(borrowShares, borrower);\\n repaidAssets += actualRepayAssets;\\n }\\n }\\n\\n // reverts on failure\\n (uint256 lendersAssets, uint256 seizeAssets) = auditor.calculateSeize(this, seizeMarket, borrower, repaidAssets);\\n earningsAccumulator += lendersAssets;\\n\\n if (address(seizeMarket) == address(this)) {\\n internalSeize(this, msg.sender, borrower, seizeAssets);\\n } else {\\n seizeMarket.seize(msg.sender, borrower, seizeAssets);\\n\\n emitMarketUpdate();\\n }\\n\\n emit Liquidate(msg.sender, borrower, repaidAssets, lendersAssets, seizeMarket, seizeAssets);\\n\\n auditor.handleBadDebt(borrower);\\n\\n asset.safeTransferFrom(msg.sender, address(this), repaidAssets + lendersAssets);\\n }\\n\\n /// @notice Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\\n /// @dev Can only be called from the auditor.\\n /// @param borrower account with insufficient collateral to be cleared the debt.\\n function clearBadDebt(address borrower) external {\\n if (msg.sender != address(auditor)) revert NotAuditor();\\n\\n floatingAssets += accrueAccumulatedEarnings();\\n Account storage account = accounts[borrower];\\n uint256 accumulator = earningsAccumulator;\\n uint256 totalBadDebt = 0;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 badDebt = position.principal + position.fee;\\n if (accumulator >= badDebt) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n accumulator -= badDebt;\\n totalBadDebt += badDebt;\\n floatingBackupBorrowed -= fixedPools[maturity].repay(position.principal);\\n delete fixedBorrowPositions[maturity][borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, badDebt, badDebt);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n if (account.floatingBorrowShares != 0 && (accumulator = previewRepay(accumulator)) != 0) {\\n (uint256 badDebt, ) = noTransferRefund(accumulator, borrower);\\n totalBadDebt += badDebt;\\n }\\n if (totalBadDebt != 0) {\\n earningsAccumulator -= totalBadDebt;\\n emit SpreadBadDebt(borrower, totalBadDebt);\\n }\\n emitMarketUpdate();\\n }\\n\\n /// @notice Public function to seize a certain amount of assets.\\n /// @dev Public function for liquidator to seize borrowers assets in the floating pool.\\n /// This function will only be called from another Market, on `liquidation` calls.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function seize(address liquidator, address borrower, uint256 assets) external whenNotPaused {\\n internalSeize(Market(msg.sender), liquidator, borrower, assets);\\n }\\n\\n /// @notice Internal function to seize a certain amount of assets.\\n /// @dev Internal function for liquidator to seize borrowers assets in the floating pool.\\n /// Will only be called from this Market on `liquidation` or through `seize` calls from another Market.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param seizeMarket address which is calling the seize function (see `seize` public function).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function internalSeize(Market seizeMarket, address liquidator, address borrower, uint256 assets) internal {\\n if (assets == 0) revert ZeroWithdraw();\\n\\n // reverts on failure\\n auditor.checkSeize(seizeMarket, this);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(borrower);\\n uint256 shares = previewWithdraw(assets);\\n beforeWithdraw(assets, shares);\\n _burn(borrower, shares);\\n emit Withdraw(msg.sender, liquidator, borrower, assets, shares);\\n emit Seize(liquidator, borrower, assets);\\n emitMarketUpdate();\\n\\n asset.safeTransfer(liquidator, assets);\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be withdrawn from the floating pool.\\n function beforeWithdraw(uint256 assets, uint256) internal override whenNotPaused {\\n updateFloatingAssetsAverage();\\n depositToTreasury(updateFloatingDebt());\\n uint256 earnings = accrueAccumulatedEarnings();\\n uint256 newFloatingAssets = floatingAssets + earnings - assets;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed\\n if (floatingBackupBorrowed + floatingDebt > newFloatingAssets) revert InsufficientProtocolLiquidity();\\n floatingAssets = newFloatingAssets;\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be deposited to the floating pool.\\n function afterDeposit(uint256 assets, uint256) internal override whenNotPaused whenNotFrozen {\\n updateFloatingAssetsAverage();\\n uint256 treasuryFee = updateFloatingDebt();\\n uint256 earnings = accrueAccumulatedEarnings();\\n floatingAssets += earnings + assets;\\n depositToTreasury(treasuryFee);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Withdraws the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param assets amount of underlying to be withdrawn.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return shares amount of shares redeemed for underlying asset.\\n function withdraw(uint256 assets, address receiver, address owner) public override returns (uint256 shares) {\\n auditor.checkShortfall(this, owner, assets);\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n shares = super.withdraw(assets, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Redeems the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param shares amount of shares to be redeemed for underlying asset.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return assets amount of underlying asset that was withdrawn.\\n function redeem(uint256 shares, address receiver, address owner) public override returns (uint256 assets) {\\n auditor.checkShortfall(this, owner, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n assets = super.redeem(shares, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n function _mint(address to, uint256 amount) internal override {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(to);\\n super._mint(to, amount);\\n }\\n\\n /// @notice Moves amount of shares from the caller's account to `to`.\\n /// @dev Makes sure that the caller doesn't have shortfall after transferring.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transfer(address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, msg.sender, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(msg.sender);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transfer(to, shares);\\n }\\n\\n /// @notice Moves amount of shares from `from` to `to` using the allowance mechanism.\\n /// @dev Makes sure that `from` address doesn't have shortfall after transferring.\\n /// @param from address from which the assets will be transferred.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transferFrom(address from, address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, from, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(from);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transferFrom(from, to, shares);\\n }\\n\\n /// @notice Gets current snapshot for an account across all maturities.\\n /// @param account account to return status snapshot in the specified maturity date.\\n /// @return the amount deposited to the floating pool and the amount owed to floating and fixed pools.\\n function accountSnapshot(address account) external view returns (uint256, uint256) {\\n return (convertToAssets(balanceOf[account]), previewDebt(account));\\n }\\n\\n /// @notice Gets all borrows and penalties for an account.\\n /// @param borrower account to return status snapshot for fixed and floating borrows.\\n /// @return debt the total debt, denominated in number of assets.\\n function previewDebt(address borrower) public view returns (uint256 debt) {\\n Account storage account = accounts[borrower];\\n uint256 memPenaltyRate = penaltyRate;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n // calculate all maturities using the base maturity and the following bits representing the following intervals\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 positionAssets = position.principal + position.fee;\\n\\n debt += positionAssets;\\n\\n if (block.timestamp > maturity) {\\n debt += positionAssets.mulWadDown((block.timestamp - maturity) * memPenaltyRate);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n // calculate floating borrowed debt\\n uint256 shares = account.floatingBorrowShares;\\n if (shares != 0) debt += previewRefund(shares);\\n }\\n\\n /// @notice Charges treasury fee to certain amount of earnings.\\n /// @param earnings amount of earnings.\\n /// @return earnings minus the fees charged by the treasury.\\n function chargeTreasuryFee(uint256 earnings) internal returns (uint256) {\\n uint256 fee = earnings.mulWadDown(treasuryFeeRate);\\n depositToTreasury(fee);\\n return earnings - fee;\\n }\\n\\n /// @notice Collects all earnings that are charged to borrowers that make use of fixed pool deposits' assets.\\n /// @param earnings amount of earnings.\\n function collectFreeLunch(uint256 earnings) internal {\\n if (earnings == 0) return;\\n\\n if (treasuryFeeRate != 0) {\\n depositToTreasury(earnings);\\n } else {\\n earningsAccumulator += earnings;\\n }\\n }\\n\\n /// @notice Deposits amount of assets on behalf of the treasury address.\\n /// @param fee amount of assets to be deposited.\\n function depositToTreasury(uint256 fee) internal {\\n if (fee != 0) {\\n _mint(treasury, previewDeposit(fee));\\n floatingAssets += fee;\\n }\\n }\\n\\n /// @notice Calculates the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings to be distributed from the accumulator.\\n function accumulatedEarnings() internal view returns (uint256 earnings) {\\n uint256 elapsed = block.timestamp - lastAccumulatorAccrual;\\n if (elapsed == 0) return 0;\\n return\\n earningsAccumulator.mulDivDown(\\n elapsed,\\n elapsed + earningsAccumulatorSmoothFactor.mulWadDown(maxFuturePools * FixedLib.INTERVAL)\\n );\\n }\\n\\n /// @notice Accrues the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings distributed from the accumulator.\\n function accrueAccumulatedEarnings() internal returns (uint256 earnings) {\\n earnings = accumulatedEarnings();\\n\\n earningsAccumulator -= earnings;\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n emit AccumulatorAccrual(block.timestamp);\\n }\\n\\n /// @notice Updates the `floatingAssetsAverage`.\\n function updateFloatingAssetsAverage() internal {\\n floatingAssetsAverage = previewFloatingAssetsAverage();\\n lastAverageUpdate = uint32(block.timestamp);\\n }\\n\\n /// @notice Returns the current `floatingAssetsAverage` without updating the storage variable.\\n /// @return projected `floatingAssetsAverage`.\\n function previewFloatingAssetsAverage() public view returns (uint256) {\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 memFloatingAssetsAverage = floatingAssetsAverage;\\n uint256 dampSpeedFactor = memFloatingAssets < memFloatingAssetsAverage ? dampSpeedDown : dampSpeedUp;\\n uint256 averageFactor = uint256(1e18 - (-int256(dampSpeedFactor * (block.timestamp - lastAverageUpdate))).expWad());\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n /// @notice Updates the floating pool borrows' variables.\\n /// @return treasuryFee amount of fees charged by the treasury to the new calculated floating debt.\\n function updateFloatingDebt() internal returns (uint256 treasuryFee) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 utilization = floatingUtilization(memFloatingAssets, memFloatingDebt);\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(utilization, globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed))\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n\\n memFloatingDebt += newDebt;\\n treasuryFee = newDebt.mulWadDown(treasuryFeeRate);\\n floatingAssets = memFloatingAssets + newDebt - treasuryFee;\\n floatingDebt = memFloatingDebt;\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n emit FloatingDebtUpdate(block.timestamp, utilization);\\n }\\n\\n /// @notice Calculates the total floating debt, considering elapsed time since last update and current interest rate.\\n /// @return actual floating debt plus projected interest.\\n function totalFloatingBorrowAssets() public view returns (uint256) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(\\n floatingUtilization(memFloatingAssets, memFloatingDebt),\\n globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed)\\n )\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n return memFloatingDebt + newDebt;\\n }\\n\\n /// @notice Calculates the floating pool balance plus earnings to be accrued at current timestamp\\n /// from maturities and accumulator.\\n /// @return actual floatingAssets plus earnings to be accrued at current timestamp.\\n function totalAssets() public view override returns (uint256) {\\n unchecked {\\n uint256 backupEarnings = 0;\\n\\n uint256 latestMaturity = block.timestamp - (block.timestamp % FixedLib.INTERVAL);\\n uint256 maxMaturity = latestMaturity + maxFuturePools * FixedLib.INTERVAL;\\n\\n for (uint256 maturity = latestMaturity; maturity <= maxMaturity; maturity += FixedLib.INTERVAL) {\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (maturity > lastAccrual) {\\n backupEarnings += block.timestamp < maturity\\n ? pool.unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual)\\n : pool.unassignedEarnings;\\n }\\n }\\n\\n return\\n floatingAssets +\\n backupEarnings +\\n accumulatedEarnings() +\\n (totalFloatingBorrowAssets() - floatingDebt).mulWadDown(1e18 - treasuryFeeRate);\\n }\\n }\\n\\n /// @notice Simulates the effects of a borrow at the current time, given current contract conditions.\\n /// @param assets amount of assets to borrow.\\n /// @return amount of shares that will be asigned to the account after the borrow.\\n function previewBorrow(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a repay at the current time, given current contract conditions.\\n /// @param assets amount of assets to repay.\\n /// @return amount of shares that will be subtracted from the account after the repay.\\n function previewRepay(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a refund at the current time, given current contract conditions.\\n /// @param shares amount of shares to subtract from caller's accountability.\\n /// @return amount of assets that will be repaid.\\n function previewRefund(uint256 shares) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalFloatingBorrowAssets(), supply);\\n }\\n\\n /// @notice Checks msg.sender's allowance over account's assets.\\n /// @param account account in which the allowance will be checked.\\n /// @param assets assets from account that msg.sender wants to operate on.\\n function spendAllowance(address account, uint256 assets) internal {\\n if (msg.sender != account) {\\n uint256 allowed = allowance[account][msg.sender]; // saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[account][msg.sender] = allowed - previewWithdraw(assets);\\n }\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed amount of the fixed pool.\\n function fixedPoolBorrowed(uint256 maturity) external view returns (uint256) {\\n return fixedPools[maturity].borrowed;\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed and supplied amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed and supplied amount of the fixed pool.\\n function fixedPoolBalance(uint256 maturity) external view returns (uint256, uint256) {\\n return (fixedPools[maturity].borrowed, fixedPools[maturity].supplied);\\n }\\n\\n /// @notice Retrieves fixed utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function fixedUtilization(uint256 supplied, uint256 borrowed, uint256 assets) internal pure returns (uint256) {\\n return assets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves global utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function globalUtilization(uint256 assets, uint256 debt, uint256 backupBorrowed) internal pure returns (uint256) {\\n return assets != 0 ? (debt + backupBorrowed).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves floating utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function floatingUtilization(uint256 assets, uint256 debt) internal pure returns (uint256) {\\n return assets != 0 ? debt.divWadUp(assets) : 0;\\n }\\n\\n /// @notice Emits MarketUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitMarketUpdate() internal {\\n emit MarketUpdate(\\n block.timestamp,\\n totalSupply,\\n floatingAssets,\\n totalFloatingBorrowShares,\\n floatingDebt,\\n earningsAccumulator\\n );\\n }\\n\\n /// @notice Emits FixedEarningsUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitFixedEarningsUpdate(uint256 maturity) internal {\\n emit FixedEarningsUpdate(block.timestamp, maturity, fixedPools[maturity].unassignedEarnings);\\n }\\n\\n /// @notice Sets name and symbol for the Market.\\n /// @param assetSymbol the symbol for the underlying asset.\\n function setAssetSymbol(string calldata assetSymbol) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n name = string.concat(\\\"exactly \\\", assetSymbol);\\n symbol = string.concat(\\\"exa\\\", assetSymbol);\\n }\\n\\n /// @notice Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially\\n /// providing liquidity.\\n /// @param backupFeeRate_ percentage amount represented with 18 decimals.\\n function setBackupFeeRate(uint256 backupFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n backupFeeRate = backupFeeRate_;\\n emit BackupFeeRateSet(backupFeeRate_);\\n }\\n\\n /// @notice Sets the damp speed used to update the floatingAssetsAverage.\\n /// @param up damp speed up, represented with 18 decimals.\\n /// @param down damp speed down, represented with 18 decimals.\\n function setDampSpeed(uint256 up, uint256 down) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n updateFloatingAssetsAverage();\\n dampSpeedUp = up;\\n dampSpeedDown = down;\\n emit DampSpeedSet(up, down);\\n }\\n\\n /// @notice Sets the factor used when smoothly accruing earnings to the floating pool.\\n /// @param earningsAccumulatorSmoothFactor_ represented with 18 decimals.\\n function setEarningsAccumulatorSmoothFactor(\\n uint128 earningsAccumulatorSmoothFactor_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n floatingAssets += accrueAccumulatedEarnings();\\n emitMarketUpdate();\\n earningsAccumulatorSmoothFactor = earningsAccumulatorSmoothFactor_;\\n emit EarningsAccumulatorSmoothFactorSet(earningsAccumulatorSmoothFactor_);\\n }\\n\\n /// @notice Sets the interest rate model to be used to calculate rates.\\n /// @param interestRateModel_ new interest rate model.\\n function setInterestRateModel(InterestRateModel interestRateModel_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(interestRateModel) != address(0)) depositToTreasury(updateFloatingDebt());\\n\\n interestRateModel = interestRateModel_;\\n emitMarketUpdate();\\n emit InterestRateModelSet(interestRateModel_);\\n }\\n\\n /// @notice Sets the rewards controller to update account rewards when operating with the Market.\\n /// @param rewardsController_ new rewards controller.\\n function setRewardsController(RewardsController rewardsController_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n rewardsController = rewardsController_;\\n emit RewardsControllerSet(rewardsController_);\\n }\\n\\n /// @notice Sets the protocol's max future pools for fixed borrowing and lending.\\n /// @dev If value is decreased, VALID maturities will become NOT_READY.\\n /// @param futurePools number of pools to be active at the same time.\\n function setMaxFuturePools(uint8 futurePools) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n maxFuturePools = futurePools;\\n emit MaxFuturePoolsSet(futurePools);\\n }\\n\\n /// @notice Sets the penalty rate per second.\\n /// @param penaltyRate_ percentage represented with 18 decimals.\\n function setPenaltyRate(uint256 penaltyRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n penaltyRate = penaltyRate_;\\n emit PenaltyRateSet(penaltyRate_);\\n }\\n\\n /// @notice Sets the percentage that represents the liquidity reserves that can't be borrowed.\\n /// @param reserveFactor_ parameter represented with 18 decimals.\\n function setReserveFactor(uint128 reserveFactor_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n reserveFactor = reserveFactor_;\\n emit ReserveFactorSet(reserveFactor_);\\n }\\n\\n /// @notice Sets the treasury variables.\\n /// @param treasury_ address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate_ represented with 18 decimals.\\n function setTreasury(address treasury_, uint256 treasuryFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n depositToTreasury(updateFloatingDebt());\\n treasury = treasury_;\\n treasuryFeeRate = treasuryFeeRate_;\\n emit TreasurySet(treasury_, treasuryFeeRate_);\\n }\\n\\n /// @notice Sets the pause state to true in case of emergency, triggered by an authorized account.\\n function pause() external onlyPausingRoles {\\n _pause();\\n }\\n\\n /// @notice Sets the pause state to false when threat is gone, triggered by an authorized account.\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @notice Sets `isFrozen` state, triggered by an authorized account.\\n function setFrozen(bool isFrozen_) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (isFrozen == isFrozen_) return;\\n isFrozen = isFrozen_;\\n emit Frozen(msg.sender, isFrozen_);\\n }\\n\\n /// @dev Throws if the market is frozen.\\n function requireNotFrozen() internal view {\\n if (isFrozen) revert MarketFrozen();\\n }\\n\\n /// @dev Modifier to make a function callable only when the market is not frozen.\\n modifier whenNotFrozen() {\\n requireNotFrozen();\\n _;\\n }\\n\\n /// @dev Throws if the caller is not an `EMERGENCY_ADMIN_ROLE` or `PAUSER_ROLE`.\\n function requirePausingRoles() internal view {\\n if (!hasRole(EMERGENCY_ADMIN_ROLE, msg.sender) && !hasRole(PAUSER_ROLE, msg.sender)) {\\n revert NotPausingRole();\\n }\\n }\\n\\n /// @dev Modifier to make a function callable only by pausing roles.\\n modifier onlyPausingRoles() {\\n requirePausingRoles();\\n _;\\n }\\n\\n /// @notice Event emitted when an account borrows amount of assets from a floating pool.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of assets that were borrowed.\\n /// @param shares amount of borrow shares assigned to the account.\\n event Borrow(\\n address indexed caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /// @notice Emitted when an account repays amount of assets to a floating pool.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of assets that was repaid.\\n /// @param shares amount of borrow shares that were subtracted from the account's accountability.\\n event Repay(address indexed caller, address indexed borrower, uint256 assets, uint256 shares);\\n\\n /// @notice Emitted when an account deposits an amount of an asset to a certain fixed rate pool,\\n /// collecting fees at the end of the period.\\n /// @param maturity maturity at which the account will be able to collect his deposit + his fee.\\n /// @param caller address which deposited the assets.\\n /// @param owner address that will be able to withdraw the deposited assets.\\n /// @param assets amount of the asset that were deposited.\\n /// @param fee is the extra amount that it will be collected at maturity.\\n event DepositAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed owner,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account withdraws from a fixed rate pool.\\n /// @param maturity maturity where the account withdraw its deposits.\\n /// @param caller address which withdraw the asset.\\n /// @param receiver address which will be collecting the assets.\\n /// @param owner address which had the assets withdrawn.\\n /// @param positionAssets position size reduced.\\n /// @param assets amount of assets withdrawn (can include a discount for early withdraw).\\n event WithdrawAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 positionAssets,\\n uint256 assets\\n );\\n\\n /// @notice Emitted when an account borrows amount of an asset from a certain maturity date.\\n /// @param maturity maturity in which the account will have to repay the loan.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of the asset that were borrowed.\\n /// @param fee extra amount that will need to be paid at maturity.\\n event BorrowAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account repays its borrows after maturity.\\n /// @param maturity maturity where the account repaid its borrowed amounts.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount that was repaid.\\n /// @param positionAssets amount of the debt that was covered in this repayment (penalties could have been repaid).\\n event RepayAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed borrower,\\n uint256 assets,\\n uint256 positionAssets\\n );\\n\\n /// @notice Emitted when an account's position had a liquidation.\\n /// @param receiver address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of the asset that were repaid.\\n /// @param lendersAssets incentive paid to lenders.\\n /// @param seizeMarket address of the asset that were seized by the liquidator.\\n /// @param seizedAssets amount seized of the collateral.\\n event Liquidate(\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 lendersAssets,\\n Market indexed seizeMarket,\\n uint256 seizedAssets\\n );\\n\\n /// @notice Emitted when an account's collateral has been seized.\\n /// @param liquidator address which seized this collateral.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount seized of the collateral.\\n event Seize(address indexed liquidator, address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when an account is cleared from bad debt.\\n /// @param borrower address which was cleared from bad debt.\\n /// @param assets amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\\n event SpreadBadDebt(address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when the backupFeeRate parameter is changed by admin.\\n /// @param backupFeeRate rate charged to the fixed pools to be accrued by the floating depositors.\\n event BackupFeeRateSet(uint256 backupFeeRate);\\n\\n /// @notice Emitted when the damp speeds are changed by admin.\\n /// @param dampSpeedUp represented with 18 decimals.\\n /// @param dampSpeedDown represented with 18 decimals.\\n event DampSpeedSet(uint256 dampSpeedUp, uint256 dampSpeedDown);\\n\\n /// @notice Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\\n /// @param earningsAccumulatorSmoothFactor factor represented with 18 decimals.\\n event EarningsAccumulatorSmoothFactorSet(uint256 earningsAccumulatorSmoothFactor);\\n\\n /// @notice Emitted when the interestRateModel is changed by admin.\\n /// @param interestRateModel new interest rate model to be used to calculate rates.\\n event InterestRateModelSet(InterestRateModel indexed interestRateModel);\\n\\n /// @notice Emitted when the maxFuturePools is changed by admin.\\n /// @param maxFuturePools represented with 0 decimals.\\n event MaxFuturePoolsSet(uint256 maxFuturePools);\\n\\n /// @notice Emitted when the penaltyRate is changed by admin.\\n /// @param penaltyRate penaltyRate percentage per second represented with 18 decimals.\\n event PenaltyRateSet(uint256 penaltyRate);\\n\\n /// @notice Emitted when the reserveFactor is changed by admin.\\n /// @param reserveFactor reserveFactor percentage.\\n event ReserveFactorSet(uint256 reserveFactor);\\n\\n /// @notice Emitted when the treasury variables are changed by admin.\\n /// @param treasury address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate represented with 18 decimals.\\n event TreasurySet(address indexed treasury, uint256 treasuryFeeRate);\\n\\n /// @notice Emitted when the rewardsController is changed by admin.\\n /// @param rewardsController new rewards controller to update account rewards when operating with the Market.\\n event RewardsControllerSet(RewardsController indexed rewardsController);\\n\\n /// @notice Emitted when market state is updated.\\n /// @param timestamp current timestamp.\\n /// @param floatingDepositShares total floating supply shares.\\n /// @param floatingAssets total floating supply assets.\\n /// @param floatingBorrowShares total floating borrow shares.\\n /// @param floatingDebt total floating borrow assets.\\n /// @param earningsAccumulator earnings accumulator.\\n event MarketUpdate(\\n uint256 timestamp,\\n uint256 floatingDepositShares,\\n uint256 floatingAssets,\\n uint256 floatingBorrowShares,\\n uint256 floatingDebt,\\n uint256 earningsAccumulator\\n );\\n\\n /// @notice Emitted when the earnings of a maturity are updated.\\n /// @param timestamp current timestamp.\\n /// @param maturity maturity date where the earnings were updated.\\n /// @param unassignedEarnings pending unassigned earnings.\\n event FixedEarningsUpdate(uint256 timestamp, uint256 indexed maturity, uint256 unassignedEarnings);\\n\\n /// @notice Emitted when accumulator distributes earnings.\\n /// @param timestamp current timestamp.\\n event AccumulatorAccrual(uint256 timestamp);\\n\\n /// @notice Emitted when the floating debt is updated.\\n /// @param timestamp current timestamp.\\n /// @param utilization new floating utilization.\\n event FloatingDebtUpdate(uint256 timestamp, uint256 utilization);\\n\\n /// @notice Emitted when `account` sets the `isFrozen` flag.\\n event Frozen(address indexed account, bool isFrozen);\\n\\n /// @notice Stores fixed deposits and fixed borrows map and floating borrow shares of an account.\\n /// @param fixedDeposits encoded map maturity dates where the account supplied to.\\n /// @param fixedBorrows encoded map maturity dates where the account borrowed from.\\n /// @param floatingBorrowShares number of floating borrow shares assigned to the account.\\n struct Account {\\n uint256 fixedDeposits;\\n uint256 fixedBorrows;\\n uint256 floatingBorrowShares;\\n }\\n}\\n\\nerror Disagreement();\\nerror InsufficientProtocolLiquidity();\\nerror MarketFrozen();\\nerror NotAuditor();\\nerror NotPausingRole();\\nerror SelfLiquidation();\\nerror ZeroBorrow();\\nerror ZeroDeposit();\\nerror ZeroRepay();\\nerror ZeroWithdraw();\\n\",\"keccak256\":\"0xdf09a69098df74396067954be63e073deb5d0b9222cae1a1a3b9c2bf69678429\",\"license\":\"BUSL-1.1\"},\"contracts/RewardsController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { SafeTransferLib } from \\\"solmate/src/utils/SafeTransferLib.sol\\\";\\nimport { ERC20 } from \\\"solmate/src/tokens/ERC20.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract RewardsController is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint64;\\n using FixedPointMathLib for int256;\\n using SafeTransferLib for ERC20;\\n\\n /// @notice Max utilization supported by the sigmoid function not to cause a division by zero (1e18 = WAD).\\n uint256 public constant UTILIZATION_CAP = 1e18 - 1;\\n /// @notice Tracks the reward distribution data for a given market.\\n mapping(Market => Distribution) public distribution;\\n /// @notice Tracks enabled asset rewards.\\n mapping(ERC20 => bool) public rewardEnabled;\\n /// @notice Stores registered asset rewards.\\n ERC20[] public rewardList;\\n /// @notice Stores Markets with distributions set.\\n Market[] public marketList;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev Can only be called once.\\n function initialize() external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded deposit.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleDeposit(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n ops[0] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n update(account, market, dist.availableRewards[r], ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded borrow.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleBorrow(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n (, , uint256 accountFloatingBorrowShares) = market.accounts(account);\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n ERC20 reward = dist.availableRewards[r];\\n ops[0] = AccountOperation({\\n operation: true,\\n balance: accountFloatingBorrowShares + accountFixedBorrowShares(market, account, dist.rewards[reward].start)\\n });\\n update(account, Market(msg.sender), reward, ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Claims all `msg.sender` rewards to the given account.\\n /// @param to The address to send the rewards to.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claimAll(address to) external returns (ERC20[] memory rewardsList, uint256[] memory claimedAmounts) {\\n return claim(allMarketsOperations(), to, rewardList);\\n }\\n\\n /// @notice Claims `msg.sender` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param to The address to send the rewards to.\\n /// @param rewardsList The list of rewards assets to claim.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n address to,\\n ERC20[] memory rewardsList\\n ) public claimSender returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n uint256 rewardsCount = rewardsList.length;\\n claimedAmounts = new uint256[](rewardsCount);\\n address sender = _claimSender;\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n uint256 availableRewards = dist.availableRewardsCount;\\n for (uint128 r = 0; r < availableRewards; ) {\\n update(\\n sender,\\n marketOperation.market,\\n dist.availableRewards[r],\\n accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n sender,\\n dist.rewards[dist.availableRewards[r]].start\\n )\\n );\\n unchecked {\\n ++r;\\n }\\n }\\n for (uint256 r = 0; r < rewardsCount; ) {\\n RewardData storage rewardData = dist.rewards[rewardsList[r]];\\n for (uint256 o = 0; o < marketOperation.operations.length; ) {\\n uint256 rewardAmount = rewardData.accounts[sender][marketOperation.operations[o]].accrued;\\n if (rewardAmount != 0) {\\n claimedAmounts[r] += rewardAmount;\\n rewardData.accounts[sender][marketOperation.operations[o]].accrued = 0;\\n }\\n unchecked {\\n ++o;\\n }\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 r = 0; r < rewardsList.length; ) {\\n uint256 claimedAmount = claimedAmounts[r];\\n if (claimedAmount > 0) {\\n rewardsList[r].safeTransfer(to, claimedAmount);\\n emit Claim(sender, rewardsList[r], to, claimedAmount);\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n return (rewardsList, claimedAmounts);\\n }\\n\\n /// @notice Claims `permit.owner` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param permit Arguments and signature from `permit.owner`.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n ClaimPermit calldata permit\\n ) external permitSender(permit) returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n return claim(marketOps, msg.sender, permit.assets);\\n }\\n\\n /// @notice Gets the configuration of a given distribution.\\n /// @param market The market to get the distribution configuration for.\\n /// @param reward The reward asset.\\n /// @return The distribution configuration.\\n function rewardConfig(Market market, ERC20 reward) external view returns (Config memory) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return\\n Config({\\n market: market,\\n reward: reward,\\n priceFeed: rewardData.priceFeed,\\n start: rewardData.start,\\n distributionPeriod: rewardData.end - rewardData.start,\\n targetDebt: rewardData.targetDebt,\\n totalDistribution: rewardData.totalDistribution,\\n undistributedFactor: rewardData.undistributedFactor,\\n flipSpeed: rewardData.flipSpeed,\\n compensationFactor: rewardData.compensationFactor,\\n transitionFactor: rewardData.transitionFactor,\\n borrowAllocationWeightFactor: rewardData.borrowAllocationWeightFactor,\\n depositAllocationWeightAddend: rewardData.depositAllocationWeightAddend,\\n depositAllocationWeightFactor: rewardData.depositAllocationWeightFactor\\n });\\n }\\n\\n /// @notice Gets the amount of reward assets that are being distributed for a Market.\\n /// @param market Market to get the number of available rewards to distribute.\\n /// @return The amount reward assets set to a Market.\\n function availableRewardsCount(Market market) external view returns (uint256) {\\n return distribution[market].availableRewardsCount;\\n }\\n\\n /// @notice Gets the account data of a given account, Market, operation and reward asset.\\n /// @param account The account to get the operation data from.\\n /// @param market The market in which the operation was made.\\n /// @param operation True if the operation was a borrow, false if it was a deposit.\\n /// @param reward The reward asset.\\n /// @return accrued The accrued amount.\\n /// @return index The account index.\\n function accountOperation(\\n address account,\\n Market market,\\n bool operation,\\n ERC20 reward\\n ) external view returns (uint256, uint256) {\\n Account storage operationAccount = distribution[market].rewards[reward].accounts[account][operation];\\n return (operationAccount.accrued, operationAccount.index);\\n }\\n\\n /// @notice Gets the distribution `start`, `end` and `lastUpdate` value of a given market and reward.\\n /// @param market The market to get the distribution times.\\n /// @param reward The reward asset.\\n /// @return The distribution `start`, `end` and `lastUpdate` time.\\n function distributionTime(Market market, ERC20 reward) external view returns (uint32, uint32, uint32) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.start, rewardData.end, rewardData.lastUpdate);\\n }\\n\\n /// @notice Retrieves all rewards addresses.\\n function allRewards() external view returns (ERC20[] memory) {\\n return rewardList;\\n }\\n\\n /// @notice Gets all market and operations.\\n /// @return marketOps The list of market operations.\\n function allMarketsOperations() public view returns (MarketOperation[] memory marketOps) {\\n Market[] memory markets = marketList;\\n marketOps = new MarketOperation[](markets.length);\\n for (uint256 m = 0; m < markets.length; ) {\\n bool[] memory ops = new bool[](2);\\n ops[0] = true;\\n ops[1] = false;\\n marketOps[m] = MarketOperation({ market: markets[m], operations: ops });\\n unchecked {\\n ++m;\\n }\\n }\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account and reward asset.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function allClaimable(address account, ERC20 reward) external view returns (uint256 unclaimedRewards) {\\n return claimable(allMarketsOperations(), account, reward);\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account, Market operations and reward asset.\\n /// @param marketOps The list of Market operations to get the accrued and pending rewards from.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function claimable(\\n MarketOperation[] memory marketOps,\\n address account,\\n ERC20 reward\\n ) public view returns (uint256 unclaimedRewards) {\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n RewardData storage rewardData = dist.rewards[reward];\\n if (dist.availableRewardsCount == 0) {\\n unchecked {\\n ++i;\\n }\\n continue;\\n }\\n\\n AccountOperation[] memory ops = accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n account,\\n rewardData.start\\n );\\n uint256 balance;\\n for (uint256 o = 0; o < ops.length; ) {\\n unclaimedRewards += rewardData.accounts[account][ops[o].operation].accrued;\\n balance += ops[o].balance;\\n unchecked {\\n ++o;\\n }\\n }\\n if (balance > 0) {\\n unclaimedRewards += pendingRewards(\\n account,\\n reward,\\n AccountMarketOperation({ market: marketOperation.market, accountOperations: ops })\\n );\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Iterates and accrues all rewards for the operations of the given account in the given market.\\n /// @param account The account to accrue the rewards for.\\n /// @param market The Market in which the operations where made.\\n /// @param reward The reward asset.\\n /// @param ops The operations to accrue the rewards for.\\n function update(address account, Market market, ERC20 reward, AccountOperation[] memory ops) internal {\\n uint256 baseUnit = distribution[market].baseUnit;\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n {\\n uint256 lastUpdate = rewardData.lastUpdate;\\n // `lastUpdate` can be greater than `block.timestamp` if distribution is set to start on a future date\\n if (block.timestamp > lastUpdate) {\\n (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) = previewAllocation(\\n rewardData,\\n market,\\n block.timestamp - lastUpdate\\n );\\n if (borrowIndex > type(uint128).max || depositIndex > type(uint128).max) revert IndexOverflow();\\n rewardData.borrowIndex = uint128(borrowIndex);\\n rewardData.depositIndex = uint128(depositIndex);\\n rewardData.lastUpdate = uint32(block.timestamp);\\n rewardData.lastUndistributed = newUndistributed;\\n emit IndexUpdate(market, reward, borrowIndex, depositIndex, newUndistributed, block.timestamp);\\n }\\n }\\n\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 i = 0; i < ops.length; ) {\\n AccountOperation memory op = ops[i];\\n Account storage accountData = operationAccount[op.operation];\\n uint256 accountIndex = accountData.index;\\n uint256 newAccountIndex;\\n if (op.operation) {\\n newAccountIndex = rewardData.borrowIndex;\\n } else {\\n newAccountIndex = rewardData.depositIndex;\\n }\\n if (accountIndex != newAccountIndex) {\\n accountData.index = uint128(newAccountIndex);\\n if (op.balance != 0) {\\n uint256 rewardsAccrued = accountRewards(op.balance, newAccountIndex, accountIndex, baseUnit);\\n accountData.accrued += uint128(rewardsAccrued);\\n emit Accrue(market, reward, account, op.operation, accountIndex, newAccountIndex, rewardsAccrued);\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the equivalent of borrow shares from fixed pool principal borrows of an account.\\n /// @param market The Market to get the fixed borrows from.\\n /// @param account The account that borrowed from fixed pools.\\n /// @return fixedDebt The fixed borrow shares.\\n function accountFixedBorrowShares(\\n Market market,\\n address account,\\n uint32 start\\n ) internal view returns (uint256 fixedDebt) {\\n uint256 firstMaturity = start - (start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 principal, ) = market.fixedBorrowPositions(maturity, account);\\n fixedDebt += principal;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n fixedDebt = market.previewRepay(fixedDebt);\\n }\\n\\n /// @notice Gets the reward indexes and last amount of undistributed rewards for a given market and reward asset.\\n /// @param market The market to get the reward indexes for.\\n /// @param reward The reward asset to get the reward indexes for.\\n /// @return borrowIndex The index for the floating and fixed borrow operation.\\n /// @return depositIndex The index for the floating deposit operation.\\n /// @return lastUndistributed The last amount of undistributed rewards.\\n function rewardIndexes(Market market, ERC20 reward) external view returns (uint256, uint256, uint256) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.borrowIndex, rewardData.depositIndex, rewardData.lastUndistributed);\\n }\\n\\n /// @notice Calculates the rewards not accrued yet for the given operations of a given account and reward asset.\\n /// @param account The account to get the pending rewards for.\\n /// @param reward The reward asset to get the pending rewards for.\\n /// @param ops The operations to get the pending rewards for.\\n /// @return rewards The pending rewards for the given operations.\\n function pendingRewards(\\n address account,\\n ERC20 reward,\\n AccountMarketOperation memory ops\\n ) internal view returns (uint256 rewards) {\\n RewardData storage rewardData = distribution[ops.market].rewards[reward];\\n uint256 baseUnit = distribution[ops.market].baseUnit;\\n uint256 lastUpdate = rewardData.lastUpdate;\\n (uint256 borrowIndex, uint256 depositIndex, ) = previewAllocation(\\n rewardData,\\n ops.market,\\n block.timestamp > lastUpdate ? block.timestamp - lastUpdate : 0\\n );\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 o = 0; o < ops.accountOperations.length; ) {\\n uint256 nextIndex;\\n if (ops.accountOperations[o].operation) {\\n nextIndex = borrowIndex;\\n } else {\\n nextIndex = depositIndex;\\n }\\n\\n rewards += accountRewards(\\n ops.accountOperations[o].balance,\\n nextIndex,\\n operationAccount[ops.accountOperations[o].operation].index,\\n baseUnit\\n );\\n unchecked {\\n ++o;\\n }\\n }\\n }\\n\\n /// @notice Calculates and returns the new amount of rewards given by the difference between the `accountIndex` and\\n /// the `globalIndex`.\\n /// @param balance The account's balance in the operation's pool.\\n /// @param globalIndex Current index of the distribution.\\n /// @param accountIndex Last index stored for the account.\\n /// @param baseUnit One unit of the Market's asset (10**decimals).\\n /// @return The amount of new rewards to be accrued by the account.\\n function accountRewards(\\n uint256 balance,\\n uint256 globalIndex,\\n uint256 accountIndex,\\n uint256 baseUnit\\n ) internal pure returns (uint256) {\\n return balance.mulDivDown(globalIndex - accountIndex, baseUnit);\\n }\\n\\n /// @notice Retrieves projected distribution indexes and new undistributed amount for a given `deltaTime`.\\n /// @param market The market to calculate the indexes for.\\n /// @param reward The reward asset to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n Market market,\\n ERC20 reward,\\n uint256 deltaTime\\n ) external view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n return previewAllocation(distribution[market].rewards[reward], market, deltaTime);\\n }\\n\\n /// @notice Calculates and returns the distribution indexes and new undistributed tokens for a given `rewardData`.\\n /// @param rewardData The distribution's data.\\n /// @param market The market to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n RewardData storage rewardData,\\n Market market,\\n uint256 deltaTime\\n ) internal view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n TotalMarketBalance memory m;\\n m.floatingDebt = market.floatingDebt();\\n m.floatingAssets = market.floatingAssets();\\n TimeVars memory t;\\n t.start = rewardData.start;\\n t.end = rewardData.end;\\n {\\n uint256 firstMaturity = t.start - (t.start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n uint256 fixedDebt;\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 borrowed, ) = market.fixedPoolBalance(maturity);\\n fixedDebt += borrowed;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n m.debt = m.floatingDebt + fixedDebt;\\n m.fixedBorrowShares = market.previewRepay(fixedDebt);\\n }\\n uint256 target;\\n {\\n uint256 targetDebt = rewardData.targetDebt;\\n target = m.debt < targetDebt ? m.debt.divWadDown(targetDebt) : 1e18;\\n }\\n uint256 rewards;\\n {\\n uint256 releaseRate = rewardData.releaseRate;\\n uint256 lastUndistributed = rewardData.lastUndistributed;\\n t.period = t.end - t.start;\\n uint256 distributionFactor = t.period > 0\\n ? rewardData.undistributedFactor.mulDivDown(target, t.period * 1e18)\\n : 0;\\n if (block.timestamp <= t.end) {\\n if (distributionFactor > 0) {\\n uint256 exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n } else if (rewardData.lastUpdate > t.end) {\\n newUndistributed =\\n lastUndistributed -\\n lastUndistributed.mulWadUp(1e18 - uint256((-int256(distributionFactor * deltaTime)).expWad()));\\n rewards = uint256(-(int256(newUndistributed) - int256(lastUndistributed)));\\n } else {\\n uint256 exponential;\\n deltaTime = t.end - rewardData.lastUpdate;\\n if (distributionFactor > 0) {\\n exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n exponential = uint256((-int256(distributionFactor * (block.timestamp - t.end))).expWad());\\n newUndistributed = newUndistributed - newUndistributed.mulWadUp(1e18 - exponential);\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n }\\n if (rewards == 0) return (rewardData.borrowIndex, rewardData.depositIndex, newUndistributed);\\n }\\n {\\n AllocationVars memory v;\\n v.globalUtilization = Math.min(\\n m.floatingAssets != 0\\n ? 1e18 - (m.floatingAssets - m.floatingDebt - market.floatingBackupBorrowed()).divWadDown(m.floatingAssets)\\n : 0,\\n UTILIZATION_CAP\\n );\\n v.transitionFactor = rewardData.transitionFactor;\\n v.flipSpeed = rewardData.flipSpeed;\\n v.borrowAllocationWeightFactor = rewardData.borrowAllocationWeightFactor;\\n v.sigmoid = v.globalUtilization > 0\\n ? uint256(1e18).divWadDown(\\n 1e18 +\\n uint256(\\n (-(v.flipSpeed *\\n (int256(v.globalUtilization.divWadDown(1e18 - v.globalUtilization)).lnWad() -\\n int256(v.transitionFactor.divWadDown(1e18 - v.transitionFactor)).lnWad())) / 1e18).expWad()\\n )\\n )\\n : 0;\\n v.borrowRewardRule = rewardData\\n .compensationFactor\\n .mulWadDown(\\n market\\n .interestRateModel()\\n .floatingRate(m.floatingAssets != 0 ? m.floatingDebt.divWadDown(m.floatingAssets) : 0, v.globalUtilization)\\n .mulWadDown(1e18 - v.globalUtilization.mulWadUp(1e18 - market.treasuryFeeRate())) +\\n v.borrowAllocationWeightFactor\\n )\\n .mulWadDown(1e18 - v.sigmoid);\\n v.depositRewardRule =\\n rewardData.depositAllocationWeightAddend.mulWadDown(1e18 - v.sigmoid) +\\n rewardData.depositAllocationWeightFactor.mulWadDown(v.sigmoid);\\n v.borrowAllocation = v.borrowRewardRule.divWadDown(v.borrowRewardRule + v.depositRewardRule);\\n v.depositAllocation = 1e18 - v.borrowAllocation;\\n {\\n uint256 totalDepositSupply = market.totalSupply();\\n uint256 totalBorrowSupply = market.totalFloatingBorrowShares() + m.fixedBorrowShares;\\n uint256 baseUnit = distribution[market].baseUnit;\\n borrowIndex =\\n rewardData.borrowIndex +\\n (totalBorrowSupply > 0 ? rewards.mulWadDown(v.borrowAllocation).mulDivDown(baseUnit, totalBorrowSupply) : 0);\\n depositIndex =\\n rewardData.depositIndex +\\n (\\n totalDepositSupply > 0\\n ? rewards.mulWadDown(v.depositAllocation).mulDivDown(baseUnit, totalDepositSupply)\\n : 0\\n );\\n }\\n }\\n }\\n\\n /// @notice Get account balances of the given Market operations.\\n /// @param market The address of the Market.\\n /// @param ops List of operations to retrieve account balance.\\n /// @param account Account to get the balance from.\\n /// @param distributionStart Timestamp of the start of the distribution to correctly get the rewarded fixed pools.\\n /// @return accountBalanceOps contains a list with account balance per each operation.\\n function accountBalanceOperations(\\n Market market,\\n bool[] memory ops,\\n address account,\\n uint32 distributionStart\\n ) internal view returns (AccountOperation[] memory accountBalanceOps) {\\n accountBalanceOps = new AccountOperation[](ops.length);\\n for (uint256 i = 0; i < ops.length; ) {\\n if (ops[i]) {\\n (, , uint256 floatingBorrowShares) = market.accounts(account);\\n accountBalanceOps[i] = AccountOperation({\\n operation: true,\\n balance: floatingBorrowShares + accountFixedBorrowShares(market, account, distributionStart)\\n });\\n } else {\\n accountBalanceOps[i] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Withdraws the contract's balance of the given asset to the given address.\\n /// @param asset The asset to withdraw.\\n /// @param to The address to withdraw the asset to.\\n function withdraw(ERC20 asset, address to) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n asset.safeTransfer(to, asset.balanceOf(address(this)));\\n }\\n\\n /// @notice Enables or updates the reward distribution for the given markets and rewards.\\n /// @param configs The configurations to update each RewardData with.\\n function config(Config[] memory configs) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n for (uint256 i = 0; i < configs.length; ) {\\n // transitionFactor cannot be eq or higher than 1e18 to avoid division by zero or underflow\\n if (configs[i].transitionFactor >= 1e18) revert InvalidConfig();\\n // depositAllocationWeightFactor cannot be zero to avoid division by zero when sigmoid equals 1e18\\n if (configs[i].depositAllocationWeightFactor == 0) revert InvalidConfig();\\n\\n Distribution storage dist = distribution[configs[i].market];\\n RewardData storage rewardData = dist.rewards[configs[i].reward];\\n\\n if (dist.baseUnit == 0) {\\n // never initialized before, adding to the list of markets\\n marketList.push(configs[i].market);\\n }\\n if (!rewardEnabled[configs[i].reward]) {\\n // add reward address to global rewards list if still not enabled\\n rewardEnabled[configs[i].reward] = true;\\n rewardList.push(configs[i].reward);\\n }\\n if (rewardData.lastUpdate == 0) {\\n // add reward address to distribution data's available rewards if distribution is new\\n dist.availableRewards[dist.availableRewardsCount++] = configs[i].reward;\\n dist.baseUnit = 10 ** configs[i].market.decimals();\\n // set initial parameters if distribution is new\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n } else {\\n uint32 start = rewardData.start;\\n uint32 end = rewardData.end;\\n // update global indexes before updating distribution values\\n bool[] memory ops = new bool[](1);\\n ops[0] = true;\\n update(\\n address(0),\\n configs[i].market,\\n configs[i].reward,\\n accountBalanceOperations(configs[i].market, ops, address(0), start)\\n );\\n // properly update release rate\\n if (block.timestamp < end) {\\n uint256 released = 0;\\n uint256 elapsed = 0;\\n if (block.timestamp > start) {\\n released =\\n rewardData.lastConfigReleased +\\n rewardData.releaseRate *\\n (block.timestamp - rewardData.lastConfig);\\n elapsed = block.timestamp - start;\\n if (configs[i].totalDistribution <= released || configs[i].distributionPeriod <= elapsed) {\\n revert InvalidConfig();\\n }\\n rewardData.lastConfigReleased = released;\\n }\\n\\n rewardData.releaseRate =\\n (configs[i].totalDistribution - released) /\\n (configs[i].distributionPeriod - elapsed);\\n } else if (rewardData.start != configs[i].start) {\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n rewardData.lastConfigReleased = 0;\\n }\\n }\\n rewardData.lastConfig = uint32(block.timestamp);\\n rewardData.end = rewardData.start + uint32(configs[i].distributionPeriod);\\n rewardData.priceFeed = configs[i].priceFeed;\\n // set emission and distribution parameters\\n rewardData.totalDistribution = configs[i].totalDistribution;\\n rewardData.targetDebt = configs[i].targetDebt;\\n rewardData.undistributedFactor = configs[i].undistributedFactor;\\n rewardData.flipSpeed = configs[i].flipSpeed;\\n rewardData.compensationFactor = configs[i].compensationFactor;\\n rewardData.borrowAllocationWeightFactor = configs[i].borrowAllocationWeightFactor;\\n rewardData.depositAllocationWeightAddend = configs[i].depositAllocationWeightAddend;\\n rewardData.transitionFactor = configs[i].transitionFactor;\\n rewardData.depositAllocationWeightFactor = configs[i].depositAllocationWeightFactor;\\n\\n emit DistributionSet(configs[i].market, configs[i].reward, configs[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n mapping(address => uint256) public nonces;\\n\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(\\\"RewardsController\\\"),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n address private _claimSender;\\n modifier claimSender() {\\n if (_claimSender == address(0)) _claimSender = msg.sender;\\n _;\\n delete _claimSender;\\n }\\n\\n modifier permitSender(ClaimPermit calldata permit) {\\n assert(_claimSender == address(0));\\n assert(permit.deadline >= block.timestamp);\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\\"ClaimPermit(address owner,address spender,address[] assets,uint256 deadline)\\\"),\\n permit.owner,\\n msg.sender,\\n permit.assets,\\n nonces[permit.owner]++,\\n permit.deadline\\n )\\n )\\n )\\n ),\\n permit.v,\\n permit.r,\\n permit.s\\n );\\n assert(recoveredAddress != address(0) && recoveredAddress == permit.owner);\\n _claimSender = permit.owner;\\n }\\n _;\\n assert(_claimSender == address(0));\\n }\\n\\n struct TotalMarketBalance {\\n uint256 debt;\\n uint256 fixedBorrowShares;\\n uint256 floatingDebt;\\n uint256 floatingAssets;\\n }\\n\\n struct TimeVars {\\n uint256 start;\\n uint256 end;\\n uint256 period;\\n }\\n\\n struct AllocationVars {\\n uint256 globalUtilization;\\n uint256 sigmoid;\\n uint256 borrowRewardRule;\\n uint256 depositRewardRule;\\n uint256 borrowAllocation;\\n uint256 depositAllocation;\\n uint256 transitionFactor;\\n int256 flipSpeed;\\n uint256 borrowAllocationWeightFactor;\\n }\\n\\n struct AccountOperation {\\n bool operation;\\n uint256 balance;\\n }\\n\\n struct MarketOperation {\\n Market market;\\n bool[] operations;\\n }\\n\\n struct AccountMarketOperation {\\n Market market;\\n AccountOperation[] accountOperations;\\n }\\n\\n struct Account {\\n // liquidity index of the reward distribution for the account\\n uint128 index;\\n // amount of accrued rewards for the account since last account index update\\n uint128 accrued;\\n }\\n\\n struct Config {\\n Market market;\\n ERC20 reward;\\n IPriceFeed priceFeed;\\n uint32 start;\\n uint256 distributionPeriod;\\n uint256 targetDebt;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n }\\n\\n struct RewardData {\\n // distribution model\\n uint256 targetDebt;\\n uint256 releaseRate;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n uint256 lastUndistributed;\\n // allocation model\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n // liquidity indexes of the reward distribution\\n uint128 borrowIndex;\\n uint128 depositIndex;\\n // distribution timestamps\\n uint32 start;\\n uint32 end;\\n uint32 lastUpdate;\\n // config helpers\\n uint32 lastConfig;\\n uint256 lastConfigReleased;\\n // price feed\\n IPriceFeed priceFeed;\\n // account addresses and their rewards data (index & accrued)\\n mapping(address => mapping(bool => Account)) accounts;\\n }\\n\\n struct Distribution {\\n // reward assets and their data\\n mapping(ERC20 => RewardData) rewards;\\n // list of reward asset addresses for the market\\n mapping(uint128 => ERC20) availableRewards;\\n // count of reward tokens for the market\\n uint8 availableRewardsCount;\\n // base unit of the market\\n uint256 baseUnit;\\n }\\n\\n /// @notice Emitted when rewards are accrued by an account.\\n /// @param market Market where the operation was made.\\n /// @param reward reward asset.\\n /// @param account account that accrued the rewards.\\n /// @param operation true if the operation was a borrow, false if it was a deposit.\\n /// @param accountIndex previous account index.\\n /// @param operationIndex new operation index that is assigned to the `accountIndex`.\\n /// @param rewardsAccrued amount of rewards accrued.\\n event Accrue(\\n Market indexed market,\\n ERC20 indexed reward,\\n address indexed account,\\n bool operation,\\n uint256 accountIndex,\\n uint256 operationIndex,\\n uint256 rewardsAccrued\\n );\\n\\n /// @notice Emitted when rewards are claimed by an account.\\n /// @param account account that claimed the rewards.\\n /// @param reward reward asset.\\n /// @param to account that received the rewards.\\n /// @param amount amount of rewards claimed.\\n event Claim(address indexed account, ERC20 indexed reward, address indexed to, uint256 amount);\\n\\n /// @notice Emitted when a distribution is set.\\n /// @param market Market whose distribution was set.\\n /// @param reward reward asset to be distributed when operating with the Market.\\n /// @param config configuration struct containing the distribution parameters.\\n event DistributionSet(Market indexed market, ERC20 indexed reward, Config config);\\n\\n /// @notice Emitted when the distribution indexes are updated.\\n /// @param market Market of the distribution.\\n /// @param reward reward asset.\\n /// @param borrowIndex index of the borrow operations of a distribution.\\n /// @param depositIndex index of the deposit operations of a distribution.\\n /// @param newUndistributed amount of undistributed rewards.\\n /// @param lastUpdate current timestamp.\\n event IndexUpdate(\\n Market indexed market,\\n ERC20 indexed reward,\\n uint256 borrowIndex,\\n uint256 depositIndex,\\n uint256 newUndistributed,\\n uint256 lastUpdate\\n );\\n}\\n\\nerror IndexOverflow();\\nerror InvalidConfig();\\n\\nstruct ClaimPermit {\\n address owner;\\n ERC20[] assets;\\n uint256 deadline;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n}\\n\",\"keccak256\":\"0xb49f89a25450c5d31384afa51595c7e2cf0b32ea73d6e8fd2b2c937cc60c7b5f\",\"license\":\"BUSL-1.1\"},\"contracts/utils/FixedLib.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\nlibrary FixedLib {\\n using FixedPointMathLib for uint256;\\n\\n uint256 internal constant INTERVAL = 4 weeks;\\n\\n /// @notice Gets the amount of revenue sharing between the backup supplier and the new fixed pool supplier.\\n /// @param pool fixed rate pool.\\n /// @param amount amount being provided by the fixed pool supplier.\\n /// @param backupFeeRate rate charged to the fixed pool supplier to be accrued by the backup supplier.\\n /// @return yield amount to be offered to the fixed pool supplier.\\n /// @return backupFee yield to be accrued by the backup supplier for initially providing the liquidity.\\n function calculateDeposit(\\n Pool memory pool,\\n uint256 amount,\\n uint256 backupFeeRate\\n ) internal pure returns (uint256 yield, uint256 backupFee) {\\n uint256 memBackupSupplied = backupSupplied(pool);\\n if (memBackupSupplied != 0) {\\n yield = pool.unassignedEarnings.mulDivDown(Math.min(amount, memBackupSupplied), memBackupSupplied);\\n backupFee = yield.mulWadDown(backupFeeRate);\\n yield -= backupFee;\\n }\\n }\\n\\n /// @notice Registers an operation to add supply to a fixed rate pool and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be added to the supply.\\n /// @param amount amount to be added to the supply.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function deposit(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.supplied = supplied + amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to reduce borrowed amount from a fixed rate pool\\n /// and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be repaid.\\n /// @param amount amount to be added to the fixed rate pool.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function repay(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.borrowed = borrowed - amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to increase borrowed amount of a fixed rate pool\\n /// and potentially increase backup debt.\\n /// @param pool fixed rate pool where an amount will be borrowed.\\n /// @param amount amount to be borrowed from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function borrow(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 newBorrowed = borrowed + amount;\\n\\n backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, pool.supplied), newBorrowed);\\n pool.borrowed = newBorrowed;\\n }\\n\\n /// @notice Registers an operation to reduce supply from a fixed rate pool and potentially increase backup debt.\\n /// @param pool fixed rate pool where amount will be withdrawn.\\n /// @param amountToDiscount amount to be withdrawn from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function withdraw(Pool storage pool, uint256 amountToDiscount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n uint256 newSupply = supplied - amountToDiscount;\\n\\n backupDebtAddition = Math.min(supplied, borrowed) - Math.min(newSupply, borrowed);\\n pool.supplied = newSupply;\\n }\\n\\n /// @notice Accrues backup earnings from `unassignedEarnings` based on the `lastAccrual` time.\\n /// @param pool fixed rate pool where earnings will be accrued.\\n /// @param maturity maturity date of the pool.\\n /// @return backupEarnings amount of earnings to be distributed to the backup supplier.\\n function accrueEarnings(Pool storage pool, uint256 maturity) internal returns (uint256 backupEarnings) {\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (block.timestamp < maturity) {\\n uint256 unassignedEarnings = pool.unassignedEarnings;\\n pool.lastAccrual = block.timestamp;\\n backupEarnings = unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual);\\n pool.unassignedEarnings = unassignedEarnings - backupEarnings;\\n } else if (lastAccrual == maturity) {\\n backupEarnings = 0;\\n } else {\\n pool.lastAccrual = maturity;\\n backupEarnings = pool.unassignedEarnings;\\n pool.unassignedEarnings = 0;\\n }\\n }\\n\\n /// @notice Calculates the amount that a fixed rate pool borrowed from the backup supplier.\\n /// @param pool fixed rate pool.\\n /// @return amount borrowed from the fixed rate pool.\\n function backupSupplied(Pool memory pool) internal pure returns (uint256) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n return borrowed - Math.min(borrowed, supplied);\\n }\\n\\n /// @notice Modify positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it. Needs for the amount to be less than the principal and the fee\\n /// @param position original position to be scaled.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return scaled position.\\n function scaleProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 principal = amount.mulDivDown(position.principal, position.principal + position.fee);\\n position.principal = principal;\\n position.fee = amount - principal;\\n return position;\\n }\\n\\n /// @notice Reduce positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it.\\n /// @param position original position to be reduced.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return reduced position.\\n function reduceProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 positionAssets = position.principal + position.fee;\\n uint256 newPositionAssets = positionAssets - amount;\\n position.principal = newPositionAssets.mulDivDown(position.principal, positionAssets);\\n position.fee = newPositionAssets - position.principal;\\n return position;\\n }\\n\\n /// @notice Calculates what proportion of earnings would `borrowAmount` represent considering `backupSupplied`.\\n /// @param earnings amount to be distributed.\\n /// @param borrowAmount amount that will be checked if came from the backup supplier or fixed rate pool.\\n /// @return unassignedEarnings earnings to be added to `unassignedEarnings`.\\n /// @return backupEarnings earnings to be distributed to the backup supplier.\\n function distributeEarnings(\\n Pool memory pool,\\n uint256 earnings,\\n uint256 borrowAmount\\n ) internal pure returns (uint256 unassignedEarnings, uint256 backupEarnings) {\\n backupEarnings = borrowAmount == 0\\n ? 0\\n : earnings.mulDivDown(borrowAmount - Math.min(backupSupplied(pool), borrowAmount), borrowAmount);\\n unassignedEarnings = earnings - backupEarnings;\\n }\\n\\n /// @notice Adds a maturity date to the borrow or supply positions of the account.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity the new maturity where the account will borrow or supply to.\\n /// @return updated encoded maturity dates.\\n function setMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n // initialize the maturity with also the 1st bit on the 33th position set\\n if (encoded == 0) return maturity | (1 << 32);\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n if (maturity < baseMaturity) {\\n // if the new maturity is lower than the base, set it as the new base\\n // wipe clean the last 32 bits, shift the amount of `INTERVAL` and set the new value with the 33rd bit set\\n uint256 range = (baseMaturity - maturity) / INTERVAL;\\n if (encoded >> (256 - range) != 0) revert MaturityOverflow();\\n encoded = ((encoded >> 32) << (32 + range));\\n return maturity | encoded | (1 << 32);\\n } else {\\n uint256 range = (maturity - baseMaturity) / INTERVAL;\\n if (range > 223) revert MaturityOverflow();\\n return encoded | (1 << (32 + range));\\n }\\n }\\n\\n /// @notice Remove maturity from account's borrow or supplied positions.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity maturity date to be removed.\\n /// @return updated encoded maturity dates.\\n function clearMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n if (encoded == 0 || encoded == maturity | (1 << 32)) return 0;\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n // if the baseMaturity is the one being cleaned\\n if (maturity == baseMaturity) {\\n // wipe 32 bytes + 1 for the old base flag\\n uint256 packed = encoded >> 33;\\n uint256 range = 1;\\n while ((packed & 1) == 0 && packed != 0) {\\n unchecked {\\n ++range;\\n }\\n packed >>= 1;\\n }\\n encoded = ((encoded >> (32 + range)) << 32);\\n return (maturity + (range * INTERVAL)) | encoded;\\n } else {\\n // otherwise just clear the bit\\n return encoded & ~(1 << (32 + ((maturity - baseMaturity) / INTERVAL)));\\n }\\n }\\n\\n /// @notice Verifies that a maturity is `VALID`, `MATURED`, `NOT_READY` or `INVALID`.\\n /// @dev if expected state doesn't match the calculated one, it reverts with a custom error `UnmatchedPoolState`.\\n /// @param maturity timestamp of the maturity date to be verified.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param requiredState state required by the caller to be verified (see `State` for description).\\n /// @param alternativeState state required by the caller to be verified (see `State` for description).\\n function checkPoolState(uint256 maturity, uint8 maxPools, State requiredState, State alternativeState) internal view {\\n State state;\\n if (maturity % INTERVAL != 0) {\\n state = State.INVALID;\\n } else if (maturity <= block.timestamp) {\\n state = State.MATURED;\\n } else if (maturity > block.timestamp - (block.timestamp % INTERVAL) + (INTERVAL * maxPools)) {\\n state = State.NOT_READY;\\n } else {\\n state = State.VALID;\\n }\\n\\n if (state != requiredState && state != alternativeState) {\\n if (alternativeState == State.NONE) revert UnmatchedPoolState(uint8(state), uint8(requiredState));\\n\\n revert UnmatchedPoolStates(uint8(state), uint8(requiredState), uint8(alternativeState));\\n }\\n }\\n\\n /// @notice Stores the accountability of a fixed interest rate pool.\\n /// @param borrowed total amount borrowed from the pool.\\n /// @param supplied total amount supplied to the pool.\\n /// @param unassignedEarnings total amount of earnings not yet distributed and accrued.\\n /// @param lastAccrual timestamp for the last time that some earnings have been distributed to the backup supplier.\\n struct Pool {\\n uint256 borrowed;\\n uint256 supplied;\\n uint256 unassignedEarnings;\\n uint256 lastAccrual;\\n }\\n\\n /// @notice Stores principal and fee of a borrow or a supply position of a account in a fixed rate pool.\\n /// @param principal amount borrowed or supplied to the fixed rate pool.\\n /// @param fee amount of fees to be repaid or earned at the maturity of the fixed rate pool.\\n struct Position {\\n uint256 principal;\\n uint256 fee;\\n }\\n\\n enum State {\\n NONE,\\n INVALID,\\n MATURED,\\n VALID,\\n NOT_READY\\n }\\n}\\n\\nerror MaturityOverflow();\\nerror UnmatchedPoolState(uint8 state, uint8 requiredState);\\nerror UnmatchedPoolStates(uint8 state, uint8 requiredState, uint8 alternativeState);\\n\",\"keccak256\":\"0xb959d7d8c709c18ad668f58ab3d622b942ef36d72e6268e925e632b56a80ddc1\",\"license\":\"BUSL-1.1\"},\"contracts/utils/IPriceFeed.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\ninterface IPriceFeed {\\n function decimals() external view returns (uint8);\\n\\n function latestAnswer() external view returns (int256);\\n}\\n\",\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\"},\"solmate/src/mixins/ERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\nimport {SafeTransferLib} from \\\"../utils/SafeTransferLib.sol\\\";\\nimport {FixedPointMathLib} from \\\"../utils/FixedPointMathLib.sol\\\";\\n\\n/// @notice Minimal ERC4626 tokenized Vault implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)\\nabstract contract ERC4626 is ERC20 {\\n using SafeTransferLib for ERC20;\\n using FixedPointMathLib for uint256;\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /*//////////////////////////////////////////////////////////////\\n IMMUTABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n ERC20 public immutable asset;\\n\\n constructor(\\n ERC20 _asset,\\n string memory _name,\\n string memory _symbol\\n ) ERC20(_name, _symbol, _asset.decimals()) {\\n asset = _asset;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {\\n // Check for rounding error since we round down in previewDeposit.\\n require((shares = previewDeposit(assets)) != 0, \\\"ZERO_SHARES\\\");\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {\\n assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up.\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 shares) {\\n shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up.\\n\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 assets) {\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n // Check for rounding error since we round down in previewRedeem.\\n require((assets = previewRedeem(shares)) != 0, \\\"ZERO_ASSETS\\\");\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ACCOUNTING LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function totalAssets() public view virtual returns (uint256);\\n\\n function convertToShares(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets());\\n }\\n\\n function convertToAssets(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply);\\n }\\n\\n function previewDeposit(uint256 assets) public view virtual returns (uint256) {\\n return convertToShares(assets);\\n }\\n\\n function previewMint(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply);\\n }\\n\\n function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\\n }\\n\\n function previewRedeem(uint256 shares) public view virtual returns (uint256) {\\n return convertToAssets(shares);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LIMIT LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function maxDeposit(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxMint(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxWithdraw(address owner) public view virtual returns (uint256) {\\n return convertToAssets(balanceOf[owner]);\\n }\\n\\n function maxRedeem(address owner) public view virtual returns (uint256) {\\n return balanceOf[owner];\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL HOOKS LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {}\\n\\n function afterDeposit(uint256 assets, uint256 shares) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\"},\"solmate/src/tokens/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\\nabstract contract ERC20 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n uint8 public immutable decimals;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) public balanceOf;\\n\\n mapping(address => mapping(address => uint256)) public allowance;\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal immutable INITIAL_CHAIN_ID;\\n\\n bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\\n\\n mapping(address => uint256) public nonces;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint8 _decimals\\n ) {\\n name = _name;\\n symbol = _symbol;\\n decimals = _decimals;\\n\\n INITIAL_CHAIN_ID = block.chainid;\\n INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 amount) public virtual returns (bool) {\\n allowance[msg.sender][spender] = amount;\\n\\n emit Approval(msg.sender, spender, amount);\\n\\n return true;\\n }\\n\\n function transfer(address to, uint256 amount) public virtual returns (bool) {\\n balanceOf[msg.sender] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(msg.sender, to, amount);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual returns (bool) {\\n uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\\n\\n balanceOf[from] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n return true;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 LOGIC\\n //////////////////////////////////////////////////////////////*/\\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 ) public virtual {\\n require(deadline >= block.timestamp, \\\"PERMIT_DEADLINE_EXPIRED\\\");\\n\\n // Unchecked because the only math done is incrementing\\n // the owner's nonce which cannot realistically overflow.\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\n \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n ),\\n owner,\\n spender,\\n value,\\n nonces[owner]++,\\n deadline\\n )\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"INVALID_SIGNER\\\");\\n\\n allowance[recoveredAddress][spender] = value;\\n }\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\\n return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\\n }\\n\\n function computeDomainSeparator() internal view virtual returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 amount) internal virtual {\\n totalSupply += amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(address(0), to, amount);\\n }\\n\\n function _burn(address from, uint256 amount) internal virtual {\\n balanceOf[from] -= amount;\\n\\n // Cannot underflow because a user's balance\\n // will never be larger than the total supply.\\n unchecked {\\n totalSupply -= amount;\\n }\\n\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\"},\"solmate/src/utils/FixedPointMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Arithmetic library with operations for fixed-point numbers.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)\\nlibrary FixedPointMathLib {\\n /*//////////////////////////////////////////////////////////////\\n SIMPLIFIED FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.\\n\\n function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.\\n }\\n\\n function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.\\n }\\n\\n function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.\\n }\\n\\n function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.\\n }\\n\\n function powWad(int256 x, int256 y) internal pure returns (int256) {\\n // Equivalent to x to the power of y because x ** y = (e ** ln(x)) ** y = e ** (ln(x) * y)\\n return expWad((lnWad(x) * y) / int256(WAD)); // Using ln(x) means x must be greater than 0.\\n }\\n\\n function expWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n // When the result is < 0.5 we return zero. This happens when\\n // x <= floor(log(0.5e18) * 1e18) ~ -42e18\\n if (x <= -42139678854452767551) return 0;\\n\\n // When the result is > (2**255 - 1) / 1e18 we can not represent it as an\\n // int. This happens when x >= floor(log((2**255 - 1) / 1e18) * 1e18) ~ 135.\\n if (x >= 135305999368893231589) revert(\\\"EXP_OVERFLOW\\\");\\n\\n // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96\\n // for more intermediate precision and a binary basis. This base conversion\\n // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.\\n x = (x << 78) / 5**18;\\n\\n // Reduce range of x to (-\\u00bd ln 2, \\u00bd ln 2) * 2**96 by factoring out powers\\n // of two such that exp(x) = exp(x') * 2**k, where k is an integer.\\n // Solving this gives k = round(x / log(2)) and x' = x - k * log(2).\\n int256 k = ((x << 96) / 54916777467707473351141471128 + 2**95) >> 96;\\n x = x - k * 54916777467707473351141471128;\\n\\n // k is in the range [-61, 195].\\n\\n // Evaluate using a (6, 7)-term rational approximation.\\n // p is made monic, we'll multiply by a scale factor later.\\n int256 y = x + 1346386616545796478920950773328;\\n y = ((y * x) >> 96) + 57155421227552351082224309758442;\\n int256 p = y + x - 94201549194550492254356042504812;\\n p = ((p * y) >> 96) + 28719021644029726153956944680412240;\\n p = p * x + (4385272521454847904659076985693276 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n int256 q = x - 2855989394907223263936484059900;\\n q = ((q * x) >> 96) + 50020603652535783019961831881945;\\n q = ((q * x) >> 96) - 533845033583426703283633433725380;\\n q = ((q * x) >> 96) + 3604857256930695427073651918091429;\\n q = ((q * x) >> 96) - 14423608567350463180887372962807573;\\n q = ((q * x) >> 96) + 26449188498355588339934803723976023;\\n\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial won't have zeros in the domain as all its roots are complex.\\n // No scaling is necessary because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r should be in the range (0.09, 0.25) * 2**96.\\n\\n // We now need to multiply r by:\\n // * the scale factor s = ~6.031367120.\\n // * the 2**k factor from the range reduction.\\n // * the 1e18 / 2**96 factor for base conversion.\\n // We do this all at once, with an intermediate result in 2**213\\n // basis, so the final right shift is always by a positive amount.\\n r = int256((uint256(r) * 3822833074963236453042738258902158003155416615667) >> uint256(195 - k));\\n }\\n }\\n\\n function lnWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n // We want to convert x from 10**18 fixed point to 2**96 fixed point.\\n // We do this by multiplying by 2**96 / 10**18. But since\\n // ln(x * C) = ln(x) + ln(C), we can simply do nothing here\\n // and add ln(2**96 / 10**18) at the end.\\n\\n // Reduce range of x to (1, 2) * 2**96\\n // ln(2^k * x) = k * ln(2) + ln(x)\\n int256 k = int256(log2(uint256(x))) - 96;\\n x <<= uint256(159 - k);\\n x = int256(uint256(x) >> 159);\\n\\n // Evaluate using a (8, 8)-term rational approximation.\\n // p is made monic, we will multiply by a scale factor later.\\n int256 p = x + 3273285459638523848632254066296;\\n p = ((p * x) >> 96) + 24828157081833163892658089445524;\\n p = ((p * x) >> 96) + 43456485725739037958740375743393;\\n p = ((p * x) >> 96) - 11111509109440967052023855526967;\\n p = ((p * x) >> 96) - 45023709667254063763336534515857;\\n p = ((p * x) >> 96) - 14706773417378608786704636184526;\\n p = p * x - (795164235651350426258249787498 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n // q is monic by convention.\\n int256 q = x + 5573035233440673466300451813936;\\n q = ((q * x) >> 96) + 71694874799317883764090561454958;\\n q = ((q * x) >> 96) + 283447036172924575727196451306956;\\n q = ((q * x) >> 96) + 401686690394027663651624208769553;\\n q = ((q * x) >> 96) + 204048457590392012362485061816622;\\n q = ((q * x) >> 96) + 31853899698501571402653359427138;\\n q = ((q * x) >> 96) + 909429971244387300277376558375;\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial is known not to have zeros in the domain.\\n // No scaling required because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r is in the range (0, 0.125) * 2**96\\n\\n // Finalization, we need to:\\n // * multiply by the scale factor s = 5.549\\u2026\\n // * add ln(2**96 / 10**18)\\n // * add k * ln(2)\\n // * multiply by 10**18 / 2**96 = 5**18 >> 78\\n\\n // mul s * 5e18 * 2**96, base is now 5**18 * 2**192\\n r *= 1677202110996718588342820967067443963516166;\\n // add ln(2) * k * 5e18 * 2**192\\n r += 16597577552685614221487285958193947469193820559219878177908093499208371 * k;\\n // add ln(2**96 / 10**18) * 5e18 * 2**192\\n r += 600920179829731861736702779321621459595472258049074101567377883020018308;\\n // base conversion: mul 2**18 / 2**192\\n r >>= 174;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n LOW LEVEL FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function mulDivDown(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // Divide z by the denominator.\\n z := div(z, denominator)\\n }\\n }\\n\\n function mulDivUp(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // First, divide z - 1 by the denominator and add 1.\\n // We allow z - 1 to underflow if z is 0, because we multiply the\\n // end result by 0 if z is zero, ensuring we return 0 if z is zero.\\n z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1))\\n }\\n }\\n\\n function rpow(\\n uint256 x,\\n uint256 n,\\n uint256 scalar\\n ) internal pure returns (uint256 z) {\\n assembly {\\n switch x\\n case 0 {\\n switch n\\n case 0 {\\n // 0 ** 0 = 1\\n z := scalar\\n }\\n default {\\n // 0 ** n = 0\\n z := 0\\n }\\n }\\n default {\\n switch mod(n, 2)\\n case 0 {\\n // If n is even, store scalar in z for now.\\n z := scalar\\n }\\n default {\\n // If n is odd, store x in z for now.\\n z := x\\n }\\n\\n // Shifting right by 1 is like dividing by 2.\\n let half := shr(1, scalar)\\n\\n for {\\n // Shift n right by 1 before looping to halve it.\\n n := shr(1, n)\\n } n {\\n // Shift n right by 1 each iteration to halve it.\\n n := shr(1, n)\\n } {\\n // Revert immediately if x ** 2 would overflow.\\n // Equivalent to iszero(eq(div(xx, x), x)) here.\\n if shr(128, x) {\\n revert(0, 0)\\n }\\n\\n // Store x squared.\\n let xx := mul(x, x)\\n\\n // Round to the nearest number.\\n let xxRound := add(xx, half)\\n\\n // Revert if xx + half overflowed.\\n if lt(xxRound, xx) {\\n revert(0, 0)\\n }\\n\\n // Set x to scaled xxRound.\\n x := div(xxRound, scalar)\\n\\n // If n is even:\\n if mod(n, 2) {\\n // Compute z * x.\\n let zx := mul(z, x)\\n\\n // If z * x overflowed:\\n if iszero(eq(div(zx, x), z)) {\\n // Revert if x is non-zero.\\n if iszero(iszero(x)) {\\n revert(0, 0)\\n }\\n }\\n\\n // Round to the nearest number.\\n let zxRound := add(zx, half)\\n\\n // Revert if zx + half overflowed.\\n if lt(zxRound, zx) {\\n revert(0, 0)\\n }\\n\\n // Return properly scaled zxRound.\\n z := div(zxRound, scalar)\\n }\\n }\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n GENERAL NUMBER UTILITIES\\n //////////////////////////////////////////////////////////////*/\\n\\n function sqrt(uint256 x) internal pure returns (uint256 z) {\\n assembly {\\n let y := x // We start y at x, which will help us make our initial estimate.\\n\\n z := 181 // The \\\"correct\\\" value is 1, but this saves a multiplication later.\\n\\n // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad\\n // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.\\n\\n // We check y >= 2^(k + 8) but shift right by k bits\\n // each branch to ensure that if x >= 256, then y >= 256.\\n if iszero(lt(y, 0x10000000000000000000000000000000000)) {\\n y := shr(128, y)\\n z := shl(64, z)\\n }\\n if iszero(lt(y, 0x1000000000000000000)) {\\n y := shr(64, y)\\n z := shl(32, z)\\n }\\n if iszero(lt(y, 0x10000000000)) {\\n y := shr(32, y)\\n z := shl(16, z)\\n }\\n if iszero(lt(y, 0x1000000)) {\\n y := shr(16, y)\\n z := shl(8, z)\\n }\\n\\n // Goal was to get z*z*y within a small factor of x. More iterations could\\n // get y in a tighter range. Currently, we will have y in [256, 256*2^16).\\n // We ensured y >= 256 so that the relative difference between y and y+1 is small.\\n // That's not possible if x < 256 but we can just verify those cases exhaustively.\\n\\n // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.\\n // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.\\n // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.\\n\\n // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range\\n // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.\\n\\n // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate\\n // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.\\n\\n // There is no overflow risk here since y < 2^136 after the first branch above.\\n z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.\\n\\n // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n\\n // If x+1 is a perfect square, the Babylonian method cycles between\\n // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.\\n // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\\n // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.\\n // If you don't care whether the floor or ceil square root is returned, you can remove this statement.\\n z := sub(z, lt(div(x, z), z))\\n }\\n }\\n\\n function log2(uint256 x) internal pure returns (uint256 r) {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n assembly {\\n r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))\\n r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))\\n r := or(r, shl(5, lt(0xffffffff, shr(r, x))))\\n r := or(r, shl(4, lt(0xffff, shr(r, x))))\\n r := or(r, shl(3, lt(0xff, shr(r, x))))\\n r := or(r, shl(2, lt(0xf, shr(r, x))))\\n r := or(r, shl(1, lt(0x3, shr(r, x))))\\n r := or(r, lt(0x1, shr(r, x)))\\n }\\n }\\n\\n function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := mod(x, y)\\n }\\n }\\n\\n function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := div(x, y)\\n }\\n }\\n\\n /// @dev Will return 0 instead of reverting if y is zero.\\n function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // Add 1 to x * y if x % y > 0.\\n z := add(gt(mod(x, y), 0), div(x, y))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\"},\"solmate/src/utils/SafeTransferLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\n\\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)\\n/// @dev Caution! This library won't check that a token has code, responsibility is delegated to the caller.\\nlibrary SafeTransferLib {\\n /*//////////////////////////////////////////////////////////////\\n ETH OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n bool success;\\n\\n assembly {\\n // Transfer the ETH and store if it succeeded or not.\\n success := call(gas(), to, amount, 0, 0, 0, 0)\\n }\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferFrom(\\n ERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\\n mstore(4, from) // Append the \\\"from\\\" argument.\\n mstore(36, to) // Append the \\\"to\\\" argument.\\n mstore(68, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 100 because that's the total length of our calldata (4 + 32 * 3)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 100, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x095ea7b300000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"APPROVE_FAILED\\\");\\n }\\n}\\n\",\"keccak256\":\"0x5f2e1158c68c1f3d15b80e8a7dd92b6849f873066969562ad33c0abb80e536ff\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x610120604052348015610010575f80fd5b5060405161644938038061644983398101604081905261002f9161021c565b8160405180602001604052805f81525060405180602001604052805f8152508181846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100b09190610254565b60c96100bc8482610313565b5060ca6100c98382610313565b5060ff81166080524660a0526100dd610108565b60c0525050506001600160a01b0392831660e05250508116610100526101016101a1565b5050610444565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c960405161013991906103d2565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f54610100900460ff16156101b4575f80fd5b5f5460ff90811614610203575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610219575f80fd5b50565b5f806040838503121561022d575f80fd5b825161023881610205565b602084015190925061024981610205565b809150509250929050565b5f60208284031215610264575f80fd5b815160ff81168114610274575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102a357607f821691505b6020821081036102c157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561030e57805f5260205f20601f840160051c810160208510156102ec5750805b601f840160051c820191505b8181101561030b575f81556001016102f8565b50505b505050565b81516001600160401b0381111561032c5761032c61027b565b6103408161033a845461028f565b846102c7565b602080601f831160018114610373575f841561035c5750858301515b5f19600386901b1c1916600185901b1785556103ca565b5f85815260208120601f198616915b828110156103a157888601518255948401946001909101908401610382565b50858210156103be57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f8083546103df8161028f565b600182811680156103f7576001811461040c57610438565b60ff1984168752821515830287019450610438565b875f526020805f205f5b8581101561042f5781548a820152908401908201610416565b50505082870194505b50929695505050505050565b60805160a05160c05160e05161010051615f276105225f395f81816108070152818161161c015281816117c001528181611e3e015281816120910152818161220b0152818161257101528181612ed7015281816130800152818161316f015281816136990152614b0501525f81816107ac0152818161168001528181611c2201528181611d160152818161227d01528181612337015281816123fe0152818161286501528181612e59015281816136fd01528181614c92015281816151c001526152d501525f611c8f01525f611c5a01525f6107430152615f275ff3fe608060405234801561000f575f80fd5b5060043610610539575f3560e01c80636e76fc8f116102bf578063b2a02ff111610186578063d5164184116100ef578063e63ab1e9116100a9578063ef8b30f711610084578063ef8b30f714610d5e578063f3fdb15a14610d71578063fb0fc4c314610d84578063fea45d9414610d9b575f80fd5b8063e63ab1e914610d26578063e94b3c2114610d4d578063eee8c9e014610d56575f80fd5b8063d516418414610c92578063d547741f14610ca5578063d6b7494f14610cb8578063d905777e14610cc1578063dd62ed3e14610ce9578063e00b262514610d13575f80fd5b8063c63d75b611610140578063c63d75b614610831578063c6e6f59214610bf7578063ccfd8b1114610c0a578063ce96cb7714610c3b578063d2681a0b14610c4e578063d505accf14610c7f575f80fd5b8063b2a02ff114610b85578063b3d7f6b914610b98578063b460af9414610bab578063ba08765214610bbe578063bee36bb314610bd1578063bf722ca214610be4575f80fd5b806391d1485411610228578063a16a8850116101e2578063a16a885014610b27578063a1bab44714610b3c578063a1e8f02b14610b4f578063a217fddf14610b58578063a9059cbb14610b5f578063acb7081514610b72575f80fd5b806391d1485414610ac0578063926bb63314610ad357806394bf804d14610ae657806395d89b4114610af957806397bce8d014610b01578063a05a091a14610b14575f80fd5b80637ecebe00116102795780637ecebe0014610a6b5780638456cb5914610a8a5780638a1baa4614610a925780638bcd401614610a9b5780638c3cba5a14610aae5780638d0e5f0214610ab7575f80fd5b80636e76fc8f146109c05780636eb9ffeb146109e757806370a0823114610a1357806378007e2314610a325780637ad226dc14610a455780637e932d3214610a58575f80fd5b8063313ce567116104035780634322b7141161036c5780635cc2ef83116103265780635cc2ef83146109225780635e5c06e21461093557806361d027b31461097e57806366601032146109915780636bb65f531461099a5780636e553f65146109ad575f80fd5b80634322b7141461085857806347dffde01461088a5780634914c0081461089d5780634cdad506146108b05780634e7c5059146108c35780635c975abb14610917575f80fd5b80633aa18d6f116103bd5780633aa18d6f146107e65780633c6f317f146107ef5780633ec045a6146108025780633f4ba83a14610829578063402d267d1461083157806342da42bf14610845575f80fd5b8063313ce5671461073e57806333eeb1471461076557806334f7d1f2146107795780633644e5151461078c57806336568abe1461079457806338d52e0f146107a7575f80fd5b806313700101116104a5578063248a9ca31161045f578063248a9ca3146106bb57806325fc07a9146106dd57806328acf2cf146106fc5780632c5dcc771461070f5780632e0af008146107225780632f2ff15d1461072b575f80fd5b8063137001011461065d57806318160ddd146106705780631a5b9e62146106795780631a90f1861461068c5780631d43b30b1461069557806323b872dd146106a8575f80fd5b806307a2d13a116104f657806307a2d13a146105d6578063095ea7b3146105e95780630a28a477146105fc5780630ab69be81461060f5780630e52dbec146106365780630f2b75aa14610655575f80fd5b8063014a296f1461053d57806301e1d1141461056a57806301ffc9a714610580578063022d8af5146105a35780630539fa8c146105b857806306fdde03146105c1575b5f80fd5b61055061054b36600461566a565b610dae565b604080519283526020830191909152015b60405180910390f35b610572610de3565b604051908152602001610561565b61059361058e366004615685565b610e8f565b6040519015158152602001610561565b6105b66105b13660046156c7565b610ec5565b005b61057260d85481565b6105c9610f54565b60405161056191906156e0565b6105726105e4366004615715565b610fe0565b6105936105f736600461572c565b61100c565b61057261060a366004615715565b611077565b61055061061d366004615715565b5f90815260d16020526040902080546001909101549091565b60da546106439060ff1681565b60405160ff9091168152602001610561565b610572611096565b6105b661066b366004615794565b61113b565b61057260cb5481565b6105726106873660046157d3565b6111ac565b61057260d45481565b6105726106a336600461566a565b6116b5565b6105936106b6366004615825565b6117b5565b6105726106c9366004615715565b5f9081526065602052604090206001015490565b6105726106eb366004615715565b5f90815260d1602052604090205490565b6105b661070a366004615873565b611916565b6105b661071d36600461572c565b611962565b61057260dd5481565b6105b661073936600461588c565b6119d2565b6106437f000000000000000000000000000000000000000000000000000000000000000081565b60e35461059390600160a01b900460ff1681565b6105726107873660046158ba565b6119fb565b610572611c57565b6105b66107a236600461588c565b611cb1565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610561565b61057260d95481565b6105726107fd3660046158ba565b611cd3565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6105b6611d46565b61057261083f36600461566a565b505f1990565b6105b6610853366004615715565b611d7b565b60dc5461087290600160801b90046001600160801b031681565b6040516001600160801b039091168152602001610561565b610572610898366004615715565b611dba565b6105726108ab3660046158f8565b611dd8565b6105726108be366004615715565b6122af565b6108f76108d1366004615715565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610561565b60975460ff16610593565b6105b6610930366004615937565b6122b9565b61096361094336600461566a565b60d26020525f908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610561565b60e1546107ce906001600160a01b031681565b61057260e25481565b60e3546107ce906001600160a01b031681565b6105726109bb36600461588c565b612313565b6105727f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da546109fe90600160281b900463ffffffff1681565b60405163ffffffff9091168152602001610561565b610572610a2136600461566a565b60cc6020525f908152604090205481565b610572610a40366004615715565b6123b9565b610550610a5336600461588c565b6123d0565b6105b6610a66366004615957565b61242d565b610572610a7936600461566a565b60ce6020525f908152604090205481565b6105b66124aa565b61057260d55481565b6105b6610aa936600461566a565b6124bc565b61057260d35481565b61057260df5481565b610593610ace36600461588c565b61253c565b6105b6610ae136600461566a565b612566565b610572610af436600461588c565b61284c565b6105c96128e7565b6105b6610b0f366004615976565b6128f4565b610572610b223660046157d3565b612a55565b60da546109fe90610100900463ffffffff1681565b6105b6610b4a366004615715565b612e8d565b61057260d75481565b6105725f81565b610593610b6d36600461572c565b612ecc565b610550610b8036600461588c565b613021565b6105b6610b93366004615825565b61303d565b610572610ba6366004615715565b613051565b610572610bb9366004615a1f565b613067565b610572610bcc366004615a1f565b61316c565b6105b6610bdf36600461566a565b613266565b610572610bf2366004615715565b6132ba565b610572610c05366004615715565b6132d9565b610550610c1836600461588c565b60cf60209081525f92835260408084209091529082529020805460019091015482565b610572610c4936600461566a565b6132f0565b610550610c5c36600461588c565b60d060209081525f92835260408084209091529082529020805460019091015482565b6105b6610c8d366004615a53565b613311565b610572610ca0366004615a1f565b6134d6565b6105b6610cb336600461588c565b61372f565b61057260d65481565b610572610ccf36600461566a565b6001600160a01b03165f90815260cc602052604090205490565b610572610cf7366004615abc565b60cd60209081525f928352604080842090915290825290205481565b6105b6610d213660046156c7565b613753565b6105727f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61057260de5481565b6105726137ab565b610572610d6c366004615715565b61388c565b60db546107ce906001600160a01b031681565b60da546109fe90600160481b900463ffffffff1681565b60dc54610872906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610dd190610fe0565b610dda846116b5565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610e55575f81815260d160205260409020600381015480831115610e4957824210610e2f578160020154610e44565b6002820154610e449042839003838603613896565b860195505b50506224ea0001610dfd565b50610e7860e254670de0b6b3a76400000360d454610e716137ab565b03906138b4565b610e806138c8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610ebf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610ecf8161393e565b610ed7613948565b60dd5f828254610ee79190615b10565b90915550610ef590506139c1565b60dc80546fffffffffffffffffffffffffffffffff19166001600160801b0384169081179091556040519081527f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e906020015b60405180910390a15050565b60c98054610f6190615b23565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8d90615b23565b8015610fd85780601f10610faf57610100808354040283529160200191610fd8565b820191905f5260205f20905b815481529060010190602001808311610fbb57829003601f168201915b505050505081565b60cb545f90801561100357610ffe610ff6610de3565b849083613896565b611005565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110669086815260200190565b60405180910390a350600192915050565b60cb545f90801561100357610ffe8161108e610de3565b859190613a27565b60dd5460de545f9190828183106110af5760d8546110b3565b60d9545b60da549091505f906110ee906110d690600160481b900463ffffffff1642615b5b565b6110e09084615b6e565b6110e990615b85565b613a54565b61110090670de0b6b3a7640000615b9f565b905061110c81856138b4565b61112861112183670de0b6b3a7640000615b5b565b85906138b4565b6111329190615b10565b94505050505090565b5f6111458161393e565b8282604051602001611158929190615bbe565b60405160208183030381529060405260c990816111759190615c39565b508282604051602001611189929190615cf5565b60405160208183030381529060405260ca90816111a69190615c39565b50505050565b5f6111b5613bc7565b6111bd613bd6565b845f036111dd5760405163774257f760e01b815260040160405180910390fd5b60da546111f190879060ff1660035f613c01565b5f86815260d1602052604090206112088188613d9b565b60dd5f8282546112189190615b10565b909155505060e3546001600160a01b0316801561128657604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b15801561126f575f80fd5b505af1158015611281573d5f803e3d5ffd5b505050505b5f6112918389613e19565b90508015611324575f8160d3546112a89190615b10565b90506112ba6112b5613e55565b613f65565b60dc546112f5906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b60dd54906001600160801b03166138b4565b60d4546113029083615b10565b111561132057604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061132f611096565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff1661137d8a600101548b5f015489613fa2565b6113878888613fcf565b611394898960d354613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa1580156113ea573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140e9190615d33565b905061143361142c611420428f615b5b565b83906301e13380613896565b8c906138b4565b935050505080886114449190615b10565b93508684111561146757604051632c1b6b4160e21b815260040160405180910390fd5b6114718585614003565b5f89815260d0602090815260408083206001600160a01b0389168452909152812080549091036114c8576001600160a01b0386165f90815260d26020526040902060018101546114c1908c614079565b6001909101555b5f8061150b6114d685614164565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614190565b91509150815f1461152f5781866002015f8282546115299190615b10565b90915550505b611538816141dc565b60405180604001604052808c855f01546115529190615b10565b81526020018585600101546115679190615b10565b90525f8d815260d0602090815260408083206001600160a01b038d811680865291845293829020855181559483015160019095019490945580513381529182018f905281018790529194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139060600160405180910390a46115ee6139c1565b6115f789614208565b604051637b9d893160e01b81523060048201526001600160a01b0386811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b15801561165d575f80fd5b505af115801561166f573d5f803e3d5ffd5b506116a99250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614256565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b811561178a57600182161561176f575f81815260d0602090815260408083206001600160a01b038a16845290915281206001810154815491929161172a9190615b10565b90506117368188615b10565b96508242111561176c5761175f8561174e8542615b5b565b6117589190615b6e565b82906138b4565b6117699088615b10565b96505b50505b60019190911c906117836224ea0082615b10565b90506116e6565b600284015480156117ab5761179e81611dba565b6117a89087615b10565b95505b5050505050919050565b5f6117be613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530866117f8866122af565b6040518463ffffffff1660e01b815260040161181693929190615d4a565b5f6040518083038186803b15801561182c575f80fd5b505afa15801561183e573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561190257604051630149e46f60e01b81526001600160a01b038681166004830152821690630149e46f906024015f604051808303815f87803b158015611895575f80fd5b505af11580156118a7573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b1580156118eb575f80fd5b505af11580156118fd573d5f803e3d5ffd5b505050505b61190d858585614298565b95945050505050565b5f6119208161393e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610f48565b5f61196c8161393e565b6119776112b5613e55565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119ec8161393e565b6119f68383614372565b505050565b5f611a04613bc7565b611a0c613bd6565b835f03611a2c576040516356316e8760e01b815260040160405180910390fd5b60da54611a4090869060ff1660035f613c01565b5f85815260d16020526040812090611a588288613d9b565b90508060dd5f828254611a6b9190615b10565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f918291611ab0918a906143f7565b9092509050611abf8289615b10565b945086851015611ae257604051632c1b6b4160e21b815260040160405180910390fd5b611aec8489614448565b60d35f828254611afc9190615b5b565b90915550611b0c90508183615b10565b846002015f828254611b1e9190615b5b565b925050819055508060d55f828254611b369190615b10565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611b8b576001600160a01b0387165f90815260d2602052604090208054611b88908c614079565b90555b88815f015f828254611b9d9190615b10565b9250508190555082816001015f828254611bb79190615b10565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611c0c6139c1565b611c158a614208565b611c4a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614478565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611c8c57611c876144be565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611cc5575f80fd5b611ccf8282614557565b5050565b5f611cdc613bc7565b60da54611cf190869060ff1660036002613c01565b611cff8585858560016145bd565b9050611d096139c1565b611d3e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611d708161393e565b611d78614919565b50565b5f611d858161393e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610f48565b60df545f90801561100357610ffe611dd06137ab565b849083613a27565b5f611de1613bc7565b6001600160a01b0384163303611e0a576040516344511af160e01b815260040160405180910390fd5b60405163042dcf6b60e31b81523060048201526001600160a01b0383811660248301528581166044830152606482018590527f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890608401602060405180830381865afa158015611e83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea79190615d33565b9250825f03611ec95760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611f0357508515155b15612010576001821615611ff5575f81421015611f3a57611f278288898b5f6145bd565b9050611f338188615b5b565b9650611fe7565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611f6c9190615b10565b9150505f611f9360d6548542611f829190615b5b565b611f8c9190615b6e565b83906138b4565b611f9d9083615b10565b9050888111611fac5788611fb7565b611fb7898383613896565b9250825f03611fc8575f9850611fe4565b611fd584848b8d5f6145bd565b9250611fe1838a615b5b565b98505b50505b611ff18186615b10565b9450505b60019190911c906120096224ea0082615b10565b9050611ef5565b505083158015906120245750600281015415155b15612059575f612033856132ba565b90508015612057575f6120468288614966565b5090506120538185615b10565b9350505b505b604051636e1b003160e01b81523060048201526001600160a01b0384811660248301528681166044830152606482018490525f9182917f00000000000000000000000000000000000000000000000000000000000000001690636e1b0031906084016040805180830381865afa1580156120d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f99190615d6e565b915091508160d55f82825461210e9190615b10565b9091555050306001600160a01b038616036121345761212f30338984614ac0565b612199565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906121649033908b908690600401615d4a565b5f604051808303815f87803b15801561217b575f80fd5b505af115801561218d573d5f803e3d5ffd5b505050506121996139c1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b0388811660048301527f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906024015f604051808303815f87803b15801561224c575f80fd5b505af115801561225e573d5f803e3d5ffd5b505050506122a5333084876122739190615b10565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614478565b5050509392505050565b5f610ebf82610fe0565b5f6122c38161393e565b6122cb614cb9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61231d8361388c565b9050805f0361232a575f80fd5b61235f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614478565b6123698282614ce4565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8382614d57565b60df545f90801561100357610ffe8161108e6137ab565b5f806123da613bc7565b6123e48484614966565b90925090506123f16139c1565b6124266001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614478565b9250929050565b5f6124378161393e565b60e35460ff600160a01b90910416151582151514611ccf5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee6989061249e90851515815260200190565b60405180910390a25050565b6124b2614db6565b6124ba614e32565b565b5f6124c68161393e565b60db546001600160a01b0316156124e2576124e26112b5613e55565b60db80546001600160a01b0319166001600160a01b0384161790556125056139c1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146125af576040516317568c8f60e21b815260040160405180910390fd5b6125b7613948565b60dd5f8282546125c79190615b10565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b81156127a3576001821615612788575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916126439190615b10565b90508086106127855760e3546001600160a01b031680156126b557604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b15801561269e575f80fd5b505af11580156126b0573d5f803e3d5ffd5b505050505b6126bf8288615b5b565b96506126cb8287615b10565b83545f86815260d1602052604090209197506126e79190614e6f565b60d35f8282546126f79190615b5b565b90915550505f84815260d0602090815260408083206001600160a01b038d16845290915281208181556001908101919091558801546127369085614e92565b600189015560408051838152602081018490526001600160a01b038b1691339187917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a4505b50505b60019190911c9061279c6224ea0082615b10565b90506125ff565b6002850154158015906127c057506127ba846132ba565b93508315155b156127e1575f6127d08588614966565b5090506127dd8185615b10565b9350505b821561283c578260d55f8282546127f89190615b5b565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b6128446139c1565b505050505050565b5f61285683613051565b905061288d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b6128978284614ce4565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8184614d57565b60ca8054610f6190615b23565b5f54610100900460ff161580801561291257505f54600160ff909116105b8061292b5750303b15801561292b57505f5460ff166001145b612933575f80fd5b5f805460ff191660011790558015612954575f805461ff0019166101001790555b61295c614f52565b612964614f64565b60da805468ffffffffffffffff0019166101004263ffffffff1690810268ffffffff0000000000191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129b95f33614372565b6129c38b8b61113b565b6129cc89611916565b6129d588610ec5565b6129de876124bc565b6129e786612e8d565b6129f085611d7b565b6129f984613753565b612a0383836122b9565b8015612a48575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a5e613bc7565b845f03612a7e5760405163b8cb621960e01b815260040160405180910390fd5b60da54612a9390879060ff1660036002613c01565b5f86815260d160205260409020612aaa8188613d9b565b60dd5f828254612aba9190615b10565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612b049190615b10565b871115612b1f5760208101518151612b1c9190615b10565b96505b6040805180820190915281518152602080830151908201525f90612b4f90612b47908a614f7e565b518490614fc4565b60d354612b5c9190615b10565b905060dd5460d45482612b6f9190615b10565b1115612b8d57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612cba575f612ba1611096565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bf58a600101548b5f01548a613fa2565b612bff8989613fcf565b612c0a8a8a8a613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa158015612c60573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c849190615d33565b9050612caf612c96611420428f615b5b565b612ca890670de0b6b3a7640000615b10565b8c90615008565b965050505050612cbe565b8692505b85831015612cdf57604051632c1b6b4160e21b815260040160405180910390fd5b612ce98484614003565b5f80612d35612d00612cfb878c615b5b565b614164565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614190565b9150915081846002015f828254612d4c9190615b10565b90915550612d5b9050816141dc565b612d65838a61501c565b5060208301518351175f03612db8575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612db1908c614e92565b9055612de8565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b60408051338152602081018b90529081018690526001600160a01b0380881691908916908c907fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c9060600160405180910390a4612e436139c1565b612e4c8a614208565b612e806001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614256565b5050505095945050505050565b5f612e978161393e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610f48565b5f612ed5613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612f0f866122af565b6040518463ffffffff1660e01b8152600401612f2d93929190615d4a565b5f6040518083038186803b158015612f43575f80fd5b505afa158015612f55573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561301757604051630149e46f60e01b81523360048201526001600160a01b03821690630149e46f906024015f604051808303815f87803b158015612faa575f80fd5b505af1158015612fbc573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b158015613000575f80fd5b505af1158015613012573d5f803e3d5ffd5b505050505b611d3e848461507a565b5f8061302b613bc7565b6123e4613037856132ba565b84614966565b613045613bc7565b6119f633848484614ac0565b60cb545f90801561100357610ffe611dd0610de3565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db5906130b990309086908990600401615d4a565b5f6040518083038186803b1580156130cf575f80fd5b505afa1580156130e1573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561314f57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613138575f80fd5b505af115801561314a573d5f803e3d5ffd5b505050505b61315a8585856150dd565b91506131646139c1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530846131a7886122af565b6040518463ffffffff1660e01b81526004016131c593929190615d4a565b5f6040518083038186803b1580156131db575f80fd5b505afa1580156131ed573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561325b57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613244575f80fd5b505af1158015613256573d5f803e3d5ffd5b505050505b61315a8585856151e7565b5f6132708161393e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f90801561100357610ffe816132d16137ab565b859190613896565b60cb545f90801561100357610ffe816132d1610de3565b6001600160a01b0381165f90815260cc6020526040812054610ebf90610fe0565b4284101561331d575f80fd5b5f6001613328611c57565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613430573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134665750876001600160a01b0316816001600160a01b0316145b61346e575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134df613bc7565b6134e7613bd6565b6134f18285614003565b60e3546001600160a01b0316801561355a57604051636c912dad60e01b81526001600160a01b038481166004830152821690636c912dad906024015f604051808303815f87803b158015613543575f80fd5b505af1158015613555573d5f803e3d5ffd5b505050505b6135656112b5613e55565b61356e856123b9565b91505f8560d45461357f9190615b10565b60d481905560dc549091506135b0906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b8160d3546135be9190615b10565b11156135dc57604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135ed9190615b10565b90915550506001600160a01b0384165f90815260d260205260408120600201805485929061361c908490615b10565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136746139c1565b604051637b9d893160e01b81523060048201526001600160a01b0385811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b1580156136da575f80fd5b505af11580156136ec573d5f803e3d5ffd5b506137269250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614256565b50509392505050565b5f828152606560205260409020600101546137498161393e565b6119f68383614557565b5f61375d8161393e565b60dc80546001600160801b03908116600160801b918516918202179091556040519081527fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90602001610f48565b60d45460dd5460da545f929190839061387890613871906137d990600160281b900463ffffffff1642615b5b565b60db546301e13380906001600160a01b0316637c21fb1d6137fa888a613fcf565b613807898b60d354613fe7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613846573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061386a9190615d33565b9190613896565b84906138b4565b90506138848184615b10565b935050505090565b5f610ebf826132d9565b8282028115158415858304851417166138ad575f80fd5b0492915050565b5f6110058383670de0b6b3a7640000613896565b60da545f9081906138e490610100900463ffffffff1642615b5b565b9050805f036138f4575f91505090565b60da5461393890829061392490613912906224ea009060ff16615b6e565b60dc546001600160801b0316906138b4565b61392e9084615b10565b60d5549190613896565b91505090565b611d7881336152fc565b5f6139516138c8565b90508060d55f8282546139649190615b5b565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a3e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a6d57505f919050565b680755bf798b4a1bf1e58212613a81575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156124ba575f80fd5b60e354600160a01b900460ff16156124ba5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613c0f6224ea0086615d90565b15613c1c57506001613c6f565b428511613c2b57506002613c6f565b613c3b60ff85166224ea00615b6e565b613c486224ea0042615d90565b613c529042615b5b565b613c5c9190615b10565b851115613c6b57506004613c6f565b5060035b826004811115613c8157613c81615da3565b816004811115613c9357613c93615da3565b14158015613cc35750816004811115613cae57613cae615da3565b816004811115613cc057613cc0615da3565b14155b15613d94575f826004811115613cdb57613cdb615da3565b03613d2f57806004811115613cf257613cf2615da3565b836004811115613d0457613d04615da3565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d4157613d41615da3565b836004811115613d5357613d53615da3565b836004811115613d6557613d65615da3565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d26565b5050505050565b60038201545f9042831115613def5760028401544260038601819055613dd890613dc6908490615b5b565b613dd08487615b5b565b839190613896565b9250613de48382615b5b565b600286015550613e12565b828103613dfe575f9150613e12565b600384018390556002840180545f90915591505b5092915050565b81545f9081613e288483615b10565b9050613e41613e3b838760010154615342565b82615357565b613e4b9082615b5b565b9455509192915050565b60d45460dd545f919082613e698284613fcf565b60da549091505f90613ebb9061112190613e9090600160281b900463ffffffff1642615b5b565b60db5460d3546301e13380916001600160a01b031690637c21fb1d908890613807908b908d90613fe7565b9050613ec78185615b10565b9350613ede60e254826138b490919063ffffffff16565b945084613eeb8285615b10565b613ef59190615b5b565b60dd5560d484905560da805468ffffffff00000000001916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611d785760e154613f89906001600160a01b0316613f848361388c565b614ce4565b8060dd5f828254613f9a9190615b10565b909155505050565b5f8115801590613fb157508383115b613fbb575f611d3e565b611d3e82613fc98686615b5b565b90615365565b5f825f03613fdd575f611005565b6110058284615365565b5f835f03613ff5575f611d3e565b611d3e84613fc98486615b10565b336001600160a01b03831614611ccf576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146119f65761404782611077565b6140519082615b5b565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f0361408f57506401000000008117610ebf565b63ffffffff83168083101561410d575f6224ea006140ad8584615b5b565b6140b79190615db7565b90506140c581610100615b5b565b85901c156140e65760405163293cc41f60e21b815260040160405180910390fd5b6140f1816020615b10565b602086901c901b94508484176401000000001792505050610ebf565b5f6224ea0061411c8386615b5b565b6141269190615db7565b905060df81111561414a5760405163293cc41f60e21b815260040160405180910390fd5b614155816020615b10565b6001901b851792505050610ebf565b5f8061417b60e254846138b490919063ffffffff16565b905061418681613f65565b6110058184615b5b565b5f8082156141c4576141bf6141ad6141a787615379565b85615357565b6141b79085615b5b565b859085613896565b6141c6565b5f5b90506141d28185615b5b565b9150935093915050565b805f036141e65750565b60e254156141f757611d7881613f65565b8060d55f828254613f9a9190615b10565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806111a6575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142f1576142cd8382615b5b565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614318908490615b5b565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615ed28339815191529061435f9087815260200190565b60405180910390a3506001949350505050565b61437c828261253c565b611ccf575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143b33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f61440386615379565b9050801561443f576144246144188683615357565b60408801519083613896565b925061443083856138b4565b915061443c8284615b5b565b92505b50935093915050565b815460018301545f919061445c8482615b10565b600186015561190d61446e8383615357565b6141a79084615b5b565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d94575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144ef9190615dca565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614561828261253c565b15611ccf575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145de5760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906145f68289613d9b565b90508060dd5f8282546146099190615b10565b90915550505f88815260d0602090815260408083206001600160a01b038916845282528083208151808301909252805480835260019091015492820183905290929161465f918b9161465a91615b10565b615357565b6040805180820190915283518152602080850151908201529091505f906146869083614f7e565b5160e3549091506001600160a01b031680156146f357604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b1580156146dc575f80fd5b505af11580156146ee573d5f803e3d5ffd5b505050505b8b42101561479b5787156147935760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147419186906143f7565b90925090506147508183615b10565b886002015f8282546147629190615b5b565b925050819055508060d55f82825461477a9190615b10565b9091555061478a90508286615b5b565b985050506147e2565b8296506147e2565b60d6546147b6906147ac8e42615b5b565b6138719190615b6e565b6147c09084615b10565b96506147cc8388615b5b565b60d55f8282546147dc9190615b10565b90915550505b8987111561480357604051632c1b6b4160e21b815260040160405180910390fd5b61480d8683614e6f565b60d35f82825461481d9190615b5b565b9091555061482d9050848461501c565b5060208401518451175f03614889575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d29092529091209081015461487e908e614e92565b6001909101556148b9565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a461490a8c614208565b50505050505095945050505050565b614921615397565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001613a1d565b60e3545f9081906001600160a01b031680156149d357604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b1580156149bc575f80fd5b505af11580156149ce573d5f803e3d5ffd5b505050505b6149de6112b5613e55565b6001600160a01b0384165f90815260d2602052604090206002810154614a048782615357565b9350614a0f84611dba565b9450845f03614a315760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a429190615b5b565b90915550614a5290508482615b5b565b82600201819055508360df5f828254614a6b9190615b5b565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614ae05760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b0385811660048301523060248301527f0000000000000000000000000000000000000000000000000000000000000000169063e16ee720906044015f6040518083038186803b158015614b45575f80fd5b505afa158015614b57573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bc557604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614bae575f80fd5b505af1158015614bc0573d5f803e3d5ffd5b505050505b5f614bcf83611077565b9050614bdb83826153a5565b614be5848261541e565b60408051848152602081018390526001600160a01b03808716929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c7591815260200190565b60405180910390a3614c856139c1565b6128446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614256565b614cc1611096565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d4d57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614d36575f80fd5b505af1158015614d48573d5f803e3d5ffd5b505050505b6119f68383615485565b614d5f613bc7565b614d67613bd6565b614d6f614cb9565b5f614d78613e55565b90505f614d83613948565b9050614d8f8482615b10565b60dd5f828254614d9f9190615b10565b90915550614dae905082613f65565b6111a66139c1565b614de07f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361253c565b158015614e145750614e127f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361253c565b155b156124ba57604051631d006fdb60e31b815260040160405180910390fd5b614e3a613bc7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861494e3390565b815460018301545f9190614e838483615b5b565b855561190d61446e8383615357565b5f821580614ea65750816401000000001783145b15614eb257505f610ebf565b63ffffffff8316808303614f2057602184901c60015b60018216158015614ed857508115155b15614ee957600191821c9101614ec8565b6020614ef58282615b10565b9690961c90951b9485614f0b6224ea0083615b6e565b614f159087615b10565b179350505050610ebf565b6224ea00614f2e8285615b5b565b614f389190615db7565b614f43906020615b10565b6001901b198416915050610ebf565b5f54610100900460ff166124ba575f80fd5b5f54610100900460ff16614f76575f80fd5b6124ba6154d4565b604080518082019091525f8082526020820152825160208401515f91614fa8916132d19082615b10565b8085529050614fb78184615b5b565b6020850152509192915050565b815460018301545f919082614fd98583615b5b565b9050614fe58184615357565b614fef8385615357565b614ff99190615b5b565b60019096015550929392505050565b5f61100583670de0b6b3a764000084613896565b604080518082019091525f8082526020820152602083015183515f9161504191615b10565b90505f61504e8483615b5b565b855190915061505f90829084613896565b80865261506c9082615b5b565b602086015250929392505050565b335f90815260cc602052604081208054839190839061509a908490615b5b565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615ed2833981519152906110669086815260200190565b5f6150e784611077565b9050336001600160a01b03831614615154576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151525761512e8282615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61515e84826153a5565b615168828261541e565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614256565b5f336001600160a01b03831614615253576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146152515761522d8582615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61525c846122af565b9050805f03615269575f80fd5b61527381856153a5565b61527d828561541e565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614256565b615306828261253c565b611ccf57615313816154f2565b61531e836020615504565b60405160200161532f929190615e53565b6040516020818303038152906040525f80fd5b5f8183116153505781611005565b5090919050565b5f8183106153505781611005565b5f61100583670de0b6b3a764000084613a27565b805160208201515f919061538d8282615357565b611d3e9083615b5b565b60975460ff166124ba575f80fd5b6153ad613bc7565b6153b5614cb9565b6153c06112b5613e55565b5f6153c9613948565b90505f838260dd546153db9190615b10565b6153e59190615b5b565b90508060d45460d3546153f89190615b10565b111561541657604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc602052604081208054839290615445908490615b5b565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615ed2833981519152906020015b60405180910390a35050565b8060cb5f8282546154969190615b10565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615ed28339815191529101615479565b5f54610100900460ff166154e6575f80fd5b6097805460ff19169055565b6060610ebf6001600160a01b03831660145b60605f615512836002615b6e565b61551d906002615b10565b67ffffffffffffffff81111561553557615535615be1565b6040519080825280601f01601f19166020018201604052801561555f576020820181803683370190505b509050600360fc1b815f8151811061557957615579615ea8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106155a7576155a7615ea8565b60200101906001600160f81b03191690815f1a9053505f6155c9846002615b6e565b6155d4906001615b10565b90505b600181111561564b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061560857615608615ea8565b1a60f81b82828151811061561e5761561e615ea8565b60200101906001600160f81b03191690815f1a90535060049490941c9361564481615ebc565b90506155d7565b508315611005575f80fd5b6001600160a01b0381168114611d78575f80fd5b5f6020828403121561567a575f80fd5b813561100581615656565b5f60208284031215615695575f80fd5b81356001600160e01b031981168114611005575f80fd5b80356001600160801b03811681146156c2575f80fd5b919050565b5f602082840312156156d7575f80fd5b611005826156ac565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615725575f80fd5b5035919050565b5f806040838503121561573d575f80fd5b823561574881615656565b946020939093013593505050565b5f8083601f840112615766575f80fd5b50813567ffffffffffffffff81111561577d575f80fd5b602083019150836020828501011115612426575f80fd5b5f80602083850312156157a5575f80fd5b823567ffffffffffffffff8111156157bb575f80fd5b6157c785828601615756565b90969095509350505050565b5f805f805f60a086880312156157e7575f80fd5b853594506020860135935060408601359250606086013561580781615656565b9150608086013561581781615656565b809150509295509295909350565b5f805f60608486031215615837575f80fd5b833561584281615656565b9250602084013561585281615656565b929592945050506040919091013590565b803560ff811681146156c2575f80fd5b5f60208284031215615883575f80fd5b61100582615863565b5f806040838503121561589d575f80fd5b8235915060208301356158af81615656565b809150509250929050565b5f805f80608085870312156158cd575f80fd5b84359350602085013592506040850135915060608501356158ed81615656565b939692955090935050565b5f805f6060848603121561590a575f80fd5b833561591581615656565b925060208401359150604084013561592c81615656565b809150509250925092565b5f8060408385031215615948575f80fd5b50508035926020909101359150565b5f60208284031215615967575f80fd5b81358015158114611005575f80fd5b5f805f805f805f805f806101208b8d031215615990575f80fd5b8a3567ffffffffffffffff8111156159a6575f80fd5b6159b28d828e01615756565b909b5099506159c5905060208c01615863565b97506159d360408c016156ac565b965060608b01356159e381615656565b955060808b0135945060a08b013593506159ff60c08c016156ac565b925060e08b013591506101008b013590509295989b9194979a5092959850565b5f805f60608486031215615a31575f80fd5b833592506020840135615a4381615656565b9150604084013561592c81615656565b5f805f805f805f60e0888a031215615a69575f80fd5b8735615a7481615656565b96506020880135615a8481615656565b95506040880135945060608801359350615aa060808901615863565b925060a0880135915060c0880135905092959891949750929550565b5f8060408385031215615acd575f80fd5b8235615ad881615656565b915060208301356158af81615656565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ebf57610ebf615afc565b600181811c90821680615b3757607f821691505b602082108103615b5557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610ebf57610ebf615afc565b8082028115828204841417610ebf57610ebf615afc565b5f600160ff1b8201615b9957615b99615afc565b505f0390565b8181035f831280158383131683831282161715613e1257613e12615afc565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156119f657805f5260205f20601f840160051c81016020851015615c1a5750805b601f840160051c820191505b81811015613d94575f8155600101615c26565b815167ffffffffffffffff811115615c5357615c53615be1565b615c6781615c618454615b23565b84615bf5565b602080601f831160018114615c9a575f8415615c835750858301515b5f19600386901b1c1916600185901b178555612844565b5f85815260208120601f198616915b82811015615cc857888601518255948401946001909101908401615ca9565b5085821015615ce557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b03828116828216039080821115613e1257613e12615afc565b5f60208284031215615d43575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215615d7f575f80fd5b505080516020909101519092909150565b5f82615d9e57615d9e615ae8565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615dc557615dc5615ae8565b500490565b5f808354615dd781615b23565b60018281168015615def5760018114615e0457615e30565b60ff1984168752821515830287019450615e30565b875f526020805f205f5b85811015615e275781548a820152908401908201615e0e565b50505082870194505b50929695505050505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f615e846017830185615e3c565b7001034b99036b4b9b9b4b733903937b6329607d1b815261190d6011820185615e3c565b634e487b7160e01b5f52603260045260245ffd5b5f81615eca57615eca615afc565b505f19019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204485d3d9d92eeb57ec453d55009460985e73455784e22d97a9959ce3f189d91364736f6c63430008190033", - "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610539575f3560e01c80636e76fc8f116102bf578063b2a02ff111610186578063d5164184116100ef578063e63ab1e9116100a9578063ef8b30f711610084578063ef8b30f714610d5e578063f3fdb15a14610d71578063fb0fc4c314610d84578063fea45d9414610d9b575f80fd5b8063e63ab1e914610d26578063e94b3c2114610d4d578063eee8c9e014610d56575f80fd5b8063d516418414610c92578063d547741f14610ca5578063d6b7494f14610cb8578063d905777e14610cc1578063dd62ed3e14610ce9578063e00b262514610d13575f80fd5b8063c63d75b611610140578063c63d75b614610831578063c6e6f59214610bf7578063ccfd8b1114610c0a578063ce96cb7714610c3b578063d2681a0b14610c4e578063d505accf14610c7f575f80fd5b8063b2a02ff114610b85578063b3d7f6b914610b98578063b460af9414610bab578063ba08765214610bbe578063bee36bb314610bd1578063bf722ca214610be4575f80fd5b806391d1485411610228578063a16a8850116101e2578063a16a885014610b27578063a1bab44714610b3c578063a1e8f02b14610b4f578063a217fddf14610b58578063a9059cbb14610b5f578063acb7081514610b72575f80fd5b806391d1485414610ac0578063926bb63314610ad357806394bf804d14610ae657806395d89b4114610af957806397bce8d014610b01578063a05a091a14610b14575f80fd5b80637ecebe00116102795780637ecebe0014610a6b5780638456cb5914610a8a5780638a1baa4614610a925780638bcd401614610a9b5780638c3cba5a14610aae5780638d0e5f0214610ab7575f80fd5b80636e76fc8f146109c05780636eb9ffeb146109e757806370a0823114610a1357806378007e2314610a325780637ad226dc14610a455780637e932d3214610a58575f80fd5b8063313ce567116104035780634322b7141161036c5780635cc2ef83116103265780635cc2ef83146109225780635e5c06e21461093557806361d027b31461097e57806366601032146109915780636bb65f531461099a5780636e553f65146109ad575f80fd5b80634322b7141461085857806347dffde01461088a5780634914c0081461089d5780634cdad506146108b05780634e7c5059146108c35780635c975abb14610917575f80fd5b80633aa18d6f116103bd5780633aa18d6f146107e65780633c6f317f146107ef5780633ec045a6146108025780633f4ba83a14610829578063402d267d1461083157806342da42bf14610845575f80fd5b8063313ce5671461073e57806333eeb1471461076557806334f7d1f2146107795780633644e5151461078c57806336568abe1461079457806338d52e0f146107a7575f80fd5b806313700101116104a5578063248a9ca31161045f578063248a9ca3146106bb57806325fc07a9146106dd57806328acf2cf146106fc5780632c5dcc771461070f5780632e0af008146107225780632f2ff15d1461072b575f80fd5b8063137001011461065d57806318160ddd146106705780631a5b9e62146106795780631a90f1861461068c5780631d43b30b1461069557806323b872dd146106a8575f80fd5b806307a2d13a116104f657806307a2d13a146105d6578063095ea7b3146105e95780630a28a477146105fc5780630ab69be81461060f5780630e52dbec146106365780630f2b75aa14610655575f80fd5b8063014a296f1461053d57806301e1d1141461056a57806301ffc9a714610580578063022d8af5146105a35780630539fa8c146105b857806306fdde03146105c1575b5f80fd5b61055061054b36600461566a565b610dae565b604080519283526020830191909152015b60405180910390f35b610572610de3565b604051908152602001610561565b61059361058e366004615685565b610e8f565b6040519015158152602001610561565b6105b66105b13660046156c7565b610ec5565b005b61057260d85481565b6105c9610f54565b60405161056191906156e0565b6105726105e4366004615715565b610fe0565b6105936105f736600461572c565b61100c565b61057261060a366004615715565b611077565b61055061061d366004615715565b5f90815260d16020526040902080546001909101549091565b60da546106439060ff1681565b60405160ff9091168152602001610561565b610572611096565b6105b661066b366004615794565b61113b565b61057260cb5481565b6105726106873660046157d3565b6111ac565b61057260d45481565b6105726106a336600461566a565b6116b5565b6105936106b6366004615825565b6117b5565b6105726106c9366004615715565b5f9081526065602052604090206001015490565b6105726106eb366004615715565b5f90815260d1602052604090205490565b6105b661070a366004615873565b611916565b6105b661071d36600461572c565b611962565b61057260dd5481565b6105b661073936600461588c565b6119d2565b6106437f000000000000000000000000000000000000000000000000000000000000000081565b60e35461059390600160a01b900460ff1681565b6105726107873660046158ba565b6119fb565b610572611c57565b6105b66107a236600461588c565b611cb1565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610561565b61057260d95481565b6105726107fd3660046158ba565b611cd3565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6105b6611d46565b61057261083f36600461566a565b505f1990565b6105b6610853366004615715565b611d7b565b60dc5461087290600160801b90046001600160801b031681565b6040516001600160801b039091168152602001610561565b610572610898366004615715565b611dba565b6105726108ab3660046158f8565b611dd8565b6105726108be366004615715565b6122af565b6108f76108d1366004615715565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610561565b60975460ff16610593565b6105b6610930366004615937565b6122b9565b61096361094336600461566a565b60d26020525f908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610561565b60e1546107ce906001600160a01b031681565b61057260e25481565b60e3546107ce906001600160a01b031681565b6105726109bb36600461588c565b612313565b6105727f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da546109fe90600160281b900463ffffffff1681565b60405163ffffffff9091168152602001610561565b610572610a2136600461566a565b60cc6020525f908152604090205481565b610572610a40366004615715565b6123b9565b610550610a5336600461588c565b6123d0565b6105b6610a66366004615957565b61242d565b610572610a7936600461566a565b60ce6020525f908152604090205481565b6105b66124aa565b61057260d55481565b6105b6610aa936600461566a565b6124bc565b61057260d35481565b61057260df5481565b610593610ace36600461588c565b61253c565b6105b6610ae136600461566a565b612566565b610572610af436600461588c565b61284c565b6105c96128e7565b6105b6610b0f366004615976565b6128f4565b610572610b223660046157d3565b612a55565b60da546109fe90610100900463ffffffff1681565b6105b6610b4a366004615715565b612e8d565b61057260d75481565b6105725f81565b610593610b6d36600461572c565b612ecc565b610550610b8036600461588c565b613021565b6105b6610b93366004615825565b61303d565b610572610ba6366004615715565b613051565b610572610bb9366004615a1f565b613067565b610572610bcc366004615a1f565b61316c565b6105b6610bdf36600461566a565b613266565b610572610bf2366004615715565b6132ba565b610572610c05366004615715565b6132d9565b610550610c1836600461588c565b60cf60209081525f92835260408084209091529082529020805460019091015482565b610572610c4936600461566a565b6132f0565b610550610c5c36600461588c565b60d060209081525f92835260408084209091529082529020805460019091015482565b6105b6610c8d366004615a53565b613311565b610572610ca0366004615a1f565b6134d6565b6105b6610cb336600461588c565b61372f565b61057260d65481565b610572610ccf36600461566a565b6001600160a01b03165f90815260cc602052604090205490565b610572610cf7366004615abc565b60cd60209081525f928352604080842090915290825290205481565b6105b6610d213660046156c7565b613753565b6105727f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61057260de5481565b6105726137ab565b610572610d6c366004615715565b61388c565b60db546107ce906001600160a01b031681565b60da546109fe90600160481b900463ffffffff1681565b60dc54610872906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610dd190610fe0565b610dda846116b5565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610e55575f81815260d160205260409020600381015480831115610e4957824210610e2f578160020154610e44565b6002820154610e449042839003838603613896565b860195505b50506224ea0001610dfd565b50610e7860e254670de0b6b3a76400000360d454610e716137ab565b03906138b4565b610e806138c8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610ebf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610ecf8161393e565b610ed7613948565b60dd5f828254610ee79190615b10565b90915550610ef590506139c1565b60dc80546fffffffffffffffffffffffffffffffff19166001600160801b0384169081179091556040519081527f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e906020015b60405180910390a15050565b60c98054610f6190615b23565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8d90615b23565b8015610fd85780601f10610faf57610100808354040283529160200191610fd8565b820191905f5260205f20905b815481529060010190602001808311610fbb57829003601f168201915b505050505081565b60cb545f90801561100357610ffe610ff6610de3565b849083613896565b611005565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110669086815260200190565b60405180910390a350600192915050565b60cb545f90801561100357610ffe8161108e610de3565b859190613a27565b60dd5460de545f9190828183106110af5760d8546110b3565b60d9545b60da549091505f906110ee906110d690600160481b900463ffffffff1642615b5b565b6110e09084615b6e565b6110e990615b85565b613a54565b61110090670de0b6b3a7640000615b9f565b905061110c81856138b4565b61112861112183670de0b6b3a7640000615b5b565b85906138b4565b6111329190615b10565b94505050505090565b5f6111458161393e565b8282604051602001611158929190615bbe565b60405160208183030381529060405260c990816111759190615c39565b508282604051602001611189929190615cf5565b60405160208183030381529060405260ca90816111a69190615c39565b50505050565b5f6111b5613bc7565b6111bd613bd6565b845f036111dd5760405163774257f760e01b815260040160405180910390fd5b60da546111f190879060ff1660035f613c01565b5f86815260d1602052604090206112088188613d9b565b60dd5f8282546112189190615b10565b909155505060e3546001600160a01b0316801561128657604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b15801561126f575f80fd5b505af1158015611281573d5f803e3d5ffd5b505050505b5f6112918389613e19565b90508015611324575f8160d3546112a89190615b10565b90506112ba6112b5613e55565b613f65565b60dc546112f5906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b60dd54906001600160801b03166138b4565b60d4546113029083615b10565b111561132057604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061132f611096565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff1661137d8a600101548b5f015489613fa2565b6113878888613fcf565b611394898960d354613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa1580156113ea573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140e9190615d33565b905061143361142c611420428f615b5b565b83906301e13380613896565b8c906138b4565b935050505080886114449190615b10565b93508684111561146757604051632c1b6b4160e21b815260040160405180910390fd5b6114718585614003565b5f89815260d0602090815260408083206001600160a01b0389168452909152812080549091036114c8576001600160a01b0386165f90815260d26020526040902060018101546114c1908c614079565b6001909101555b5f8061150b6114d685614164565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614190565b91509150815f1461152f5781866002015f8282546115299190615b10565b90915550505b611538816141dc565b60405180604001604052808c855f01546115529190615b10565b81526020018585600101546115679190615b10565b90525f8d815260d0602090815260408083206001600160a01b038d811680865291845293829020855181559483015160019095019490945580513381529182018f905281018790529194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139060600160405180910390a46115ee6139c1565b6115f789614208565b604051637b9d893160e01b81523060048201526001600160a01b0386811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b15801561165d575f80fd5b505af115801561166f573d5f803e3d5ffd5b506116a99250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614256565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b811561178a57600182161561176f575f81815260d0602090815260408083206001600160a01b038a16845290915281206001810154815491929161172a9190615b10565b90506117368188615b10565b96508242111561176c5761175f8561174e8542615b5b565b6117589190615b6e565b82906138b4565b6117699088615b10565b96505b50505b60019190911c906117836224ea0082615b10565b90506116e6565b600284015480156117ab5761179e81611dba565b6117a89087615b10565b95505b5050505050919050565b5f6117be613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530866117f8866122af565b6040518463ffffffff1660e01b815260040161181693929190615d4a565b5f6040518083038186803b15801561182c575f80fd5b505afa15801561183e573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561190257604051630149e46f60e01b81526001600160a01b038681166004830152821690630149e46f906024015f604051808303815f87803b158015611895575f80fd5b505af11580156118a7573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b1580156118eb575f80fd5b505af11580156118fd573d5f803e3d5ffd5b505050505b61190d858585614298565b95945050505050565b5f6119208161393e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610f48565b5f61196c8161393e565b6119776112b5613e55565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119ec8161393e565b6119f68383614372565b505050565b5f611a04613bc7565b611a0c613bd6565b835f03611a2c576040516356316e8760e01b815260040160405180910390fd5b60da54611a4090869060ff1660035f613c01565b5f85815260d16020526040812090611a588288613d9b565b90508060dd5f828254611a6b9190615b10565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f918291611ab0918a906143f7565b9092509050611abf8289615b10565b945086851015611ae257604051632c1b6b4160e21b815260040160405180910390fd5b611aec8489614448565b60d35f828254611afc9190615b5b565b90915550611b0c90508183615b10565b846002015f828254611b1e9190615b5b565b925050819055508060d55f828254611b369190615b10565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611b8b576001600160a01b0387165f90815260d2602052604090208054611b88908c614079565b90555b88815f015f828254611b9d9190615b10565b9250508190555082816001015f828254611bb79190615b10565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611c0c6139c1565b611c158a614208565b611c4a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614478565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611c8c57611c876144be565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611cc5575f80fd5b611ccf8282614557565b5050565b5f611cdc613bc7565b60da54611cf190869060ff1660036002613c01565b611cff8585858560016145bd565b9050611d096139c1565b611d3e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611d708161393e565b611d78614919565b50565b5f611d858161393e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610f48565b60df545f90801561100357610ffe611dd06137ab565b849083613a27565b5f611de1613bc7565b6001600160a01b0384163303611e0a576040516344511af160e01b815260040160405180910390fd5b60405163042dcf6b60e31b81523060048201526001600160a01b0383811660248301528581166044830152606482018590527f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890608401602060405180830381865afa158015611e83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea79190615d33565b9250825f03611ec95760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611f0357508515155b15612010576001821615611ff5575f81421015611f3a57611f278288898b5f6145bd565b9050611f338188615b5b565b9650611fe7565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611f6c9190615b10565b9150505f611f9360d6548542611f829190615b5b565b611f8c9190615b6e565b83906138b4565b611f9d9083615b10565b9050888111611fac5788611fb7565b611fb7898383613896565b9250825f03611fc8575f9850611fe4565b611fd584848b8d5f6145bd565b9250611fe1838a615b5b565b98505b50505b611ff18186615b10565b9450505b60019190911c906120096224ea0082615b10565b9050611ef5565b505083158015906120245750600281015415155b15612059575f612033856132ba565b90508015612057575f6120468288614966565b5090506120538185615b10565b9350505b505b604051636e1b003160e01b81523060048201526001600160a01b0384811660248301528681166044830152606482018490525f9182917f00000000000000000000000000000000000000000000000000000000000000001690636e1b0031906084016040805180830381865afa1580156120d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f99190615d6e565b915091508160d55f82825461210e9190615b10565b9091555050306001600160a01b038616036121345761212f30338984614ac0565b612199565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906121649033908b908690600401615d4a565b5f604051808303815f87803b15801561217b575f80fd5b505af115801561218d573d5f803e3d5ffd5b505050506121996139c1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b0388811660048301527f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906024015f604051808303815f87803b15801561224c575f80fd5b505af115801561225e573d5f803e3d5ffd5b505050506122a5333084876122739190615b10565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614478565b5050509392505050565b5f610ebf82610fe0565b5f6122c38161393e565b6122cb614cb9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61231d8361388c565b9050805f0361232a575f80fd5b61235f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614478565b6123698282614ce4565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8382614d57565b60df545f90801561100357610ffe8161108e6137ab565b5f806123da613bc7565b6123e48484614966565b90925090506123f16139c1565b6124266001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614478565b9250929050565b5f6124378161393e565b60e35460ff600160a01b90910416151582151514611ccf5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee6989061249e90851515815260200190565b60405180910390a25050565b6124b2614db6565b6124ba614e32565b565b5f6124c68161393e565b60db546001600160a01b0316156124e2576124e26112b5613e55565b60db80546001600160a01b0319166001600160a01b0384161790556125056139c1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146125af576040516317568c8f60e21b815260040160405180910390fd5b6125b7613948565b60dd5f8282546125c79190615b10565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b81156127a3576001821615612788575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916126439190615b10565b90508086106127855760e3546001600160a01b031680156126b557604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b15801561269e575f80fd5b505af11580156126b0573d5f803e3d5ffd5b505050505b6126bf8288615b5b565b96506126cb8287615b10565b83545f86815260d1602052604090209197506126e79190614e6f565b60d35f8282546126f79190615b5b565b90915550505f84815260d0602090815260408083206001600160a01b038d16845290915281208181556001908101919091558801546127369085614e92565b600189015560408051838152602081018490526001600160a01b038b1691339187917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a4505b50505b60019190911c9061279c6224ea0082615b10565b90506125ff565b6002850154158015906127c057506127ba846132ba565b93508315155b156127e1575f6127d08588614966565b5090506127dd8185615b10565b9350505b821561283c578260d55f8282546127f89190615b5b565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b6128446139c1565b505050505050565b5f61285683613051565b905061288d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b6128978284614ce4565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8184614d57565b60ca8054610f6190615b23565b5f54610100900460ff161580801561291257505f54600160ff909116105b8061292b5750303b15801561292b57505f5460ff166001145b612933575f80fd5b5f805460ff191660011790558015612954575f805461ff0019166101001790555b61295c614f52565b612964614f64565b60da805468ffffffffffffffff0019166101004263ffffffff1690810268ffffffff0000000000191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129b95f33614372565b6129c38b8b61113b565b6129cc89611916565b6129d588610ec5565b6129de876124bc565b6129e786612e8d565b6129f085611d7b565b6129f984613753565b612a0383836122b9565b8015612a48575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a5e613bc7565b845f03612a7e5760405163b8cb621960e01b815260040160405180910390fd5b60da54612a9390879060ff1660036002613c01565b5f86815260d160205260409020612aaa8188613d9b565b60dd5f828254612aba9190615b10565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612b049190615b10565b871115612b1f5760208101518151612b1c9190615b10565b96505b6040805180820190915281518152602080830151908201525f90612b4f90612b47908a614f7e565b518490614fc4565b60d354612b5c9190615b10565b905060dd5460d45482612b6f9190615b10565b1115612b8d57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612cba575f612ba1611096565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bf58a600101548b5f01548a613fa2565b612bff8989613fcf565b612c0a8a8a8a613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa158015612c60573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c849190615d33565b9050612caf612c96611420428f615b5b565b612ca890670de0b6b3a7640000615b10565b8c90615008565b965050505050612cbe565b8692505b85831015612cdf57604051632c1b6b4160e21b815260040160405180910390fd5b612ce98484614003565b5f80612d35612d00612cfb878c615b5b565b614164565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614190565b9150915081846002015f828254612d4c9190615b10565b90915550612d5b9050816141dc565b612d65838a61501c565b5060208301518351175f03612db8575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612db1908c614e92565b9055612de8565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b60408051338152602081018b90529081018690526001600160a01b0380881691908916908c907fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c9060600160405180910390a4612e436139c1565b612e4c8a614208565b612e806001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614256565b5050505095945050505050565b5f612e978161393e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610f48565b5f612ed5613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612f0f866122af565b6040518463ffffffff1660e01b8152600401612f2d93929190615d4a565b5f6040518083038186803b158015612f43575f80fd5b505afa158015612f55573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561301757604051630149e46f60e01b81523360048201526001600160a01b03821690630149e46f906024015f604051808303815f87803b158015612faa575f80fd5b505af1158015612fbc573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b158015613000575f80fd5b505af1158015613012573d5f803e3d5ffd5b505050505b611d3e848461507a565b5f8061302b613bc7565b6123e4613037856132ba565b84614966565b613045613bc7565b6119f633848484614ac0565b60cb545f90801561100357610ffe611dd0610de3565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db5906130b990309086908990600401615d4a565b5f6040518083038186803b1580156130cf575f80fd5b505afa1580156130e1573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561314f57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613138575f80fd5b505af115801561314a573d5f803e3d5ffd5b505050505b61315a8585856150dd565b91506131646139c1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530846131a7886122af565b6040518463ffffffff1660e01b81526004016131c593929190615d4a565b5f6040518083038186803b1580156131db575f80fd5b505afa1580156131ed573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561325b57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613244575f80fd5b505af1158015613256573d5f803e3d5ffd5b505050505b61315a8585856151e7565b5f6132708161393e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f90801561100357610ffe816132d16137ab565b859190613896565b60cb545f90801561100357610ffe816132d1610de3565b6001600160a01b0381165f90815260cc6020526040812054610ebf90610fe0565b4284101561331d575f80fd5b5f6001613328611c57565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613430573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134665750876001600160a01b0316816001600160a01b0316145b61346e575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134df613bc7565b6134e7613bd6565b6134f18285614003565b60e3546001600160a01b0316801561355a57604051636c912dad60e01b81526001600160a01b038481166004830152821690636c912dad906024015f604051808303815f87803b158015613543575f80fd5b505af1158015613555573d5f803e3d5ffd5b505050505b6135656112b5613e55565b61356e856123b9565b91505f8560d45461357f9190615b10565b60d481905560dc549091506135b0906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b8160d3546135be9190615b10565b11156135dc57604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135ed9190615b10565b90915550506001600160a01b0384165f90815260d260205260408120600201805485929061361c908490615b10565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136746139c1565b604051637b9d893160e01b81523060048201526001600160a01b0385811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b1580156136da575f80fd5b505af11580156136ec573d5f803e3d5ffd5b506137269250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614256565b50509392505050565b5f828152606560205260409020600101546137498161393e565b6119f68383614557565b5f61375d8161393e565b60dc80546001600160801b03908116600160801b918516918202179091556040519081527fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90602001610f48565b60d45460dd5460da545f929190839061387890613871906137d990600160281b900463ffffffff1642615b5b565b60db546301e13380906001600160a01b0316637c21fb1d6137fa888a613fcf565b613807898b60d354613fe7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613846573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061386a9190615d33565b9190613896565b84906138b4565b90506138848184615b10565b935050505090565b5f610ebf826132d9565b8282028115158415858304851417166138ad575f80fd5b0492915050565b5f6110058383670de0b6b3a7640000613896565b60da545f9081906138e490610100900463ffffffff1642615b5b565b9050805f036138f4575f91505090565b60da5461393890829061392490613912906224ea009060ff16615b6e565b60dc546001600160801b0316906138b4565b61392e9084615b10565b60d5549190613896565b91505090565b611d7881336152fc565b5f6139516138c8565b90508060d55f8282546139649190615b5b565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a3e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a6d57505f919050565b680755bf798b4a1bf1e58212613a81575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156124ba575f80fd5b60e354600160a01b900460ff16156124ba5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613c0f6224ea0086615d90565b15613c1c57506001613c6f565b428511613c2b57506002613c6f565b613c3b60ff85166224ea00615b6e565b613c486224ea0042615d90565b613c529042615b5b565b613c5c9190615b10565b851115613c6b57506004613c6f565b5060035b826004811115613c8157613c81615da3565b816004811115613c9357613c93615da3565b14158015613cc35750816004811115613cae57613cae615da3565b816004811115613cc057613cc0615da3565b14155b15613d94575f826004811115613cdb57613cdb615da3565b03613d2f57806004811115613cf257613cf2615da3565b836004811115613d0457613d04615da3565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d4157613d41615da3565b836004811115613d5357613d53615da3565b836004811115613d6557613d65615da3565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d26565b5050505050565b60038201545f9042831115613def5760028401544260038601819055613dd890613dc6908490615b5b565b613dd08487615b5b565b839190613896565b9250613de48382615b5b565b600286015550613e12565b828103613dfe575f9150613e12565b600384018390556002840180545f90915591505b5092915050565b81545f9081613e288483615b10565b9050613e41613e3b838760010154615342565b82615357565b613e4b9082615b5b565b9455509192915050565b60d45460dd545f919082613e698284613fcf565b60da549091505f90613ebb9061112190613e9090600160281b900463ffffffff1642615b5b565b60db5460d3546301e13380916001600160a01b031690637c21fb1d908890613807908b908d90613fe7565b9050613ec78185615b10565b9350613ede60e254826138b490919063ffffffff16565b945084613eeb8285615b10565b613ef59190615b5b565b60dd5560d484905560da805468ffffffff00000000001916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611d785760e154613f89906001600160a01b0316613f848361388c565b614ce4565b8060dd5f828254613f9a9190615b10565b909155505050565b5f8115801590613fb157508383115b613fbb575f611d3e565b611d3e82613fc98686615b5b565b90615365565b5f825f03613fdd575f611005565b6110058284615365565b5f835f03613ff5575f611d3e565b611d3e84613fc98486615b10565b336001600160a01b03831614611ccf576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146119f65761404782611077565b6140519082615b5b565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f0361408f57506401000000008117610ebf565b63ffffffff83168083101561410d575f6224ea006140ad8584615b5b565b6140b79190615db7565b90506140c581610100615b5b565b85901c156140e65760405163293cc41f60e21b815260040160405180910390fd5b6140f1816020615b10565b602086901c901b94508484176401000000001792505050610ebf565b5f6224ea0061411c8386615b5b565b6141269190615db7565b905060df81111561414a5760405163293cc41f60e21b815260040160405180910390fd5b614155816020615b10565b6001901b851792505050610ebf565b5f8061417b60e254846138b490919063ffffffff16565b905061418681613f65565b6110058184615b5b565b5f8082156141c4576141bf6141ad6141a787615379565b85615357565b6141b79085615b5b565b859085613896565b6141c6565b5f5b90506141d28185615b5b565b9150935093915050565b805f036141e65750565b60e254156141f757611d7881613f65565b8060d55f828254613f9a9190615b10565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806111a6575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142f1576142cd8382615b5b565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614318908490615b5b565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615ed28339815191529061435f9087815260200190565b60405180910390a3506001949350505050565b61437c828261253c565b611ccf575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143b33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f61440386615379565b9050801561443f576144246144188683615357565b60408801519083613896565b925061443083856138b4565b915061443c8284615b5b565b92505b50935093915050565b815460018301545f919061445c8482615b10565b600186015561190d61446e8383615357565b6141a79084615b5b565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d94575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144ef9190615dca565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614561828261253c565b15611ccf575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145de5760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906145f68289613d9b565b90508060dd5f8282546146099190615b10565b90915550505f88815260d0602090815260408083206001600160a01b038916845282528083208151808301909252805480835260019091015492820183905290929161465f918b9161465a91615b10565b615357565b6040805180820190915283518152602080850151908201529091505f906146869083614f7e565b5160e3549091506001600160a01b031680156146f357604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b1580156146dc575f80fd5b505af11580156146ee573d5f803e3d5ffd5b505050505b8b42101561479b5787156147935760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147419186906143f7565b90925090506147508183615b10565b886002015f8282546147629190615b5b565b925050819055508060d55f82825461477a9190615b10565b9091555061478a90508286615b5b565b985050506147e2565b8296506147e2565b60d6546147b6906147ac8e42615b5b565b6138719190615b6e565b6147c09084615b10565b96506147cc8388615b5b565b60d55f8282546147dc9190615b10565b90915550505b8987111561480357604051632c1b6b4160e21b815260040160405180910390fd5b61480d8683614e6f565b60d35f82825461481d9190615b5b565b9091555061482d9050848461501c565b5060208401518451175f03614889575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d29092529091209081015461487e908e614e92565b6001909101556148b9565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a461490a8c614208565b50505050505095945050505050565b614921615397565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001613a1d565b60e3545f9081906001600160a01b031680156149d357604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b1580156149bc575f80fd5b505af11580156149ce573d5f803e3d5ffd5b505050505b6149de6112b5613e55565b6001600160a01b0384165f90815260d2602052604090206002810154614a048782615357565b9350614a0f84611dba565b9450845f03614a315760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a429190615b5b565b90915550614a5290508482615b5b565b82600201819055508360df5f828254614a6b9190615b5b565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614ae05760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b0385811660048301523060248301527f0000000000000000000000000000000000000000000000000000000000000000169063e16ee720906044015f6040518083038186803b158015614b45575f80fd5b505afa158015614b57573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bc557604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614bae575f80fd5b505af1158015614bc0573d5f803e3d5ffd5b505050505b5f614bcf83611077565b9050614bdb83826153a5565b614be5848261541e565b60408051848152602081018390526001600160a01b03808716929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c7591815260200190565b60405180910390a3614c856139c1565b6128446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614256565b614cc1611096565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d4d57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614d36575f80fd5b505af1158015614d48573d5f803e3d5ffd5b505050505b6119f68383615485565b614d5f613bc7565b614d67613bd6565b614d6f614cb9565b5f614d78613e55565b90505f614d83613948565b9050614d8f8482615b10565b60dd5f828254614d9f9190615b10565b90915550614dae905082613f65565b6111a66139c1565b614de07f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361253c565b158015614e145750614e127f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361253c565b155b156124ba57604051631d006fdb60e31b815260040160405180910390fd5b614e3a613bc7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861494e3390565b815460018301545f9190614e838483615b5b565b855561190d61446e8383615357565b5f821580614ea65750816401000000001783145b15614eb257505f610ebf565b63ffffffff8316808303614f2057602184901c60015b60018216158015614ed857508115155b15614ee957600191821c9101614ec8565b6020614ef58282615b10565b9690961c90951b9485614f0b6224ea0083615b6e565b614f159087615b10565b179350505050610ebf565b6224ea00614f2e8285615b5b565b614f389190615db7565b614f43906020615b10565b6001901b198416915050610ebf565b5f54610100900460ff166124ba575f80fd5b5f54610100900460ff16614f76575f80fd5b6124ba6154d4565b604080518082019091525f8082526020820152825160208401515f91614fa8916132d19082615b10565b8085529050614fb78184615b5b565b6020850152509192915050565b815460018301545f919082614fd98583615b5b565b9050614fe58184615357565b614fef8385615357565b614ff99190615b5b565b60019096015550929392505050565b5f61100583670de0b6b3a764000084613896565b604080518082019091525f8082526020820152602083015183515f9161504191615b10565b90505f61504e8483615b5b565b855190915061505f90829084613896565b80865261506c9082615b5b565b602086015250929392505050565b335f90815260cc602052604081208054839190839061509a908490615b5b565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615ed2833981519152906110669086815260200190565b5f6150e784611077565b9050336001600160a01b03831614615154576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151525761512e8282615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61515e84826153a5565b615168828261541e565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614256565b5f336001600160a01b03831614615253576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146152515761522d8582615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61525c846122af565b9050805f03615269575f80fd5b61527381856153a5565b61527d828561541e565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614256565b615306828261253c565b611ccf57615313816154f2565b61531e836020615504565b60405160200161532f929190615e53565b6040516020818303038152906040525f80fd5b5f8183116153505781611005565b5090919050565b5f8183106153505781611005565b5f61100583670de0b6b3a764000084613a27565b805160208201515f919061538d8282615357565b611d3e9083615b5b565b60975460ff166124ba575f80fd5b6153ad613bc7565b6153b5614cb9565b6153c06112b5613e55565b5f6153c9613948565b90505f838260dd546153db9190615b10565b6153e59190615b5b565b90508060d45460d3546153f89190615b10565b111561541657604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc602052604081208054839290615445908490615b5b565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615ed2833981519152906020015b60405180910390a35050565b8060cb5f8282546154969190615b10565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615ed28339815191529101615479565b5f54610100900460ff166154e6575f80fd5b6097805460ff19169055565b6060610ebf6001600160a01b03831660145b60605f615512836002615b6e565b61551d906002615b10565b67ffffffffffffffff81111561553557615535615be1565b6040519080825280601f01601f19166020018201604052801561555f576020820181803683370190505b509050600360fc1b815f8151811061557957615579615ea8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106155a7576155a7615ea8565b60200101906001600160f81b03191690815f1a9053505f6155c9846002615b6e565b6155d4906001615b10565b90505b600181111561564b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061560857615608615ea8565b1a60f81b82828151811061561e5761561e615ea8565b60200101906001600160f81b03191690815f1a90535060049490941c9361564481615ebc565b90506155d7565b508315611005575f80fd5b6001600160a01b0381168114611d78575f80fd5b5f6020828403121561567a575f80fd5b813561100581615656565b5f60208284031215615695575f80fd5b81356001600160e01b031981168114611005575f80fd5b80356001600160801b03811681146156c2575f80fd5b919050565b5f602082840312156156d7575f80fd5b611005826156ac565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615725575f80fd5b5035919050565b5f806040838503121561573d575f80fd5b823561574881615656565b946020939093013593505050565b5f8083601f840112615766575f80fd5b50813567ffffffffffffffff81111561577d575f80fd5b602083019150836020828501011115612426575f80fd5b5f80602083850312156157a5575f80fd5b823567ffffffffffffffff8111156157bb575f80fd5b6157c785828601615756565b90969095509350505050565b5f805f805f60a086880312156157e7575f80fd5b853594506020860135935060408601359250606086013561580781615656565b9150608086013561581781615656565b809150509295509295909350565b5f805f60608486031215615837575f80fd5b833561584281615656565b9250602084013561585281615656565b929592945050506040919091013590565b803560ff811681146156c2575f80fd5b5f60208284031215615883575f80fd5b61100582615863565b5f806040838503121561589d575f80fd5b8235915060208301356158af81615656565b809150509250929050565b5f805f80608085870312156158cd575f80fd5b84359350602085013592506040850135915060608501356158ed81615656565b939692955090935050565b5f805f6060848603121561590a575f80fd5b833561591581615656565b925060208401359150604084013561592c81615656565b809150509250925092565b5f8060408385031215615948575f80fd5b50508035926020909101359150565b5f60208284031215615967575f80fd5b81358015158114611005575f80fd5b5f805f805f805f805f806101208b8d031215615990575f80fd5b8a3567ffffffffffffffff8111156159a6575f80fd5b6159b28d828e01615756565b909b5099506159c5905060208c01615863565b97506159d360408c016156ac565b965060608b01356159e381615656565b955060808b0135945060a08b013593506159ff60c08c016156ac565b925060e08b013591506101008b013590509295989b9194979a5092959850565b5f805f60608486031215615a31575f80fd5b833592506020840135615a4381615656565b9150604084013561592c81615656565b5f805f805f805f60e0888a031215615a69575f80fd5b8735615a7481615656565b96506020880135615a8481615656565b95506040880135945060608801359350615aa060808901615863565b925060a0880135915060c0880135905092959891949750929550565b5f8060408385031215615acd575f80fd5b8235615ad881615656565b915060208301356158af81615656565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ebf57610ebf615afc565b600181811c90821680615b3757607f821691505b602082108103615b5557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610ebf57610ebf615afc565b8082028115828204841417610ebf57610ebf615afc565b5f600160ff1b8201615b9957615b99615afc565b505f0390565b8181035f831280158383131683831282161715613e1257613e12615afc565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156119f657805f5260205f20601f840160051c81016020851015615c1a5750805b601f840160051c820191505b81811015613d94575f8155600101615c26565b815167ffffffffffffffff811115615c5357615c53615be1565b615c6781615c618454615b23565b84615bf5565b602080601f831160018114615c9a575f8415615c835750858301515b5f19600386901b1c1916600185901b178555612844565b5f85815260208120601f198616915b82811015615cc857888601518255948401946001909101908401615ca9565b5085821015615ce557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b03828116828216039080821115613e1257613e12615afc565b5f60208284031215615d43575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215615d7f575f80fd5b505080516020909101519092909150565b5f82615d9e57615d9e615ae8565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615dc557615dc5615ae8565b500490565b5f808354615dd781615b23565b60018281168015615def5760018114615e0457615e30565b60ff1984168752821515830287019450615e30565b875f526020805f205f5b85811015615e275781548a820152908401908201615e0e565b50505082870194505b50929695505050505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f615e846017830185615e3c565b7001034b99036b4b9b9b4b733903937b6329607d1b815261190d6011820185615e3c565b634e487b7160e01b5f52603260045260245ffd5b5f81615eca57615eca615afc565b505f19019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204485d3d9d92eeb57ec453d55009460985e73455784e22d97a9959ce3f189d91364736f6c63430008190033", - "devdoc": { - "events": { - "AccumulatorAccrual(uint256)": { - "params": { - "timestamp": "current timestamp." - } - }, - "BackupFeeRateSet(uint256)": { - "params": { - "backupFeeRate": "rate charged to the fixed pools to be accrued by the floating depositors." - } - }, - "Borrow(address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets that were borrowed.", - "borrower": "address which will be repaying the borrowed assets.", - "caller": "address which borrowed the asset.", - "receiver": "address that received the borrowed assets.", - "shares": "amount of borrow shares assigned to the account." - } - }, - "BorrowAtMaturity(uint256,address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of the asset that were borrowed.", - "borrower": "address which will be repaying the borrowed assets.", - "caller": "address which borrowed the asset.", - "fee": "extra amount that will need to be paid at maturity.", - "maturity": "maturity in which the account will have to repay the loan.", - "receiver": "address that received the borrowed assets." - } - }, - "DampSpeedSet(uint256,uint256)": { - "params": { - "dampSpeedDown": "represented with 18 decimals.", - "dampSpeedUp": "represented with 18 decimals." - } - }, - "DepositAtMaturity(uint256,address,address,uint256,uint256)": { - "params": { - "assets": "amount of the asset that were deposited.", - "caller": "address which deposited the assets.", - "fee": "is the extra amount that it will be collected at maturity.", - "maturity": "maturity at which the account will be able to collect his deposit + his fee.", - "owner": "address that will be able to withdraw the deposited assets." - } - }, - "EarningsAccumulatorSmoothFactorSet(uint256)": { - "params": { - "earningsAccumulatorSmoothFactor": "factor represented with 18 decimals." - } - }, - "FixedEarningsUpdate(uint256,uint256,uint256)": { - "params": { - "maturity": "maturity date where the earnings were updated.", - "timestamp": "current timestamp.", - "unassignedEarnings": "pending unassigned earnings." - } - }, - "FloatingDebtUpdate(uint256,uint256)": { - "params": { - "timestamp": "current timestamp.", - "utilization": "new floating utilization." - } - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "InterestRateModelSet(address)": { - "params": { - "interestRateModel": "new interest rate model to be used to calculate rates." - } - }, - "Liquidate(address,address,uint256,uint256,address,uint256)": { - "params": { - "assets": "amount of the asset that were repaid.", - "borrower": "address which had the original debt.", - "lendersAssets": "incentive paid to lenders.", - "receiver": "address which repaid the previously borrowed amount.", - "seizeMarket": "address of the asset that were seized by the liquidator.", - "seizedAssets": "amount seized of the collateral." - } - }, - "MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)": { - "params": { - "earningsAccumulator": "earnings accumulator.", - "floatingAssets": "total floating supply assets.", - "floatingBorrowShares": "total floating borrow shares.", - "floatingDebt": "total floating borrow assets.", - "floatingDepositShares": "total floating supply shares.", - "timestamp": "current timestamp." - } - }, - "MaxFuturePoolsSet(uint256)": { - "params": { - "maxFuturePools": "represented with 0 decimals." - } - }, - "Paused(address)": { - "details": "Emitted when the pause is triggered by `account`." - }, - "PenaltyRateSet(uint256)": { - "params": { - "penaltyRate": "penaltyRate percentage per second represented with 18 decimals." - } - }, - "Repay(address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets that was repaid.", - "borrower": "address which had the original debt.", - "caller": "address which repaid the previously borrowed amount.", - "shares": "amount of borrow shares that were subtracted from the account's accountability." - } - }, - "RepayAtMaturity(uint256,address,address,uint256,uint256)": { - "params": { - "assets": "amount that was repaid.", - "borrower": "address which had the original debt.", - "caller": "address which repaid the previously borrowed amount.", - "maturity": "maturity where the account repaid its borrowed amounts.", - "positionAssets": "amount of the debt that was covered in this repayment (penalties could have been repaid)." - } - }, - "ReserveFactorSet(uint256)": { - "params": { - "reserveFactor": "reserveFactor percentage." - } - }, - "RewardsControllerSet(address)": { - "params": { - "rewardsController": "new rewards controller to update account rewards when operating with the Market." - } - }, - "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`)" - }, - "Seize(address,address,uint256)": { - "params": { - "assets": "amount seized of the collateral.", - "borrower": "address which had the original debt.", - "liquidator": "address which seized this collateral." - } - }, - "SpreadBadDebt(address,uint256)": { - "params": { - "assets": "amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.", - "borrower": "address which was cleared from bad debt." - } - }, - "TreasurySet(address,uint256)": { - "params": { - "treasury": "address of the treasury that will receive the minted eTokens.", - "treasuryFeeRate": "represented with 18 decimals." - } - }, - "Unpaused(address)": { - "details": "Emitted when the pause is lifted by `account`." - }, - "WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets withdrawn (can include a discount for early withdraw).", - "caller": "address which withdraw the asset.", - "maturity": "maturity where the account withdraw its deposits.", - "owner": "address which had the assets withdrawn.", - "positionAssets": "position size reduced.", - "receiver": "address which will be collecting the assets." - } - } - }, - "kind": "dev", - "methods": { - "accountSnapshot(address)": { - "params": { - "account": "account to return status snapshot in the specified maturity date." - }, - "returns": { - "_0": "the amount deposited to the floating pool and the amount owed to floating and fixed pools." - } - }, - "borrow(uint256,address,address)": { - "params": { - "assets": "amount to be sent to receiver and repaid by borrower.", - "borrower": "address that will repay the borrowed assets.", - "receiver": "address that will receive the borrowed assets." - }, - "returns": { - "borrowShares": "shares corresponding to the borrowed assets." - } - }, - "borrowAtMaturity(uint256,uint256,uint256,address,address)": { - "params": { - "assets": "amount to be sent to receiver and repaid by borrower.", - "borrower": "address that will repay the borrowed assets.", - "maturity": "maturity date for repayment.", - "maxAssets": "maximum amount of debt that the account is willing to accept.", - "receiver": "address that will receive the borrowed assets." - }, - "returns": { - "assetsOwed": "total amount of assets (principal + fee) to be repaid at maturity." - } - }, - "clearBadDebt(address)": { - "details": "Can only be called from the auditor.", - "params": { - "borrower": "account with insufficient collateral to be cleared the debt." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "depositAtMaturity(uint256,uint256,uint256,address)": { - "params": { - "assets": "amount to receive from the msg.sender.", - "maturity": "maturity date where the assets will be deposited.", - "minAssetsRequired": "minimum amount of assets required by the depositor for the transaction to be accepted.", - "receiver": "address that will be able to withdraw the deposited assets." - }, - "returns": { - "positionAssets": "total amount of assets (principal + fee) to be withdrawn at maturity." - } - }, - "fixedPoolBalance(uint256)": { - "params": { - "maturity": "maturity date of the fixed pool." - }, - "returns": { - "_0": "borrowed and supplied amount of the fixed pool." - } - }, - "fixedPoolBorrowed(uint256)": { - "params": { - "maturity": "maturity date of the fixed pool." - }, - "returns": { - "_0": "borrowed amount of the fixed pool." - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)": { - "details": "can only be called once." - }, - "liquidate(address,uint256,address)": { - "details": "Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.", - "params": { - "borrower": "account that has an outstanding debt across floating or fixed pools.", - "maxAssets": "maximum amount of debt that the liquidator is willing to accept. (it can be less)", - "seizeMarket": "market from which the collateral will be seized to give to the liquidator." - }, - "returns": { - "repaidAssets": "actual amount repaid." - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "previewBorrow(uint256)": { - "params": { - "assets": "amount of assets to borrow." - }, - "returns": { - "_0": "amount of shares that will be asigned to the account after the borrow." - } - }, - "previewDebt(address)": { - "params": { - "borrower": "account to return status snapshot for fixed and floating borrows." - }, - "returns": { - "debt": "the total debt, denominated in number of assets." - } - }, - "previewFloatingAssetsAverage()": { - "returns": { - "_0": "projected `floatingAssetsAverage`." - } - }, - "previewRefund(uint256)": { - "params": { - "shares": "amount of shares to subtract from caller's accountability." - }, - "returns": { - "_0": "amount of assets that will be repaid." - } - }, - "previewRepay(uint256)": { - "params": { - "assets": "amount of assets to repay." - }, - "returns": { - "_0": "amount of shares that will be subtracted from the account after the repay." - } - }, - "redeem(uint256,address,address)": { - "details": "Makes sure that the owner doesn't have shortfall after withdrawing.", - "params": { - "owner": "address which owns the floating pool assets.", - "receiver": "address to which the assets will be transferred.", - "shares": "amount of shares to be redeemed for underlying asset." - }, - "returns": { - "assets": "amount of underlying asset that was withdrawn." - } - }, - "refund(uint256,address)": { - "params": { - "borrowShares": "shares to be subtracted from the borrower's accountability.", - "borrower": "address of the account that has the debt." - }, - "returns": { - "actualShares": "actual subtracted shares from the borrower's accountability.", - "assets": "subtracted assets from the borrower's accountability." - } - }, - "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." - }, - "repay(uint256,address)": { - "params": { - "assets": "assets to be subtracted from the borrower's accountability.", - "borrower": "address of the account that has the debt." - }, - "returns": { - "actualRepay": "the actual amount that should be transferred into the protocol.", - "borrowShares": "subtracted shares from the borrower's accountability." - } - }, - "repayAtMaturity(uint256,uint256,uint256,address)": { - "params": { - "borrower": "address of the account that has the debt.", - "maturity": "maturity date where the assets will be repaid.", - "maxAssets": "maximum amount of debt that the account is willing to accept to be repaid.", - "positionAssets": "amount to be paid for the borrower's debt." - }, - "returns": { - "actualRepayAssets": "the actual amount that was transferred into the protocol." - } - }, - "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." - }, - "seize(address,address,uint256)": { - "details": "Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).", - "params": { - "assets": "amount to be removed from borrower's possession.", - "borrower": "address from which the assets will be seized.", - "liquidator": "address which will receive the seized assets." - } - }, - "setAssetSymbol(string)": { - "params": { - "assetSymbol": "the symbol for the underlying asset." - } - }, - "setBackupFeeRate(uint256)": { - "params": { - "backupFeeRate_": "percentage amount represented with 18 decimals." - } - }, - "setDampSpeed(uint256,uint256)": { - "params": { - "down": "damp speed down, represented with 18 decimals.", - "up": "damp speed up, represented with 18 decimals." - } - }, - "setEarningsAccumulatorSmoothFactor(uint128)": { - "params": { - "earningsAccumulatorSmoothFactor_": "represented with 18 decimals." - } - }, - "setInterestRateModel(address)": { - "params": { - "interestRateModel_": "new interest rate model." - } - }, - "setMaxFuturePools(uint8)": { - "details": "If value is decreased, VALID maturities will become NOT_READY.", - "params": { - "futurePools": "number of pools to be active at the same time." - } - }, - "setPenaltyRate(uint256)": { - "params": { - "penaltyRate_": "percentage represented with 18 decimals." - } - }, - "setReserveFactor(uint128)": { - "params": { - "reserveFactor_": "parameter represented with 18 decimals." - } - }, - "setRewardsController(address)": { - "params": { - "rewardsController_": "new rewards controller." - } - }, - "setTreasury(address,uint256)": { - "params": { - "treasuryFeeRate_": "represented with 18 decimals.", - "treasury_": "address of the treasury that will receive the minted eTokens." - } - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "totalAssets()": { - "returns": { - "_0": "actual floatingAssets plus earnings to be accrued at current timestamp." - } - }, - "totalFloatingBorrowAssets()": { - "returns": { - "_0": "actual floating debt plus projected interest." - } - }, - "transfer(address,uint256)": { - "details": "Makes sure that the caller doesn't have shortfall after transferring.", - "params": { - "shares": "amount of shares to be transferred.", - "to": "address to which the assets will be transferred." - } - }, - "transferFrom(address,address,uint256)": { - "details": "Makes sure that `from` address doesn't have shortfall after transferring.", - "params": { - "from": "address from which the assets will be transferred.", - "shares": "amount of shares to be transferred.", - "to": "address to which the assets will be transferred." - } - }, - "withdraw(uint256,address,address)": { - "details": "Makes sure that the owner doesn't have shortfall after withdrawing.", - "params": { - "assets": "amount of underlying to be withdrawn.", - "owner": "address which owns the floating pool assets.", - "receiver": "address to which the assets will be transferred." - }, - "returns": { - "shares": "amount of shares redeemed for underlying asset." - } - }, - "withdrawAtMaturity(uint256,uint256,uint256,address,address)": { - "params": { - "maturity": "maturity date where the assets will be withdrawn.", - "minAssetsRequired": "minimum amount required by the account (if discount included for early withdrawal).", - "owner": "address that previously deposited the assets.", - "positionAssets": "position size to be reduced.", - "receiver": "address that will receive the withdrawn assets." - }, - "returns": { - "assetsDiscounted": "amount of assets withdrawn (can include a discount for early withdraw)." - } - } - }, - "stateVariables": { - "__gap": { - "custom:oz-renamed-from": "floatingUtilization", - "details": "gap from deprecated state." - }, - "auditor": { - "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" - } - }, - "version": 1 - }, - "userdoc": { - "events": { - "AccumulatorAccrual(uint256)": { - "notice": "Emitted when accumulator distributes earnings." - }, - "BackupFeeRateSet(uint256)": { - "notice": "Emitted when the backupFeeRate parameter is changed by admin." - }, - "Borrow(address,address,address,uint256,uint256)": { - "notice": "Event emitted when an account borrows amount of assets from a floating pool." - }, - "BorrowAtMaturity(uint256,address,address,address,uint256,uint256)": { - "notice": "Emitted when an account borrows amount of an asset from a certain maturity date." - }, - "DampSpeedSet(uint256,uint256)": { - "notice": "Emitted when the damp speeds are changed by admin." - }, - "DepositAtMaturity(uint256,address,address,uint256,uint256)": { - "notice": "Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period." - }, - "EarningsAccumulatorSmoothFactorSet(uint256)": { - "notice": "Emitted when the earningsAccumulatorSmoothFactor is changed by admin." - }, - "FixedEarningsUpdate(uint256,uint256,uint256)": { - "notice": "Emitted when the earnings of a maturity are updated." - }, - "FloatingDebtUpdate(uint256,uint256)": { - "notice": "Emitted when the floating debt is updated." - }, - "Frozen(address,bool)": { - "notice": "Emitted when `account` sets the `isFrozen` flag." - }, - "InterestRateModelSet(address)": { - "notice": "Emitted when the interestRateModel is changed by admin." - }, - "Liquidate(address,address,uint256,uint256,address,uint256)": { - "notice": "Emitted when an account's position had a liquidation." - }, - "MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)": { - "notice": "Emitted when market state is updated." - }, - "MaxFuturePoolsSet(uint256)": { - "notice": "Emitted when the maxFuturePools is changed by admin." - }, - "PenaltyRateSet(uint256)": { - "notice": "Emitted when the penaltyRate is changed by admin." - }, - "Repay(address,address,uint256,uint256)": { - "notice": "Emitted when an account repays amount of assets to a floating pool." - }, - "RepayAtMaturity(uint256,address,address,uint256,uint256)": { - "notice": "Emitted when an account repays its borrows after maturity." - }, - "ReserveFactorSet(uint256)": { - "notice": "Emitted when the reserveFactor is changed by admin." - }, - "RewardsControllerSet(address)": { - "notice": "Emitted when the rewardsController is changed by admin." - }, - "Seize(address,address,uint256)": { - "notice": "Emitted when an account's collateral has been seized." - }, - "SpreadBadDebt(address,uint256)": { - "notice": "Emitted when an account is cleared from bad debt." - }, - "TreasurySet(address,uint256)": { - "notice": "Emitted when the treasury variables are changed by admin." - }, - "WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)": { - "notice": "Emitted when an account withdraws from a fixed rate pool." - } - }, - "kind": "user", - "methods": { - "accountSnapshot(address)": { - "notice": "Gets current snapshot for an account across all maturities." - }, - "accounts(address)": { - "notice": "Tracks fixed deposit and borrow map and floating borrow shares of an account." - }, - "backupFeeRate()": { - "notice": "Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity." - }, - "borrow(uint256,address,address)": { - "notice": "Borrows a certain amount from the floating pool." - }, - "borrowAtMaturity(uint256,uint256,uint256,address,address)": { - "notice": "Borrows a certain amount from a maturity." - }, - "clearBadDebt(address)": { - "notice": "Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`." - }, - "dampSpeedDown()": { - "notice": "Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower." - }, - "dampSpeedUp()": { - "notice": "Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher." - }, - "depositAtMaturity(uint256,uint256,uint256,address)": { - "notice": "Deposits a certain amount to a maturity." - }, - "earningsAccumulator()": { - "notice": "Accumulated earnings from extraordinary sources to be gradually distributed." - }, - "earningsAccumulatorSmoothFactor()": { - "notice": "Factor used for gradual accrual of earnings to the floating pool." - }, - "fixedBorrowPositions(uint256,address)": { - "notice": "Tracks account's fixed borrow positions by maturity, account and position." - }, - "fixedDepositPositions(uint256,address)": { - "notice": "Tracks account's fixed deposit positions by maturity, account and position." - }, - "fixedPoolBalance(uint256)": { - "notice": "Retrieves a fixed pool's borrowed and supplied amount." - }, - "fixedPoolBorrowed(uint256)": { - "notice": "Retrieves a fixed pool's borrowed amount." - }, - "fixedPools(uint256)": { - "notice": "Tracks fixed pools state by maturity." - }, - "floatingAssets()": { - "notice": "Amount of floating assets deposited to the pool." - }, - "floatingAssetsAverage()": { - "notice": "Average of the floating assets to get fixed borrow rates and prevent rate manipulation." - }, - "floatingBackupBorrowed()": { - "notice": "Amount of assets lent by the floating pool to the fixed pools." - }, - "floatingDebt()": { - "notice": "Amount of assets lent by the floating pool to accounts." - }, - "initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)": { - "notice": "Initializes the contract." - }, - "interestRateModel()": { - "notice": "Interest rate model contract used to get the borrow rates." - }, - "isFrozen()": { - "notice": "Flag to prevent new borrows and deposits." - }, - "lastAccumulatorAccrual()": { - "notice": "Last time the accumulator distributed earnings." - }, - "lastAverageUpdate()": { - "notice": "Last time the floating assets average was updated." - }, - "lastFloatingDebtUpdate()": { - "notice": "Last time the floating debt was updated." - }, - "liquidate(address,uint256,address)": { - "notice": "Liquidates undercollateralized fixed/floating (or both) position(s)." - }, - "maxFuturePools()": { - "notice": "Number of fixed pools to be active at the same time." - }, - "pause()": { - "notice": "Sets the pause state to true in case of emergency, triggered by an authorized account." - }, - "penaltyRate()": { - "notice": "Rate per second to be charged to delayed fixed pools borrowers after maturity." - }, - "previewBorrow(uint256)": { - "notice": "Simulates the effects of a borrow at the current time, given current contract conditions." - }, - "previewDebt(address)": { - "notice": "Gets all borrows and penalties for an account." - }, - "previewFloatingAssetsAverage()": { - "notice": "Returns the current `floatingAssetsAverage` without updating the storage variable." - }, - "previewRefund(uint256)": { - "notice": "Simulates the effects of a refund at the current time, given current contract conditions." - }, - "previewRepay(uint256)": { - "notice": "Simulates the effects of a repay at the current time, given current contract conditions." - }, - "redeem(uint256,address,address)": { - "notice": "Redeems the owner's floating pool assets to the receiver address." - }, - "refund(uint256,address)": { - "notice": "Repays a certain amount of shares to the floating pool." - }, - "repay(uint256,address)": { - "notice": "Repays a certain amount of assets to the floating pool." - }, - "repayAtMaturity(uint256,uint256,uint256,address)": { - "notice": "Repays a certain amount to a maturity." - }, - "reserveFactor()": { - "notice": "Percentage factor that represents the liquidity reserves that can't be borrowed." - }, - "rewardsController()": { - "notice": "Address of the rewards controller that will accrue rewards for accounts operating with the Market." - }, - "seize(address,address,uint256)": { - "notice": "Public function to seize a certain amount of assets." - }, - "setAssetSymbol(string)": { - "notice": "Sets name and symbol for the Market." - }, - "setBackupFeeRate(uint256)": { - "notice": "Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity." - }, - "setDampSpeed(uint256,uint256)": { - "notice": "Sets the damp speed used to update the floatingAssetsAverage." - }, - "setEarningsAccumulatorSmoothFactor(uint128)": { - "notice": "Sets the factor used when smoothly accruing earnings to the floating pool." - }, - "setFrozen(bool)": { - "notice": "Sets `isFrozen` state, triggered by an authorized account." - }, - "setInterestRateModel(address)": { - "notice": "Sets the interest rate model to be used to calculate rates." - }, - "setMaxFuturePools(uint8)": { - "notice": "Sets the protocol's max future pools for fixed borrowing and lending." - }, - "setPenaltyRate(uint256)": { - "notice": "Sets the penalty rate per second." - }, - "setReserveFactor(uint128)": { - "notice": "Sets the percentage that represents the liquidity reserves that can't be borrowed." - }, - "setRewardsController(address)": { - "notice": "Sets the rewards controller to update account rewards when operating with the Market." - }, - "setTreasury(address,uint256)": { - "notice": "Sets the treasury variables." - }, - "totalAssets()": { - "notice": "Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator." - }, - "totalFloatingBorrowAssets()": { - "notice": "Calculates the total floating debt, considering elapsed time since last update and current interest rate." - }, - "totalFloatingBorrowShares()": { - "notice": "Total amount of floating borrow shares assigned to floating borrow accounts." - }, - "transfer(address,uint256)": { - "notice": "Moves amount of shares from the caller's account to `to`." - }, - "transferFrom(address,address,uint256)": { - "notice": "Moves amount of shares from `from` to `to` using the allowance mechanism." - }, - "treasury()": { - "notice": "Address of the treasury that will receive the allocated earnings." - }, - "treasuryFeeRate()": { - "notice": "Rate to be charged by the treasury to floating and fixed borrows." - }, - "unpause()": { - "notice": "Sets the pause state to false when threat is gone, triggered by an authorized account." - }, - "withdraw(uint256,address,address)": { - "notice": "Withdraws the owner's floating pool assets to the receiver address." - }, - "withdrawAtMaturity(uint256,uint256,uint256,address,address)": { - "notice": "Withdraws a certain amount from a maturity." - } - }, - "version": 1 - }, + "numDeployments": 8, + "solcInputHash": "6e57950826dfd6055f8dc377807ae48e", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"contract Auditor\",\"name\":\"auditor_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Disagreement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientProtocolLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketFrozen\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaturityOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAuditor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPausingRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SelfLiquidation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolState\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"alternativeState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolStates\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBorrow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRepay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWithdraw\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AccumulatorAccrual\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"backupFeeRate\",\"type\":\"uint256\"}],\"name\":\"BackupFeeRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"BorrowAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedUp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedDown\",\"type\":\"uint256\"}],\"name\":\"DampSpeedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"DepositAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulatorSmoothFactor\",\"type\":\"uint256\"}],\"name\":\"EarningsAccumulatorSmoothFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"}],\"name\":\"FixedEarningsUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilization\",\"type\":\"uint256\"}],\"name\":\"FloatingDebtUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isFrozen\",\"type\":\"bool\"}],\"name\":\"Frozen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel\",\"type\":\"address\"}],\"name\":\"InterestRateModelSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lendersAssets\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizedAssets\",\"type\":\"uint256\"}],\"name\":\"Liquidate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDepositShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDebt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulator\",\"type\":\"uint256\"}],\"name\":\"MarketUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxFuturePools\",\"type\":\"uint256\"}],\"name\":\"MaxFuturePoolsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyRate\",\"type\":\"uint256\"}],\"name\":\"PenaltyRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Repay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"name\":\"RepayAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveFactor\",\"type\":\"uint256\"}],\"name\":\"ReserveFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController\",\"type\":\"address\"}],\"name\":\"RewardsControllerSet\",\"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\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"SpreadBadDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate\",\"type\":\"uint256\"}],\"name\":\"TreasurySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"WithdrawAtMaturity\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EMERGENCY_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"accountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fixedDeposits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fixedBorrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auditor\",\"outputs\":[{\"internalType\":\"contract Auditor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"backupFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrowAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsOwed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"clearBadDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"depositAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulatorSmoothFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedBorrowPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedDepositPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"fixedPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplied\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastAccrual\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingBackupBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"maxFuturePools_\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedUp_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedDown_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAccumulatorAccrual\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAverageUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFloatingDebtUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxFuturePools\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"previewDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"debt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewFloatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRefund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewRepay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repayAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepayAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsController\",\"outputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"}],\"name\":\"setAssetSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setBackupFeeRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"up\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"down\",\"type\":\"uint256\"}],\"name\":\"setDampSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"}],\"name\":\"setEarningsAccumulatorSmoothFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isFrozen_\",\"type\":\"bool\"}],\"name\":\"setFrozen\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"futurePools\",\"type\":\"uint8\"}],\"name\":\"setMaxFuturePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"}],\"name\":\"setReserveFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController_\",\"type\":\"address\"}],\"name\":\"setRewardsController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setTreasury\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasuryFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsDiscounted\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\"}},\"BackupFeeRateSet(uint256)\":{\"params\":{\"backupFeeRate\":\"rate charged to the fixed pools to be accrued by the floating depositors.\"}},\"Borrow(address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"receiver\":\"address that received the borrowed assets.\",\"shares\":\"amount of borrow shares assigned to the account.\"}},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"fee\":\"extra amount that will need to be paid at maturity.\",\"maturity\":\"maturity in which the account will have to repay the loan.\",\"receiver\":\"address that received the borrowed assets.\"}},\"DampSpeedSet(uint256,uint256)\":{\"params\":{\"dampSpeedDown\":\"represented with 18 decimals.\",\"dampSpeedUp\":\"represented with 18 decimals.\"}},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were deposited.\",\"caller\":\"address which deposited the assets.\",\"fee\":\"is the extra amount that it will be collected at maturity.\",\"maturity\":\"maturity at which the account will be able to collect his deposit + his fee.\",\"owner\":\"address that will be able to withdraw the deposited assets.\"}},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"params\":{\"earningsAccumulatorSmoothFactor\":\"factor represented with 18 decimals.\"}},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"params\":{\"maturity\":\"maturity date where the earnings were updated.\",\"timestamp\":\"current timestamp.\",\"unassignedEarnings\":\"pending unassigned earnings.\"}},\"FloatingDebtUpdate(uint256,uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\",\"utilization\":\"new floating utilization.\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InterestRateModelSet(address)\":{\"params\":{\"interestRateModel\":\"new interest rate model to be used to calculate rates.\"}},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were repaid.\",\"borrower\":\"address which had the original debt.\",\"lendersAssets\":\"incentive paid to lenders.\",\"receiver\":\"address which repaid the previously borrowed amount.\",\"seizeMarket\":\"address of the asset that were seized by the liquidator.\",\"seizedAssets\":\"amount seized of the collateral.\"}},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"earningsAccumulator\":\"earnings accumulator.\",\"floatingAssets\":\"total floating supply assets.\",\"floatingBorrowShares\":\"total floating borrow shares.\",\"floatingDebt\":\"total floating borrow assets.\",\"floatingDepositShares\":\"total floating supply shares.\",\"timestamp\":\"current timestamp.\"}},\"MaxFuturePoolsSet(uint256)\":{\"params\":{\"maxFuturePools\":\"represented with 0 decimals.\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PenaltyRateSet(uint256)\":{\"params\":{\"penaltyRate\":\"penaltyRate percentage per second represented with 18 decimals.\"}},\"Repay(address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"shares\":\"amount of borrow shares that were subtracted from the account's accountability.\"}},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"maturity\":\"maturity where the account repaid its borrowed amounts.\",\"positionAssets\":\"amount of the debt that was covered in this repayment (penalties could have been repaid).\"}},\"ReserveFactorSet(uint256)\":{\"params\":{\"reserveFactor\":\"reserveFactor percentage.\"}},\"RewardsControllerSet(address)\":{\"params\":{\"rewardsController\":\"new rewards controller to update account rewards when operating with the Market.\"}},\"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`)\"},\"Seize(address,address,uint256)\":{\"params\":{\"assets\":\"amount seized of the collateral.\",\"borrower\":\"address which had the original debt.\",\"liquidator\":\"address which seized this collateral.\"}},\"SpreadBadDebt(address,uint256)\":{\"params\":{\"assets\":\"amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\",\"borrower\":\"address which was cleared from bad debt.\"}},\"TreasurySet(address,uint256)\":{\"params\":{\"treasury\":\"address of the treasury that will receive the minted eTokens.\",\"treasuryFeeRate\":\"represented with 18 decimals.\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets withdrawn (can include a discount for early withdraw).\",\"caller\":\"address which withdraw the asset.\",\"maturity\":\"maturity where the account withdraw its deposits.\",\"owner\":\"address which had the assets withdrawn.\",\"positionAssets\":\"position size reduced.\",\"receiver\":\"address which will be collecting the assets.\"}}},\"kind\":\"dev\",\"methods\":{\"accountSnapshot(address)\":{\"params\":{\"account\":\"account to return status snapshot in the specified maturity date.\"},\"returns\":{\"_0\":\"the amount deposited to the floating pool and the amount owed to floating and fixed pools.\"}},\"borrow(uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"borrowShares\":\"shares corresponding to the borrowed assets.\"}},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"maturity\":\"maturity date for repayment.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"assetsOwed\":\"total amount of assets (principal + fee) to be repaid at maturity.\"}},\"clearBadDebt(address)\":{\"details\":\"Can only be called from the auditor.\",\"params\":{\"borrower\":\"account with insufficient collateral to be cleared the debt.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"assets\":\"amount to receive from the msg.sender.\",\"maturity\":\"maturity date where the assets will be deposited.\",\"minAssetsRequired\":\"minimum amount of assets required by the depositor for the transaction to be accepted.\",\"receiver\":\"address that will be able to withdraw the deposited assets.\"},\"returns\":{\"positionAssets\":\"total amount of assets (principal + fee) to be withdrawn at maturity.\"}},\"fixedPoolBalance(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed and supplied amount of the fixed pool.\"}},\"fixedPoolBorrowed(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed amount of the fixed pool.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"details\":\"can only be called once.\"},\"liquidate(address,uint256,address)\":{\"details\":\"Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.\",\"params\":{\"borrower\":\"account that has an outstanding debt across floating or fixed pools.\",\"maxAssets\":\"maximum amount of debt that the liquidator is willing to accept. (it can be less)\",\"seizeMarket\":\"market from which the collateral will be seized to give to the liquidator.\"},\"returns\":{\"repaidAssets\":\"actual amount repaid.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"previewBorrow(uint256)\":{\"params\":{\"assets\":\"amount of assets to borrow.\"},\"returns\":{\"_0\":\"amount of shares that will be asigned to the account after the borrow.\"}},\"previewDebt(address)\":{\"params\":{\"borrower\":\"account to return status snapshot for fixed and floating borrows.\"},\"returns\":{\"debt\":\"the total debt, denominated in number of assets.\"}},\"previewFloatingAssetsAverage()\":{\"returns\":{\"_0\":\"projected `floatingAssetsAverage`.\"}},\"previewRefund(uint256)\":{\"params\":{\"shares\":\"amount of shares to subtract from caller's accountability.\"},\"returns\":{\"_0\":\"amount of assets that will be repaid.\"}},\"previewRepay(uint256)\":{\"params\":{\"assets\":\"amount of assets to repay.\"},\"returns\":{\"_0\":\"amount of shares that will be subtracted from the account after the repay.\"}},\"redeem(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\",\"shares\":\"amount of shares to be redeemed for underlying asset.\"},\"returns\":{\"assets\":\"amount of underlying asset that was withdrawn.\"}},\"refund(uint256,address)\":{\"params\":{\"borrowShares\":\"shares to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualShares\":\"actual subtracted shares from the borrower's accountability.\",\"assets\":\"subtracted assets from the borrower's accountability.\"}},\"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.\"},\"repay(uint256,address)\":{\"params\":{\"assets\":\"assets to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualRepay\":\"the actual amount that should be transferred into the protocol.\",\"borrowShares\":\"subtracted shares from the borrower's accountability.\"}},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"borrower\":\"address of the account that has the debt.\",\"maturity\":\"maturity date where the assets will be repaid.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept to be repaid.\",\"positionAssets\":\"amount to be paid for the borrower's debt.\"},\"returns\":{\"actualRepayAssets\":\"the actual amount that was transferred into the protocol.\"}},\"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.\"},\"seize(address,address,uint256)\":{\"details\":\"Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\",\"params\":{\"assets\":\"amount to be removed from borrower's possession.\",\"borrower\":\"address from which the assets will be seized.\",\"liquidator\":\"address which will receive the seized assets.\"}},\"setAssetSymbol(string)\":{\"params\":{\"assetSymbol\":\"the symbol for the underlying asset.\"}},\"setBackupFeeRate(uint256)\":{\"params\":{\"backupFeeRate_\":\"percentage amount represented with 18 decimals.\"}},\"setDampSpeed(uint256,uint256)\":{\"params\":{\"down\":\"damp speed down, represented with 18 decimals.\",\"up\":\"damp speed up, represented with 18 decimals.\"}},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"params\":{\"earningsAccumulatorSmoothFactor_\":\"represented with 18 decimals.\"}},\"setInterestRateModel(address)\":{\"params\":{\"interestRateModel_\":\"new interest rate model.\"}},\"setMaxFuturePools(uint8)\":{\"details\":\"If value is decreased, VALID maturities will become NOT_READY.\",\"params\":{\"futurePools\":\"number of pools to be active at the same time.\"}},\"setPenaltyRate(uint256)\":{\"params\":{\"penaltyRate_\":\"percentage represented with 18 decimals.\"}},\"setReserveFactor(uint128)\":{\"params\":{\"reserveFactor_\":\"parameter represented with 18 decimals.\"}},\"setRewardsController(address)\":{\"params\":{\"rewardsController_\":\"new rewards controller.\"}},\"setTreasury(address,uint256)\":{\"params\":{\"treasuryFeeRate_\":\"represented with 18 decimals.\",\"treasury_\":\"address of the treasury that will receive the minted eTokens.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalAssets()\":{\"returns\":{\"_0\":\"actual floatingAssets plus earnings to be accrued at current timestamp.\"}},\"totalFloatingBorrowAssets()\":{\"returns\":{\"_0\":\"actual floating debt plus projected interest.\"}},\"transfer(address,uint256)\":{\"details\":\"Makes sure that the caller doesn't have shortfall after transferring.\",\"params\":{\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Makes sure that `from` address doesn't have shortfall after transferring.\",\"params\":{\"from\":\"address from which the assets will be transferred.\",\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"withdraw(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"assets\":\"amount of underlying to be withdrawn.\",\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\"},\"returns\":{\"shares\":\"amount of shares redeemed for underlying asset.\"}},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"maturity\":\"maturity date where the assets will be withdrawn.\",\"minAssetsRequired\":\"minimum amount required by the account (if discount included for early withdrawal).\",\"owner\":\"address that previously deposited the assets.\",\"positionAssets\":\"position size to be reduced.\",\"receiver\":\"address that will receive the withdrawn assets.\"},\"returns\":{\"assetsDiscounted\":\"amount of assets withdrawn (can include a discount for early withdraw).\"}}},\"stateVariables\":{\"__gap\":{\"custom:oz-renamed-from\":\"floatingUtilization\",\"details\":\"gap from deprecated state.\"},\"auditor\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"notice\":\"Emitted when accumulator distributes earnings.\"},\"BackupFeeRateSet(uint256)\":{\"notice\":\"Emitted when the backupFeeRate parameter is changed by admin.\"},\"Borrow(address,address,address,uint256,uint256)\":{\"notice\":\"Event emitted when an account borrows amount of assets from a floating pool.\"},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account borrows amount of an asset from a certain maturity date.\"},\"DampSpeedSet(uint256,uint256)\":{\"notice\":\"Emitted when the damp speeds are changed by admin.\"},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period.\"},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"notice\":\"Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\"},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"notice\":\"Emitted when the earnings of a maturity are updated.\"},\"FloatingDebtUpdate(uint256,uint256)\":{\"notice\":\"Emitted when the floating debt is updated.\"},\"Frozen(address,bool)\":{\"notice\":\"Emitted when `account` sets the `isFrozen` flag.\"},\"InterestRateModelSet(address)\":{\"notice\":\"Emitted when the interestRateModel is changed by admin.\"},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"notice\":\"Emitted when an account's position had a liquidation.\"},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when market state is updated.\"},\"MaxFuturePoolsSet(uint256)\":{\"notice\":\"Emitted when the maxFuturePools is changed by admin.\"},\"PenaltyRateSet(uint256)\":{\"notice\":\"Emitted when the penaltyRate is changed by admin.\"},\"Repay(address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays amount of assets to a floating pool.\"},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays its borrows after maturity.\"},\"ReserveFactorSet(uint256)\":{\"notice\":\"Emitted when the reserveFactor is changed by admin.\"},\"RewardsControllerSet(address)\":{\"notice\":\"Emitted when the rewardsController is changed by admin.\"},\"Seize(address,address,uint256)\":{\"notice\":\"Emitted when an account's collateral has been seized.\"},\"SpreadBadDebt(address,uint256)\":{\"notice\":\"Emitted when an account is cleared from bad debt.\"},\"TreasurySet(address,uint256)\":{\"notice\":\"Emitted when the treasury variables are changed by admin.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account withdraws from a fixed rate pool.\"}},\"kind\":\"user\",\"methods\":{\"accountSnapshot(address)\":{\"notice\":\"Gets current snapshot for an account across all maturities.\"},\"accounts(address)\":{\"notice\":\"Tracks fixed deposit and borrow map and floating borrow shares of an account.\"},\"backupFeeRate()\":{\"notice\":\"Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\"},\"borrow(uint256,address,address)\":{\"notice\":\"Borrows a certain amount from the floating pool.\"},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Borrows a certain amount from a maturity.\"},\"clearBadDebt(address)\":{\"notice\":\"Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\"},\"dampSpeedDown()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\"},\"dampSpeedUp()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Deposits a certain amount to a maturity.\"},\"earningsAccumulator()\":{\"notice\":\"Accumulated earnings from extraordinary sources to be gradually distributed.\"},\"earningsAccumulatorSmoothFactor()\":{\"notice\":\"Factor used for gradual accrual of earnings to the floating pool.\"},\"fixedBorrowPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed borrow positions by maturity, account and position.\"},\"fixedDepositPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed deposit positions by maturity, account and position.\"},\"fixedPoolBalance(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed and supplied amount.\"},\"fixedPoolBorrowed(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed amount.\"},\"fixedPools(uint256)\":{\"notice\":\"Tracks fixed pools state by maturity.\"},\"floatingAssets()\":{\"notice\":\"Amount of floating assets deposited to the pool.\"},\"floatingAssetsAverage()\":{\"notice\":\"Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\"},\"floatingBackupBorrowed()\":{\"notice\":\"Amount of assets lent by the floating pool to the fixed pools.\"},\"floatingDebt()\":{\"notice\":\"Amount of assets lent by the floating pool to accounts.\"},\"initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"notice\":\"Initializes the contract.\"},\"interestRateModel()\":{\"notice\":\"Interest rate model contract used to get the borrow rates.\"},\"isFrozen()\":{\"notice\":\"Flag to prevent new borrows and deposits.\"},\"lastAccumulatorAccrual()\":{\"notice\":\"Last time the accumulator distributed earnings.\"},\"lastAverageUpdate()\":{\"notice\":\"Last time the floating assets average was updated.\"},\"lastFloatingDebtUpdate()\":{\"notice\":\"Last time the floating debt was updated.\"},\"liquidate(address,uint256,address)\":{\"notice\":\"Liquidates undercollateralized fixed/floating (or both) position(s).\"},\"maxFuturePools()\":{\"notice\":\"Number of fixed pools to be active at the same time.\"},\"pause()\":{\"notice\":\"Sets the pause state to true in case of emergency, triggered by an authorized account.\"},\"penaltyRate()\":{\"notice\":\"Rate per second to be charged to delayed fixed pools borrowers after maturity.\"},\"previewBorrow(uint256)\":{\"notice\":\"Simulates the effects of a borrow at the current time, given current contract conditions.\"},\"previewDebt(address)\":{\"notice\":\"Gets all borrows and penalties for an account.\"},\"previewFloatingAssetsAverage()\":{\"notice\":\"Returns the current `floatingAssetsAverage` without updating the storage variable.\"},\"previewRefund(uint256)\":{\"notice\":\"Simulates the effects of a refund at the current time, given current contract conditions.\"},\"previewRepay(uint256)\":{\"notice\":\"Simulates the effects of a repay at the current time, given current contract conditions.\"},\"redeem(uint256,address,address)\":{\"notice\":\"Redeems the owner's floating pool assets to the receiver address.\"},\"refund(uint256,address)\":{\"notice\":\"Repays a certain amount of shares to the floating pool.\"},\"repay(uint256,address)\":{\"notice\":\"Repays a certain amount of assets to the floating pool.\"},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Repays a certain amount to a maturity.\"},\"reserveFactor()\":{\"notice\":\"Percentage factor that represents the liquidity reserves that can't be borrowed.\"},\"rewardsController()\":{\"notice\":\"Address of the rewards controller that will accrue rewards for accounts operating with the Market.\"},\"seize(address,address,uint256)\":{\"notice\":\"Public function to seize a certain amount of assets.\"},\"setAssetSymbol(string)\":{\"notice\":\"Sets name and symbol for the Market.\"},\"setBackupFeeRate(uint256)\":{\"notice\":\"Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity.\"},\"setDampSpeed(uint256,uint256)\":{\"notice\":\"Sets the damp speed used to update the floatingAssetsAverage.\"},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"notice\":\"Sets the factor used when smoothly accruing earnings to the floating pool.\"},\"setFrozen(bool)\":{\"notice\":\"Sets `isFrozen` state, triggered by an authorized account.\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model to be used to calculate rates.\"},\"setMaxFuturePools(uint8)\":{\"notice\":\"Sets the protocol's max future pools for fixed borrowing and lending.\"},\"setPenaltyRate(uint256)\":{\"notice\":\"Sets the penalty rate per second.\"},\"setReserveFactor(uint128)\":{\"notice\":\"Sets the percentage that represents the liquidity reserves that can't be borrowed.\"},\"setRewardsController(address)\":{\"notice\":\"Sets the rewards controller to update account rewards when operating with the Market.\"},\"setTreasury(address,uint256)\":{\"notice\":\"Sets the treasury variables.\"},\"totalAssets()\":{\"notice\":\"Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator.\"},\"totalFloatingBorrowAssets()\":{\"notice\":\"Calculates the total floating debt, considering elapsed time since last update and current interest rate.\"},\"totalFloatingBorrowShares()\":{\"notice\":\"Total amount of floating borrow shares assigned to floating borrow accounts.\"},\"transfer(address,uint256)\":{\"notice\":\"Moves amount of shares from the caller's account to `to`.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Moves amount of shares from `from` to `to` using the allowance mechanism.\"},\"treasury()\":{\"notice\":\"Address of the treasury that will receive the allocated earnings.\"},\"treasuryFeeRate()\":{\"notice\":\"Rate to be charged by the treasury to floating and fixed borrows.\"},\"unpause()\":{\"notice\":\"Sets the pause state to false when threat is gone, triggered by an authorized account.\"},\"withdraw(uint256,address,address)\":{\"notice\":\"Withdraws the owner's floating pool assets to the receiver address.\"},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Withdraws a certain amount from a maturity.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Market.sol\":\"Market\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":70},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\":{\"keccak256\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b83b7afa4d2372da3ba5402fb10860a105c35d79812c60dc61007be2afc17618\",\"dweb:/ipfs/QmYX9xPmbNVSKXrepKiUZiG5oL3SdzFp9a4kqspxX1sEUx\"]},\"@openzeppelin/contracts-upgradeable-v4/access/IAccessControlUpgradeable.sol\":{\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://740cf4dc535e3082560cf5a031473029f322690fc8037fe9d5e3a8bef42e757c\",\"dweb:/ipfs/QmTQxFdfxcaueQa23VX34wAPqzruZbkzyeN58tZK2yav2b\"]},\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e\",\"dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv\"]},\"@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol\":{\"keccak256\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6d362da7417bc7d7cc8623f3d3f8f04c3808d043ee6379568c63a63ec14a124e\",\"dweb:/ipfs/QmYm3wDHUcfGh3MNiRqpWEBbSSYnDSyUsppDATy5DVsfui\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b\",\"dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8b06267c5f80bad727af3e48b1382333d591dad51376399ef2f6b0ee6d58bf95\",\"dweb:/ipfs/QmdU5La1agcQvghnfMpWZGDPz2TUDTCxUwTLKmuMRXBpAx\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/StringsUpgradeable.sol\":{\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f8613145881436fc0480fff22da4868d611e2b0c0c3da083334eb4362ce1945a\",\"dweb:/ipfs/QmPqpP3YeRbBdTJRe6Gv2eGsUaANf4J6RwTNRW36iYahfV\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/introspection/ERC165Upgradeable.sol\":{\"keccak256\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1b13befeb3413749292f9fb229de1c7a509a5ce2c8047d9094fc004ca9d3af89\",\"dweb:/ipfs/QmRzJ2hZSwRtMejHUZAYTPRKgZsnfb112Fno9Jf3EiDfwA\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/introspection/IERC165Upgradeable.sol\":{\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://92ad7e572cf44e6b4b37631b44b62f9eb9fb1cf14d9ce51c1504d5dc7ccaf758\",\"dweb:/ipfs/QmcnbqX85tsWnUXPmtuPLE4SczME2sJaTfmqEFkuAJvWhy\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\":{\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2b2835c737d073ef8b82a4cc246495a9740f43e7ff2cf130906b2449ff9bfb91\",\"dweb:/ipfs/QmSCWfNoSvvTN57ic7o1RW6NqSxxGAqbBTnLKc7QHe27qB\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/math/SignedMathUpgradeable.sol\":{\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://88ace2d60f265752f18903d839910be4e4e104340b2957678585b812447825d4\",\"dweb:/ipfs/QmXFkNxMc3AAGzhs2wUEZyErWQjsvoTGyYjuU5oZkFki5Z\"]},\"@openzeppelin/contracts-v4/utils/math/Math.sol\":{\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c\",\"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS\"]},\"@openzeppelin/contracts-v4/utils/math/SafeCast.sol\":{\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://495145362c7ff1c9ca88c58bbbbcb412e3c2004406647412394486552ff6c278\",\"dweb:/ipfs/QmNNCeng6d5eRPDn6tkWSQhjE39XWfQEfjA63rRwHmr1iH\"]},\"contracts/Auditor.sol\":{\"keccak256\":\"0x5110a03bc02c12d47bc64ccb39250e2c9eaa4c4089e63ed143e0513bf7ede5d8\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e61331e636beec80bc57e2b751fa672ee98dab4fb489c9ea4cf19cd68acbddfd\",\"dweb:/ipfs/QmPgu5ZNy8b7ywz6fX658A5ETWTKdGLXCwtX5eAPEiZfH8\"]},\"contracts/InterestRateModel.sol\":{\"keccak256\":\"0x21b3897afb0da4e23559f3122f2292deb79516d8850a4995ece47b8c4d278004\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://a8aad4f1b7340db20e72e3c115e951ad5c71c87fb6139729f9b3279289f82908\",\"dweb:/ipfs/QmZ1UAp33jbcHJZFmsDSokVM6tSCPTPXi3zEranQDP4ZQE\"]},\"contracts/Market.sol\":{\"keccak256\":\"0xea262e9a46d356f8626b4ea1d2bf9017e009b3d4f95809f5f33331b0236b3ce6\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e05e0132c04440fa2a3bd7d991940f4f14f70efe0414f7b8085f5a2247aea6ec\",\"dweb:/ipfs/QmWwjTo5nRbuY1GywEXUPdA9tDvN6CgA8pL147dQdPTacW\"]},\"contracts/RewardsController.sol\":{\"keccak256\":\"0xab502e9e6c6fdd56878d80fde0aee78c360234b15b1db8d7cb6508fe3c430163\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://08502c85c6753a61ff24aeab55809674dd47cb206ad02aa615c81a53820acb06\",\"dweb:/ipfs/Qmazc5RbGCq7QXsuqqfkC5yC4LgkTUQLg5Xn1YCyi5Rxi4\"]},\"contracts/utils/FixedLib.sol\":{\"keccak256\":\"0x9eb04f02cac9a0c2fd049587524799c8ab4fa1840d9550bad02d87d81074187c\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://885545fb71ae6e82d70b364dd2fc021e25435b01131f1e7a63755c303a350928\",\"dweb:/ipfs/QmaejvpPc1qX1GWvwodnUaHgKzob8WpsU3kz84qpk7vRn3\"]},\"contracts/utils/IPriceFeed.sol\":{\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://b06913f9c7e4fe67bbb1ddf3d9335a2a6c0e7a537aae8ed7d8b5825c61e80514\",\"dweb:/ipfs/Qmb34jWcW4Pv8Upsq2rtoYoncPHoUgDUET6JHBBsTo583L\"]},\"solmate/src/mixins/ERC4626.sol\":{\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1dca20fc42d20ce7b6023fafd744dc7e91ed2d1f6c5f1fb45e3004b1d5f33100\",\"dweb:/ipfs/Qmf7MtQTTSJYEhsJ3HDmegt4PFSG13msyFAv4DFAoqyypa\"]},\"solmate/src/tokens/ERC20.sol\":{\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb440672ebad7d487c1600e406e140fd1ffc4bd7520c86b5709183ca2602da58\",\"dweb:/ipfs/QmNgZaBoAZwnwm4mTL1cUZnMtvt1iZnruMnfpJnDu6upuc\"]},\"solmate/src/utils/FixedPointMathLib.sol\":{\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://737232ccd46bfbe6f34a3e5bc24c345777da47e6ea27bcc46d2c3931883c2257\",\"dweb:/ipfs/QmeA6ikG9dQKZgkJYUVGXcApuCii34h7qtmguToRdSU3qZ\"]},\"solmate/src/utils/SafeTransferLib.sol\":{\"keccak256\":\"0xbb4580ec2c735b5f31bb176567c886a87c2800b3eff132eda15ddc2b28cc2932\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://27ce4609ece6f8635dafd662cf8a45a4e0b5c3240e6f26c6b0081df880039152\",\"dweb:/ipfs/QmYPBJ1DPeFNUTPSPka3G9iwpSfbyJnYQeo5YGvbfyQFGC\"]}},\"version\":1}", + "bytecode": "0x610120604052348015610010575f80fd5b5060405161651138038061651183398101604081905261002f9161021c565b8160405180602001604052805f81525060405180602001604052805f8152508181846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100b09190610254565b60c96100bc8482610313565b5060ca6100c98382610313565b5060ff81166080524660a0526100dd610108565b60c0525050506001600160a01b0392831660e05250508116610100526101016101a1565b505061043e565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c960405161013991906103cd565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f54610100900460ff16156101b4575f80fd5b5f5460ff90811614610203575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610219575f80fd5b50565b5f806040838503121561022d575f80fd5b825161023881610205565b602084015190925061024981610205565b809150509250929050565b5f60208284031215610264575f80fd5b815160ff81168114610274575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102a357607f821691505b6020821081036102c157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561030e57805f5260205f20601f840160051c810160208510156102ec5750805b601f840160051c820191505b8181101561030b575f81556001016102f8565b50505b505050565b81516001600160401b0381111561032c5761032c61027b565b6103408161033a845461028f565b846102c7565b6020601f821160018114610372575f831561035b5750848201515b5f19600385901b1c1916600184901b17845561030b565b5f84815260208120601f198516915b828110156103a15787850151825560209485019460019092019101610381565b50848210156103be57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f8083546103da8161028f565b6001821680156103f1576001811461040657610433565b60ff1983168652811515820286019350610433565b865f5260205f205f5b8381101561042b5781548882015260019091019060200161040f565b505081860193505b509195945050505050565b60805160a05160c05160e05161010051615ff561051c5f395f81816107840152818161154d015281816116fe01528181611d7a01528181611faa01528181612184015281816124b201528181612e8b0152818161303c0152818161312e015281816136700152614b2801525f8181610734015281816115be01528181611b7101528181611c650152818161206c015281816122780152818161233f0152818161282e01528181612e0d015281816136e101528181614cb2015281816151cd01526152cf01525f611bde01525f611ba901525f6106cb0152615ff55ff3fe608060405234801561000f575f80fd5b50600436106104c1575f3560e01c80636e76fc8f11610283578063b2a02ff111610168578063d5164184116100e0578063e63ab1e91161009a578063e63ab1e914610c98578063e94b3c2114610cac578063eee8c9e014610cb5578063ef8b30f714610cbd578063f3fdb15a14610cd0578063fb0fc4c314610ce3578063fea45d9414610cfa575f80fd5b8063d516418414610c04578063d547741f14610c17578063d6b7494f14610c2a578063d905777e14610c33578063dd62ed3e14610c5b578063e00b262514610c85575f80fd5b8063b2a02ff114610af7578063b3d7f6b914610b0a578063b460af9414610b1d578063ba08765214610b30578063bee36bb314610b43578063bf722ca214610b56578063c63d75b6146107ae578063c6e6f59214610b69578063ccfd8b1114610b7c578063ce96cb7714610bad578063d2681a0b14610bc0578063d505accf14610bf1575f80fd5b806391d14854116101fb57806391d1485414610a32578063926bb63314610a4557806394bf804d14610a5857806395d89b4114610a6b57806397bce8d014610a73578063a05a091a14610a86578063a16a885014610a99578063a1bab44714610aae578063a1e8f02b14610ac1578063a217fddf14610aca578063a9059cbb14610ad1578063acb7081514610ae4575f80fd5b80636e76fc8f146109325780636eb9ffeb1461095957806370a082311461098557806378007e23146109a45780637ad226dc146109b75780637e932d32146109ca5780637ecebe00146109dd5780638456cb59146109fc5780638a1baa4614610a045780638bcd401614610a0d5780638c3cba5a14610a205780638d0e5f0214610a29575f80fd5b8063313ce567116103a95780634322b714116103215780634322b714146107d557806347dffde0146107fc5780634914c0081461080f5780634cdad506146108225780634e7c5059146108355780635c975abb146108895780635cc2ef83146108945780635e5c06e2146108a757806361d027b3146108f057806366601032146109035780636bb65f531461090c5780636e553f651461091f575f80fd5b8063313ce567146106c657806333eeb147146106ed57806334f7d1f2146107015780633644e5151461071457806336568abe1461071c57806338d52e0f1461072f5780633aa18d6f146107635780633c6f317f1461076c5780633ec045a61461077f5780633f4ba83a146107a6578063402d267d146107ae57806342da42bf146107c2575f80fd5b8063137001011161043c57806313700101146105e557806318160ddd146105f85780631a5b9e62146106015780631a90f186146106145780631d43b30b1461061d57806323b872dd14610630578063248a9ca31461064357806325fc07a91461066557806328acf2cf146106845780632c5dcc77146106975780632e0af008146106aa5780632f2ff15d146106b3575f80fd5b8063014a296f146104c557806301e1d114146104f257806301ffc9a714610508578063022d8af51461052b5780630539fa8c1461054057806306fdde031461054957806307a2d13a1461055e578063095ea7b3146105715780630a28a477146105845780630ab69be8146105975780630e52dbec146105be5780630f2b75aa146105dd575b5f80fd5b6104d86104d336600461564e565b610d0d565b604080519283526020830191909152015b60405180910390f35b6104fa610d42565b6040519081526020016104e9565b61051b610516366004615669565b610dee565b60405190151581526020016104e9565b61053e6105393660046156ab565b610e24565b005b6104fa60d85481565b610551610eab565b6040516104e991906156c4565b6104fa61056c3660046156f9565b610f37565b61051b61057f366004615710565b610f63565b6104fa6105923660046156f9565b610fce565b6104d86105a53660046156f9565b5f90815260d16020526040902080546001909101549091565b60da546105cb9060ff1681565b60405160ff90911681526020016104e9565b6104fa610fed565b61053e6105f3366004615777565b611092565b6104fa60cb5481565b6104fa61060f3660046157b5565b611103565b6104fa60d45481565b6104fa61062b36600461564e565b6115f3565b61051b61063e366004615807565b6116f3565b6104fa6106513660046156f9565b5f9081526065602052604090206001015490565b6104fa6106733660046156f9565b5f90815260d1602052604090205490565b61053e610692366004615855565b61185a565b61053e6106a5366004615710565b6118a6565b6104fa60dd5481565b61053e6106c136600461586e565b611916565b6105cb7f000000000000000000000000000000000000000000000000000000000000000081565b60e35461051b90600160a01b900460ff1681565b6104fa61070f36600461589c565b61193f565b6104fa611ba6565b61053e61072a36600461586e565b611c00565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b6040516104e991906158da565b6104fa60d95481565b6104fa61077a36600461589c565b611c22565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b61053e611c95565b6104fa6107bc36600461564e565b505f1990565b61053e6107d03660046156f9565b611cb7565b60dc546107ef90600160801b90046001600160801b031681565b6040516104e991906158ee565b6104fa61080a3660046156f9565b611cf6565b6104fa61081d366004615902565b611d14565b6104fa6108303660046156f9565b6121f0565b6108696108433660046156f9565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016104e9565b60975460ff1661051b565b61053e6108a2366004615941565b6121fa565b6108d56108b536600461564e565b60d26020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016104e9565b60e154610756906001600160a01b031681565b6104fa60e25481565b60e354610756906001600160a01b031681565b6104fa61092d36600461586e565b612254565b6104fa7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da5461097090600160281b900463ffffffff1681565b60405163ffffffff90911681526020016104e9565b6104fa61099336600461564e565b60cc6020525f908152604090205481565b6104fa6109b23660046156f9565b6122fa565b6104d86109c536600461586e565b612311565b61053e6109d8366004615961565b61236e565b6104fa6109eb36600461564e565b60ce6020525f908152604090205481565b61053e6123eb565b6104fa60d55481565b61053e610a1b36600461564e565b6123fd565b6104fa60d35481565b6104fa60df5481565b61051b610a4036600461586e565b61247d565b61053e610a5336600461564e565b6124a7565b6104fa610a6636600461586e565b612815565b6105516128b0565b61053e610a81366004615980565b6128bd565b6104fa610a943660046157b5565b612a1c565b60da5461097090610100900463ffffffff1681565b61053e610abc3660046156f9565b612e41565b6104fa60d75481565b6104fa5f81565b61051b610adf366004615710565b612e80565b6104d8610af236600461586e565b612fdd565b61053e610b05366004615807565b612ff9565b6104fa610b183660046156f9565b61300d565b6104fa610b2b366004615a2b565b613023565b6104fa610b3e366004615a2b565b61312b565b61053e610b5136600461564e565b613228565b6104fa610b643660046156f9565b61327c565b6104fa610b773660046156f9565b61329b565b6104d8610b8a36600461586e565b60cf60209081525f92835260408084209091529082529020805460019091015482565b6104fa610bbb36600461564e565b6132b2565b6104d8610bce36600461586e565b60d060209081525f92835260408084209091529082529020805460019091015482565b61053e610bff366004615a5f565b6132d3565b6104fa610c12366004615a2b565b613498565b61053e610c2536600461586e565b613713565b6104fa60d65481565b6104fa610c4136600461564e565b6001600160a01b03165f90815260cc602052604090205490565b6104fa610c69366004615ac9565b60cd60209081525f928352604080842090915290825290205481565b61053e610c933660046156ab565b613737565b6104fa5f80516020615f8083398151915281565b6104fa60de5481565b6104fa61378b565b6104fa610ccb3660046156f9565b61386c565b60db54610756906001600160a01b031681565b60da5461097090600160481b900463ffffffff1681565b60dc546107ef906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610d3090610f37565b610d39846115f3565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610db4575f81815260d160205260409020600381015480831115610da857824210610d8e578160020154610da3565b6002820154610da39042839003838603613876565b860195505b50506224ea0001610d5c565b50610dd760e254670de0b6b3a76400000360d454610dd061378b565b0390613894565b610ddf6138a8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610e1e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610e2e8161391e565b610e36613928565b60dd5f828254610e469190615b1d565b90915550610e5490506139a1565b60dc80546001600160801b0319166001600160801b0384161790556040517f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e90610e9f9084906158ee565b60405180910390a15050565b60c98054610eb890615b30565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee490615b30565b8015610f2f5780601f10610f0657610100808354040283529160200191610f2f565b820191905f5260205f20905b815481529060010190602001808311610f1257829003601f168201915b505050505081565b60cb545f908015610f5a57610f55610f4d610d42565b849083613876565b610f5c565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fbd9086815260200190565b60405180910390a350600192915050565b60cb545f908015610f5a57610f5581610fe5610d42565b859190613a07565b60dd5460de545f9190828183106110065760d85461100a565b60d9545b60da549091505f906110459061102d90600160481b900463ffffffff1642615b68565b6110379084615b7b565b61104090615b92565b613a34565b61105790670de0b6b3a7640000615bac565b90506110638185613894565b61107f61107883670de0b6b3a7640000615b68565b8590613894565b6110899190615b1d565b94505050505090565b5f61109c8161391e565b82826040516020016110af929190615bcb565b60405160208183030381529060405260c990816110cc9190615c46565b5082826040516020016110e0929190615d00565b60405160208183030381529060405260ca90816110fd9190615c46565b50505050565b5f61110c613ba7565b611114613bb6565b845f036111345760405163774257f760e01b815260040160405180910390fd5b60da5461114890879060ff1660035f613be1565b5f86815260d160205260409020611165611160613d7b565b613e89565b61116f8188613ec6565b60dd5f82825461117f9190615b1d565b909155505060e3546001600160a01b031680156111f057604051636c912dad60e01b81526001600160a01b03821690636c912dad906111c29087906004016158da565b5f604051808303815f87803b1580156111d9575f80fd5b505af11580156111eb573d5f803e3d5ffd5b505050505b5f6111fb8389613f44565b9050801561127f575f8160d3546112129190615b1d565b60dc549091506112509061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b60dd54906001600160801b0316613894565b60d45461125d9083615b1d565b111561127b57604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061128a610fed565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff166112d88a600101548b5f015489613f80565b6112e28888613fad565b6112ef898960d354613fc5565b6040518663ffffffff1660e01b815260040161130f959493929190615d3d565b602060405180830381865afa15801561132a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061134e9190615d63565b905061137361136c611360428f615b68565b83906301e13380613876565b8c90613fe1565b935050505080886113849190615b1d565b9350868411156113a757604051632c1b6b4160e21b815260040160405180910390fd5b6113b18585613ff5565b5f89815260d0602090815260408083206001600160a01b038916845290915281208054909103611408576001600160a01b0386165f90815260d2602052604090206001810154611401908c61406b565b6001909101555b5f8061144b61141685614154565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614180565b91509150815f1461146f5781866002015f8282546114699190615b1d565b90915550505b611478816141cc565b60405180604001604052808c855f01546114929190615b1d565b81526020018585600101546114a79190615b1d565b90525f8d815260d0602090815260408083206001600160a01b03808e168086529184529382902085518155949092015160019094019390935591519194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139061151d9033908e908890615d7a565b60405180910390a461152d6139a1565b611536896141f8565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906115849030908990600401615d9b565b5f604051808303815f87803b15801561159b575f80fd5b505af11580156115ad573d5f803e3d5ffd5b506115e79250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614246565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b81156116c85760018216156116ad575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916116689190615b1d565b90506116748188615b1d565b9650824211156116aa5761169d8561168c8542615b68565b6116969190615b7b565b8290613894565b6116a79088615b1d565b96505b50505b60019190911c906116c16224ea0082615b1d565b9050611624565b600284015480156116e9576116dc81611cf6565b6116e69087615b1d565b95505b5050505050919050565b5f6116fc613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53086611736866121f0565b6040518463ffffffff1660e01b815260040161175493929190615db5565b5f6040518083038186803b15801561176a575f80fd5b505afa15801561177c573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561184657604051630149e46f60e01b81526001600160a01b03821690630149e46f906117bf9088906004016158da565b5f604051808303815f87803b1580156117d6575f80fd5b505af11580156117e8573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f91506118189087906004016158da565b5f604051808303815f87803b15801561182f575f80fd5b505af1158015611841573d5f803e3d5ffd5b505050505b611851858585614291565b95945050505050565b5f6118648161391e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610e9f565b5f6118b08161391e565b6118bb611160613d7b565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119308161391e565b61193a838361436b565b505050565b5f611948613ba7565b611950613bb6565b835f03611970576040516356316e8760e01b815260040160405180910390fd5b60da5461198490869060ff1660035f613be1565b5f85815260d1602052604081209061199c8288613ec6565b90506119a9611160613d7b565b8060dd5f8282546119ba9190615b1d565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f9182916119ff918a906143f0565b9092509050611a0e8289615b1d565b945086851015611a3157604051632c1b6b4160e21b815260040160405180910390fd5b611a3b8489614441565b60d35f828254611a4b9190615b68565b90915550611a5b90508183615b1d565b846002015f828254611a6d9190615b68565b925050819055508060d55f828254611a859190615b1d565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611ada576001600160a01b0387165f90815260d2602052604090208054611ad7908c61406b565b90555b88815f015f828254611aec9190615b1d565b9250508190555082816001015f828254611b069190615b1d565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611b5b6139a1565b611b648a6141f8565b611b996001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614471565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611bdb57611bd66144c9565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611c14575f80fd5b611c1e8282614562565b5050565b5f611c2b613ba7565b60da54611c4090869060ff1660036002613be1565b611c4e8585858560016145c8565b9050611c586139a1565b611c8d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b949350505050565b5f80516020615f80833981519152611cac8161391e565b611cb4614952565b50565b5f611cc18161391e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610e9f565b60df545f908015610f5a57610f55611d0c61378b565b849083613a07565b5f611d1d613ba7565b6001600160a01b0384163303611d46576040516344511af160e01b815260040160405180910390fd5b611d4e613928565b60dd5f828254611d5e9190615b1d565b909155505060405163042dcf6b60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890611db5903090869089908990600401615dd9565b602060405180830381865afa158015611dd0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df49190615d63565b9250825f03611e165760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611e5057508515155b15611f5d576001821615611f42575f81421015611e8757611e748288898b5f6145c8565b9050611e808188615b68565b9650611f34565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611eb99190615b1d565b9150505f611ee060d6548542611ecf9190615b68565b611ed99190615b7b565b8390613894565b611eea9083615b1d565b9050888111611ef95788611f04565b611f04898383613876565b9250825f03611f15575f9850611f31565b611f2284848b8d5f6145c8565b9250611f2e838a615b68565b98505b50505b611f3e8186615b1d565b9450505b60019190911c90611f566224ea0082615b1d565b9050611e42565b50508315801590611f715750600281015415155b15611fa6575f611f808561327c565b90508015611fa4575f611f938288614994565b509050611fa08185615b1d565b9350505b505b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1b003130878a886040518563ffffffff1660e01b8152600401611ffa9493929190615dd9565b6040805180830381865afa158015612014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120389190615e03565b915091508160d55f82825461204d9190615b1d565b90915550612094905033306120628588615b1d565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614471565b306001600160a01b038616036120b5576120b030338984614af1565b61211a565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906120e59033908b908690600401615db5565b5f604051808303815f87803b1580156120fc575f80fd5b505af115801561210e573d5f803e3d5ffd5b5050505061211a6139a1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906121b9908a906004016158da565b5f604051808303815f87803b1580156121d0575f80fd5b505af11580156121e2573d5f803e3d5ffd5b505050505050509392505050565b5f610e1e82610f37565b5f6122048161391e565b61220c614cd9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61225e8361386c565b9050805f0361226b575f80fd5b6122a06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614471565b6122aa8282614d04565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8382614d7a565b60df545f908015610f5a57610f5581610fe561378b565b5f8061231b613ba7565b6123258484614994565b90925090506123326139a1565b6123676001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614471565b9250929050565b5f6123788161391e565b60e35460ff600160a01b90910416151582151514611c1e5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee698906123df90851515815260200190565b60405180910390a25050565b6123f3614dd9565b6123fb614e42565b565b5f6124078161391e565b60db546001600160a01b03161561242357612423611160613d7b565b60db80546001600160a01b0319166001600160a01b0384161790556124466139a1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146124f0576040516317568c8f60e21b815260040160405180910390fd5b6124f8613928565b60dd5f8282546125089190615b1d565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b811561276c576001821615612751575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916125849190615b1d565b905080861061274e5760e3546001600160a01b031680156125f957604051636c912dad60e01b81526001600160a01b03821690636c912dad906125cb908c906004016158da565b5f604051808303815f87803b1580156125e2575f80fd5b505af11580156125f4573d5f803e3d5ffd5b505050505b6126038288615b68565b965061260f8287615b1d565b83545f86815260d1602052604081209298509161262b91614e7f565b905080156126c4578060d35f8282546126449190615b68565b909155505083545f906126739061265b9084614e9e565b5f88815260d160205260409020600201549084613876565b90508060d15f8881526020019081526020015f206002015f8282546126989190615b68565b925050819055508060d55f8282546126b09190615b1d565b909155506126c09050818a615b1d565b9850505b5f85815260d0602090815260408083206001600160a01b038e16845290915281208181556001908101919091558901546126fe9086614eb3565b60018a015560408051848152602081018590526001600160a01b038c1691339188917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a450505b50505b60019190911c906127656224ea0082615b1d565b9050612540565b60028501541580159061278957506127838461327c565b93508315155b156127aa575f6127998588614994565b5090506127a68185615b1d565b9350505b8215612805578260d55f8282546127c19190615b68565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b61280d6139a1565b505050505050565b5f61281f8361300d565b90506128566001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b6128608284614d04565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8184614d7a565b60ca8054610eb890615b30565b5f54610100900460ff16158080156128db57505f54600160ff909116105b806128f45750303b1580156128f457505f5460ff166001145b6128fc575f80fd5b5f805460ff19166001179055801561291d575f805461ff0019166101001790555b612925614f72565b61292d614f84565b60da805468ffffffffffffffff0019166101004263ffffffff1690810263ffffffff60281b191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129805f3361436b565b61298a8b8b611092565b6129938961185a565b61299c88610e24565b6129a5876123fd565b6129ae86612e41565b6129b785611cb7565b6129c084613737565b6129ca83836121fa565b8015612a0f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a25613ba7565b845f03612a455760405163b8cb621960e01b815260040160405180910390fd5b60da54612a5a90879060ff1660036002613be1565b5f86815260d160205260409020612a72611160613d7b565b612a7c8188613ec6565b60dd5f828254612a8c9190615b1d565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612ad69190615b1d565b871115612af15760208101518151612aee9190615b1d565b96505b6040805180820190915281518152602080830151908201525f90612b2190612b19908a614f9e565b518490614fe4565b60d354612b2e9190615b1d565b905060dd5460d45482612b419190615b1d565b1115612b5f57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612c71575f612b73610fed565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bc78a600101548b5f01548a613f80565b612bd18989613fad565b612bdc8a8a8a613fc5565b6040518663ffffffff1660e01b8152600401612bfc959493929190615d3d565b602060405180830381865afa158015612c17573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c3b9190615d63565b9050612c66612c4d611360428f615b68565b612c5f90670de0b6b3a7640000615b1d565b8c90615028565b965050505050612c75565b8692505b85831015612c9657604051632c1b6b4160e21b815260040160405180910390fd5b612ca08484613ff5565b5f80612cec612cb7612cb2878c615b68565b614154565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614180565b9150915081846002015f828254612d039190615b1d565b90915550612d129050816141cc565b612d1c838a61503c565b5060208301518351175f03612d6f575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612d68908c614eb3565b9055612d9f565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b856001600160a01b0316876001600160a01b03168b7fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c338d8a604051612de793929190615d7a565b60405180910390a4612df76139a1565b612e008a6141f8565b612e346001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614246565b5050505095945050505050565b5f612e4b8161391e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610e9f565b5f612e89613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612ec3866121f0565b6040518463ffffffff1660e01b8152600401612ee193929190615db5565b5f6040518083038186803b158015612ef7575f80fd5b505afa158015612f09573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015612fd357604051630149e46f60e01b81526001600160a01b03821690630149e46f90612f4c9033906004016158da565b5f604051808303815f87803b158015612f63575f80fd5b505af1158015612f75573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f9150612fa59087906004016158da565b5f604051808303815f87803b158015612fbc575f80fd5b505af1158015612fce573d5f803e3d5ffd5b505050505b611c8d848461509a565b5f80612fe7613ba7565b612325612ff38561327c565b84614994565b613001613ba7565b61193a33848484614af1565b60cb545f908015610f5a57610f55611d0c610d42565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db59061307590309086908990600401615db5565b5f6040518083038186803b15801561308b575f80fd5b505afa15801561309d573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561310e57604051630149e46f60e01b81526001600160a01b03821690630149e46f906130e09086906004016158da565b5f604051808303815f87803b1580156130f7575f80fd5b505af1158015613109573d5f803e3d5ffd5b505050505b6131198585856150fd565b91506131236139a1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53084613166886121f0565b6040518463ffffffff1660e01b815260040161318493929190615db5565b5f6040518083038186803b15801561319a575f80fd5b505afa1580156131ac573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561321d57604051630149e46f60e01b81526001600160a01b03821690630149e46f906131ef9086906004016158da565b5f604051808303815f87803b158015613206575f80fd5b505af1158015613218573d5f803e3d5ffd5b505050505b6131198585856151f4565b5f6132328161391e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f908015610f5a57610f558161329361378b565b859190613876565b60cb545f908015610f5a57610f5581613293610d42565b6001600160a01b0381165f90815260cc6020526040812054610e1e90610f37565b428410156132df575f80fd5b5f60016132ea611ba6565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156133f2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134285750876001600160a01b0316816001600160a01b0316145b613430575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134a1613ba7565b6134a9613bb6565b835f036134c95760405163774257f760e01b815260040160405180910390fd5b6134d38285613ff5565b60e3546001600160a01b0316801561353f57604051636c912dad60e01b81526001600160a01b03821690636c912dad906135119086906004016158da565b5f604051808303815f87803b158015613528575f80fd5b505af115801561353a573d5f803e3d5ffd5b505050505b61354a611160613d7b565b613553856122fa565b91505f8560d4546135649190615b1d565b60d481905560dc549091506135959061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b8160d3546135a39190615b1d565b11156135c157604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135d29190615b1d565b90915550506001600160a01b0384165f90815260d2602052604081206002018054859290613601908490615b1d565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136596139a1565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906136a79030908890600401615d9b565b5f604051808303815f87803b1580156136be575f80fd5b505af11580156136d0573d5f803e3d5ffd5b5061370a9250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614246565b50509392505050565b5f8281526065602052604090206001015461372d8161391e565b61193a8383614562565b5f6137418161391e565b60dc80546001600160801b03808516600160801b0291161790556040517fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90610e9f9084906158ee565b60d45460dd5460da545f929190839061385890613851906137b990600160281b900463ffffffff1642615b68565b60db546301e13380906001600160a01b0316637c21fb1d6137da888a613fad565b6137e7898b60d354613fc5565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613826573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061384a9190615d63565b9190613876565b8490613894565b90506138648184615b1d565b935050505090565b5f610e1e8261329b565b82820281151584158583048514171661388d575f80fd5b0492915050565b5f610f5c8383670de0b6b3a7640000613876565b60da545f9081906138c490610100900463ffffffff1642615b68565b9050805f036138d4575f91505090565b60da54613918908290613904906138f2906224ea009060ff16615b7b565b60dc546001600160801b031690613894565b61390e9084615b1d565b60d5549190613876565b91505090565b611cb481336152f6565b5f6139316138a8565b90508060d55f8282546139449190615b68565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a1e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a4d57505f919050565b680755bf798b4a1bf1e58212613a61575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156123fb575f80fd5b60e354600160a01b900460ff16156123fb5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613bef6224ea0086615e25565b15613bfc57506001613c4f565b428511613c0b57506002613c4f565b613c1b60ff85166224ea00615b7b565b613c286224ea0042615e25565b613c329042615b68565b613c3c9190615b1d565b851115613c4b57506004613c4f565b5060035b826004811115613c6157613c61615e38565b816004811115613c7357613c73615e38565b14158015613ca35750816004811115613c8e57613c8e615e38565b816004811115613ca057613ca0615e38565b14155b15613d74575f826004811115613cbb57613cbb615e38565b03613d0f57806004811115613cd257613cd2615e38565b836004811115613ce457613ce4615e38565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d2157613d21615e38565b836004811115613d3357613d33615e38565b836004811115613d4557613d45615e38565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d06565b5050505050565b60d45460dd545f919082613d8f8284613fad565b60da549091505f90613de19061107890613db690600160281b900463ffffffff1642615b68565b60db5460d3546301e13380916001600160a01b031690637c21fb1d9088906137e7908b908d90613fc5565b9050613ded8185615b1d565b9350613e0460e2548261389490919063ffffffff16565b945084613e118285615b1d565b613e1b9190615b68565b60dd5560d484905560da805463ffffffff60281b1916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611cb45760e154613ead906001600160a01b0316613ea88361386c565b614d04565b8060dd5f828254613ebe9190615b1d565b909155505050565b60038201545f9042831115613f1a5760028401544260038601819055613f0390613ef1908490615b68565b613efb8487615b68565b839190613876565b9250613f0f8382615b68565b600286015550613f3d565b828103613f29575f9150613f3d565b600384018390556002840180545f90915591505b5092915050565b81545f9081613f538483615b1d565b9050613f6c613f6683876001015461533c565b82614e9e565b613f769082615b68565b9455509192915050565b5f8115801590613f8f57508383115b613f99575f611c8d565b611c8d82613fa78686615b68565b9061534a565b5f825f03613fbb575f610f5c565b610f5c828461534a565b5f835f03613fd3575f611c8d565b611c8d84613fa78486615b1d565b5f610f5c8383670de0b6b3a7640000613a07565b336001600160a01b03831614611c1e576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461193a5761403982610fce565b6140439082615b68565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f036140805750600160201b8117610e1e565b63ffffffff8316808310156140fd575f6224ea0061409e8584615b68565b6140a89190615e4c565b90506140b681610100615b68565b85901c156140d75760405163293cc41f60e21b815260040160405180910390fd5b6140e2816020615b1d565b602086901c901b9450848417600160201b1792505050610e1e565b5f6224ea0061410c8386615b68565b6141169190615e4c565b905060df81111561413a5760405163293cc41f60e21b815260040160405180910390fd5b614145816020615b1d565b6001901b851792505050610e1e565b5f8061416b60e2548461389490919063ffffffff16565b905061417681613e89565b610f5c8184615b68565b5f8082156141b4576141af61419d6141978761535e565b85614e9e565b6141a79085615b68565b859085613876565b6141b6565b5f5b90506141c28185615b68565b9150935093915050565b805f036141d65750565b60e254156141e757611cb481613e89565b8060d55f828254613ebe9190615b1d565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806110fd575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142ea576142c68382615b68565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614311908490615b68565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615fa0833981519152906143589087815260200190565b60405180910390a3506001949350505050565b614375828261247d565b611c1e575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f6143fc8661535e565b905080156144385761441d6144118683614e9e565b60408801519083613876565b92506144298385613894565b91506144358284615b68565b92505b50935093915050565b815460018301545f91906144558482615b1d565b60018601556118516144678383614e9e565b6141979084615b68565b5f6040516323b872dd60e01b5f526001600160a01b0385166004526001600160a01b0384166024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d74575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144fa9190615e5f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61456c828261247d565b15611c1e575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145e95760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906146018289613ec6565b905061460e611160613d7b565b8060dd5f82825461461f9190615b1d565b90915550505f88815260d0602090815260408083206001600160a01b0389168452825280832081518083019092528054808352600190910154928201839052909291614675918b9161467091615b1d565b614e9e565b6040805180820190915283518152602080850151908201529091505f9061469c9083614f9e565b5160e3549091506001600160a01b0316801561470c57604051636c912dad60e01b81526001600160a01b03821690636c912dad906146de908c906004016158da565b5f604051808303815f87803b1580156146f5575f80fd5b505af1158015614707573d5f803e3d5ffd5b505050505b8b4210156147d45760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147549186906143f0565b90925090506147638183615b1d565b886002015f8282546147759190615b68565b909155505089156147a8578060d55f8282546147919190615b1d565b909155506147a190508286615b68565b98506147cd565b6147b28183615b1d565b60d55f8282546147c29190615b1d565b925050819055508498505b505061481b565b60d6546147ef906147e58e42615b68565b6138519190615b7b565b6147f99084615b1d565b96506148058388615b68565b60d55f8282546148159190615b1d565b90915550505b8987111561483c57604051632c1b6b4160e21b815260040160405180910390fd5b6148468683614e7f565b60d35f8282546148569190615b68565b909155506148669050848461503c565b5060208401518451175f036148c2575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d2909252909120908101546148b7908e614eb3565b6001909101556148f2565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a46149438c6141f8565b50505050505095945050505050565b61495a61537c565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516139fd91906158da565b60e3545f9081906001600160a01b03168015614a0457604051636c912dad60e01b81526001600160a01b03821690636c912dad906149d69087906004016158da565b5f604051808303815f87803b1580156149ed575f80fd5b505af11580156149ff573d5f803e3d5ffd5b505050505b614a0f611160613d7b565b6001600160a01b0384165f90815260d2602052604090206002810154614a358782614e9e565b9350614a4084611cf6565b9450845f03614a625760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a739190615b68565b90915550614a8390508482615b68565b82600201819055508360df5f828254614a9c9190615b68565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614b115760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e16ee72090614b5f9087903090600401615d9b565b5f6040518083038186803b158015614b75575f80fd5b505afa158015614b87573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bf857604051630149e46f60e01b81526001600160a01b03821690630149e46f90614bca9086906004016158da565b5f604051808303815f87803b158015614be1575f80fd5b505af1158015614bf3573d5f803e3d5ffd5b505050505b5f614c0283610fce565b9050614c0e838261538a565b614c188482615403565b60408051848152602081018390526001600160a01b03808716929088169133915f80516020615f60833981519152910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c9591815260200190565b60405180910390a3614ca56139a1565b61280d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614246565b614ce1610fed565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d7057604051630149e46f60e01b81526001600160a01b03821690630149e46f90614d429086906004016158da565b5f604051808303815f87803b158015614d59575f80fd5b505af1158015614d6b573d5f803e3d5ffd5b505050505b61193a838361546a565b614d82613ba7565b614d8a613bb6565b614d92614cd9565b5f614d9b613d7b565b90505f614da6613928565b9050614db28482615b1d565b60dd5f828254614dc29190615b1d565b90915550614dd1905082613e89565b6110fd6139a1565b614e037f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361247d565b158015614e245750614e225f80516020615f808339815191523361247d565b155b156123fb57604051631d006fdb60e31b815260040160405180910390fd5b614e4a613ba7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586149873390565b815460018301545f9190614e938483615b68565b855561185161446783835b5f818310614eac5781610f5c565b5090919050565b5f821580614ec6575081600160201b1783145b15614ed257505f610e1e565b63ffffffff8316808303614f4057602184901c60015b60018216158015614ef857508115155b15614f0957600191821c9101614ee8565b6020614f158282615b1d565b9690961c90951b9485614f2b6224ea0083615b7b565b614f359087615b1d565b179350505050610e1e565b6224ea00614f4e8285615b68565b614f589190615e4c565b614f63906020615b1d565b6001901b198416915050610e1e565b5f54610100900460ff166123fb575f80fd5b5f54610100900460ff16614f96575f80fd5b6123fb6154b9565b604080518082019091525f8082526020820152825160208401515f91614fc8916132939082615b1d565b8085529050614fd78184615b68565b6020850152509192915050565b815460018301545f919082614ff98583615b68565b90506150058184614e9e565b61500f8385614e9e565b6150199190615b68565b60019096015550929392505050565b5f610f5c83670de0b6b3a764000084613876565b604080518082019091525f8082526020820152602083015183515f9161506191615b1d565b90505f61506e8483615b68565b855190915061507f90829084613876565b80865261508c9082615b68565b602086015250929392505050565b335f90815260cc60205260408120805483919083906150ba908490615b68565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615fa083398151915290610fbd9086815260200190565b5f61510784610fce565b9050336001600160a01b03831614615174576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151725761514e8282615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61517e848261538a565b6151888282615403565b60408051858152602081018390526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614246565b5f336001600160a01b03831614615260576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461525e5761523a8582615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b615269846121f0565b9050805f03615276575f80fd5b615280818561538a565b61528a8285615403565b60408051828152602081018690526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614246565b615300828261247d565b611c1e5761530d816154d7565b6153188360206154e9565b604051602001615329929190615ee7565b6040516020818303038152906040525f80fd5b5f818311614eac5781610f5c565b5f610f5c83670de0b6b3a764000084613a07565b805160208201515f91906153728282614e9e565b611c8d9083615b68565b60975460ff166123fb575f80fd5b615392613ba7565b61539a614cd9565b6153a5611160613d7b565b5f6153ae613928565b90505f838260dd546153c09190615b1d565b6153ca9190615b68565b90508060d45460d3546153dd9190615b1d565b11156153fb57604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc60205260408120805483929061542a908490615b68565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615fa0833981519152906020015b60405180910390a35050565b8060cb5f82825461547b9190615b1d565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615fa0833981519152910161545e565b5f54610100900460ff166154cb575f80fd5b6097805460ff19169055565b6060610e1e6001600160a01b03831660145b60605f6154f7836002615b7b565b615502906002615b1d565b6001600160401b0381111561551957615519615bee565b6040519080825280601f01601f191660200182016040528015615543576020820181803683370190505b509050600360fc1b815f8151811061555d5761555d615f36565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061558b5761558b615f36565b60200101906001600160f81b03191690815f1a9053505f6155ad846002615b7b565b6155b8906001615b1d565b90505b600181111561562f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106155ec576155ec615f36565b1a60f81b82828151811061560257615602615f36565b60200101906001600160f81b03191690815f1a90535060049490941c9361562881615f4a565b90506155bb565b508315610f5c575f80fd5b6001600160a01b0381168114611cb4575f80fd5b5f6020828403121561565e575f80fd5b8135610f5c8161563a565b5f60208284031215615679575f80fd5b81356001600160e01b031981168114610f5c575f80fd5b80356001600160801b03811681146156a6575f80fd5b919050565b5f602082840312156156bb575f80fd5b610f5c82615690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615709575f80fd5b5035919050565b5f8060408385031215615721575f80fd5b823561572c8161563a565b946020939093013593505050565b5f8083601f84011261574a575f80fd5b5081356001600160401b03811115615760575f80fd5b602083019150836020828501011115612367575f80fd5b5f8060208385031215615788575f80fd5b82356001600160401b0381111561579d575f80fd5b6157a98582860161573a565b90969095509350505050565b5f805f805f60a086880312156157c9575f80fd5b85359450602086013593506040860135925060608601356157e98161563a565b915060808601356157f98161563a565b809150509295509295909350565b5f805f60608486031215615819575f80fd5b83356158248161563a565b925060208401356158348161563a565b929592945050506040919091013590565b803560ff811681146156a6575f80fd5b5f60208284031215615865575f80fd5b610f5c82615845565b5f806040838503121561587f575f80fd5b8235915060208301356158918161563a565b809150509250929050565b5f805f80608085870312156158af575f80fd5b84359350602085013592506040850135915060608501356158cf8161563a565b939692955090935050565b6001600160a01b0391909116815260200190565b6001600160801b0391909116815260200190565b5f805f60608486031215615914575f80fd5b833561591f8161563a565b92506020840135915060408401356159368161563a565b809150509250925092565b5f8060408385031215615952575f80fd5b50508035926020909101359150565b5f60208284031215615971575f80fd5b81358015158114610f5c575f80fd5b5f805f805f805f805f806101208b8d03121561599a575f80fd5b8a356001600160401b038111156159af575f80fd5b6159bb8d828e0161573a565b909b5099506159ce905060208c01615845565b97506159dc60408c01615690565b965060608b01356159ec8161563a565b955060808b0135945060a08b01359350615a0860c08c01615690565b999c989b50969995989497939650919460e0810135936101009091013592509050565b5f805f60608486031215615a3d575f80fd5b833592506020840135615a4f8161563a565b915060408401356159368161563a565b5f805f805f805f60e0888a031215615a75575f80fd5b8735615a808161563a565b96506020880135615a908161563a565b95506040880135945060608801359350615aac60808901615845565b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215615ada575f80fd5b8235615ae58161563a565b915060208301356158918161563a565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610e1e57610e1e615b09565b600181811c90821680615b4457607f821691505b602082108103615b6257634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610e1e57610e1e615b09565b8082028115828204841417610e1e57610e1e615b09565b5f600160ff1b8201615ba657615ba6615b09565b505f0390565b8181035f831280158383131683831282161715613f3d57613f3d615b09565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f82111561193a57805f5260205f20601f840160051c81016020851015615c275750805b601f840160051c820191505b81811015613d74575f8155600101615c33565b81516001600160401b03811115615c5f57615c5f615bee565b615c7381615c6d8454615b30565b84615c02565b6020601f821160018114615ca5575f8315615c8e5750848201515b5f19600385901b1c1916600184901b178455613d74565b5f84815260208120601f198516915b82811015615cd45787850151825560209485019460019092019101615cb4565b5084821015615cf157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b038281168282160390811115610e1e57610e1e615b09565b94855260ff93909316602085015260408401919091526060830152608082015260a00190565b5f60208284031215615d73575f80fd5b5051919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b5f8060408385031215615e14575f80fd5b505080516020909101519092909150565b5f82615e3357615e33615af5565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615e5a57615e5a615af5565b500490565b5f808354615e6c81615b30565b600182168015615e835760018114615e9857615ec5565b60ff1983168652811515820286019350615ec5565b865f5260205f205f5b83811015615ebd57815488820152600190910190602001615ea1565b505081860193505b509195945050505050565b5f81518060208401855e5f93019283525090919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81525f615f126017830185615ed0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526118516011820185615ed0565b634e487b7160e01b5f52603260045260245ffd5b5f81615f5857615f58615b09565b505f19019056fefbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122005ec196d152ea67004b2106a9e8456d6fce9e4ca698150d3a643ce4c0c94880d64736f6c634300081a0033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106104c1575f3560e01c80636e76fc8f11610283578063b2a02ff111610168578063d5164184116100e0578063e63ab1e91161009a578063e63ab1e914610c98578063e94b3c2114610cac578063eee8c9e014610cb5578063ef8b30f714610cbd578063f3fdb15a14610cd0578063fb0fc4c314610ce3578063fea45d9414610cfa575f80fd5b8063d516418414610c04578063d547741f14610c17578063d6b7494f14610c2a578063d905777e14610c33578063dd62ed3e14610c5b578063e00b262514610c85575f80fd5b8063b2a02ff114610af7578063b3d7f6b914610b0a578063b460af9414610b1d578063ba08765214610b30578063bee36bb314610b43578063bf722ca214610b56578063c63d75b6146107ae578063c6e6f59214610b69578063ccfd8b1114610b7c578063ce96cb7714610bad578063d2681a0b14610bc0578063d505accf14610bf1575f80fd5b806391d14854116101fb57806391d1485414610a32578063926bb63314610a4557806394bf804d14610a5857806395d89b4114610a6b57806397bce8d014610a73578063a05a091a14610a86578063a16a885014610a99578063a1bab44714610aae578063a1e8f02b14610ac1578063a217fddf14610aca578063a9059cbb14610ad1578063acb7081514610ae4575f80fd5b80636e76fc8f146109325780636eb9ffeb1461095957806370a082311461098557806378007e23146109a45780637ad226dc146109b75780637e932d32146109ca5780637ecebe00146109dd5780638456cb59146109fc5780638a1baa4614610a045780638bcd401614610a0d5780638c3cba5a14610a205780638d0e5f0214610a29575f80fd5b8063313ce567116103a95780634322b714116103215780634322b714146107d557806347dffde0146107fc5780634914c0081461080f5780634cdad506146108225780634e7c5059146108355780635c975abb146108895780635cc2ef83146108945780635e5c06e2146108a757806361d027b3146108f057806366601032146109035780636bb65f531461090c5780636e553f651461091f575f80fd5b8063313ce567146106c657806333eeb147146106ed57806334f7d1f2146107015780633644e5151461071457806336568abe1461071c57806338d52e0f1461072f5780633aa18d6f146107635780633c6f317f1461076c5780633ec045a61461077f5780633f4ba83a146107a6578063402d267d146107ae57806342da42bf146107c2575f80fd5b8063137001011161043c57806313700101146105e557806318160ddd146105f85780631a5b9e62146106015780631a90f186146106145780631d43b30b1461061d57806323b872dd14610630578063248a9ca31461064357806325fc07a91461066557806328acf2cf146106845780632c5dcc77146106975780632e0af008146106aa5780632f2ff15d146106b3575f80fd5b8063014a296f146104c557806301e1d114146104f257806301ffc9a714610508578063022d8af51461052b5780630539fa8c1461054057806306fdde031461054957806307a2d13a1461055e578063095ea7b3146105715780630a28a477146105845780630ab69be8146105975780630e52dbec146105be5780630f2b75aa146105dd575b5f80fd5b6104d86104d336600461564e565b610d0d565b604080519283526020830191909152015b60405180910390f35b6104fa610d42565b6040519081526020016104e9565b61051b610516366004615669565b610dee565b60405190151581526020016104e9565b61053e6105393660046156ab565b610e24565b005b6104fa60d85481565b610551610eab565b6040516104e991906156c4565b6104fa61056c3660046156f9565b610f37565b61051b61057f366004615710565b610f63565b6104fa6105923660046156f9565b610fce565b6104d86105a53660046156f9565b5f90815260d16020526040902080546001909101549091565b60da546105cb9060ff1681565b60405160ff90911681526020016104e9565b6104fa610fed565b61053e6105f3366004615777565b611092565b6104fa60cb5481565b6104fa61060f3660046157b5565b611103565b6104fa60d45481565b6104fa61062b36600461564e565b6115f3565b61051b61063e366004615807565b6116f3565b6104fa6106513660046156f9565b5f9081526065602052604090206001015490565b6104fa6106733660046156f9565b5f90815260d1602052604090205490565b61053e610692366004615855565b61185a565b61053e6106a5366004615710565b6118a6565b6104fa60dd5481565b61053e6106c136600461586e565b611916565b6105cb7f000000000000000000000000000000000000000000000000000000000000000081565b60e35461051b90600160a01b900460ff1681565b6104fa61070f36600461589c565b61193f565b6104fa611ba6565b61053e61072a36600461586e565b611c00565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b6040516104e991906158da565b6104fa60d95481565b6104fa61077a36600461589c565b611c22565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b61053e611c95565b6104fa6107bc36600461564e565b505f1990565b61053e6107d03660046156f9565b611cb7565b60dc546107ef90600160801b90046001600160801b031681565b6040516104e991906158ee565b6104fa61080a3660046156f9565b611cf6565b6104fa61081d366004615902565b611d14565b6104fa6108303660046156f9565b6121f0565b6108696108433660046156f9565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016104e9565b60975460ff1661051b565b61053e6108a2366004615941565b6121fa565b6108d56108b536600461564e565b60d26020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016104e9565b60e154610756906001600160a01b031681565b6104fa60e25481565b60e354610756906001600160a01b031681565b6104fa61092d36600461586e565b612254565b6104fa7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da5461097090600160281b900463ffffffff1681565b60405163ffffffff90911681526020016104e9565b6104fa61099336600461564e565b60cc6020525f908152604090205481565b6104fa6109b23660046156f9565b6122fa565b6104d86109c536600461586e565b612311565b61053e6109d8366004615961565b61236e565b6104fa6109eb36600461564e565b60ce6020525f908152604090205481565b61053e6123eb565b6104fa60d55481565b61053e610a1b36600461564e565b6123fd565b6104fa60d35481565b6104fa60df5481565b61051b610a4036600461586e565b61247d565b61053e610a5336600461564e565b6124a7565b6104fa610a6636600461586e565b612815565b6105516128b0565b61053e610a81366004615980565b6128bd565b6104fa610a943660046157b5565b612a1c565b60da5461097090610100900463ffffffff1681565b61053e610abc3660046156f9565b612e41565b6104fa60d75481565b6104fa5f81565b61051b610adf366004615710565b612e80565b6104d8610af236600461586e565b612fdd565b61053e610b05366004615807565b612ff9565b6104fa610b183660046156f9565b61300d565b6104fa610b2b366004615a2b565b613023565b6104fa610b3e366004615a2b565b61312b565b61053e610b5136600461564e565b613228565b6104fa610b643660046156f9565b61327c565b6104fa610b773660046156f9565b61329b565b6104d8610b8a36600461586e565b60cf60209081525f92835260408084209091529082529020805460019091015482565b6104fa610bbb36600461564e565b6132b2565b6104d8610bce36600461586e565b60d060209081525f92835260408084209091529082529020805460019091015482565b61053e610bff366004615a5f565b6132d3565b6104fa610c12366004615a2b565b613498565b61053e610c2536600461586e565b613713565b6104fa60d65481565b6104fa610c4136600461564e565b6001600160a01b03165f90815260cc602052604090205490565b6104fa610c69366004615ac9565b60cd60209081525f928352604080842090915290825290205481565b61053e610c933660046156ab565b613737565b6104fa5f80516020615f8083398151915281565b6104fa60de5481565b6104fa61378b565b6104fa610ccb3660046156f9565b61386c565b60db54610756906001600160a01b031681565b60da5461097090600160481b900463ffffffff1681565b60dc546107ef906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610d3090610f37565b610d39846115f3565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610db4575f81815260d160205260409020600381015480831115610da857824210610d8e578160020154610da3565b6002820154610da39042839003838603613876565b860195505b50506224ea0001610d5c565b50610dd760e254670de0b6b3a76400000360d454610dd061378b565b0390613894565b610ddf6138a8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610e1e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610e2e8161391e565b610e36613928565b60dd5f828254610e469190615b1d565b90915550610e5490506139a1565b60dc80546001600160801b0319166001600160801b0384161790556040517f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e90610e9f9084906158ee565b60405180910390a15050565b60c98054610eb890615b30565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee490615b30565b8015610f2f5780601f10610f0657610100808354040283529160200191610f2f565b820191905f5260205f20905b815481529060010190602001808311610f1257829003601f168201915b505050505081565b60cb545f908015610f5a57610f55610f4d610d42565b849083613876565b610f5c565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fbd9086815260200190565b60405180910390a350600192915050565b60cb545f908015610f5a57610f5581610fe5610d42565b859190613a07565b60dd5460de545f9190828183106110065760d85461100a565b60d9545b60da549091505f906110459061102d90600160481b900463ffffffff1642615b68565b6110379084615b7b565b61104090615b92565b613a34565b61105790670de0b6b3a7640000615bac565b90506110638185613894565b61107f61107883670de0b6b3a7640000615b68565b8590613894565b6110899190615b1d565b94505050505090565b5f61109c8161391e565b82826040516020016110af929190615bcb565b60405160208183030381529060405260c990816110cc9190615c46565b5082826040516020016110e0929190615d00565b60405160208183030381529060405260ca90816110fd9190615c46565b50505050565b5f61110c613ba7565b611114613bb6565b845f036111345760405163774257f760e01b815260040160405180910390fd5b60da5461114890879060ff1660035f613be1565b5f86815260d160205260409020611165611160613d7b565b613e89565b61116f8188613ec6565b60dd5f82825461117f9190615b1d565b909155505060e3546001600160a01b031680156111f057604051636c912dad60e01b81526001600160a01b03821690636c912dad906111c29087906004016158da565b5f604051808303815f87803b1580156111d9575f80fd5b505af11580156111eb573d5f803e3d5ffd5b505050505b5f6111fb8389613f44565b9050801561127f575f8160d3546112129190615b1d565b60dc549091506112509061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b60dd54906001600160801b0316613894565b60d45461125d9083615b1d565b111561127b57604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061128a610fed565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff166112d88a600101548b5f015489613f80565b6112e28888613fad565b6112ef898960d354613fc5565b6040518663ffffffff1660e01b815260040161130f959493929190615d3d565b602060405180830381865afa15801561132a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061134e9190615d63565b905061137361136c611360428f615b68565b83906301e13380613876565b8c90613fe1565b935050505080886113849190615b1d565b9350868411156113a757604051632c1b6b4160e21b815260040160405180910390fd5b6113b18585613ff5565b5f89815260d0602090815260408083206001600160a01b038916845290915281208054909103611408576001600160a01b0386165f90815260d2602052604090206001810154611401908c61406b565b6001909101555b5f8061144b61141685614154565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614180565b91509150815f1461146f5781866002015f8282546114699190615b1d565b90915550505b611478816141cc565b60405180604001604052808c855f01546114929190615b1d565b81526020018585600101546114a79190615b1d565b90525f8d815260d0602090815260408083206001600160a01b03808e168086529184529382902085518155949092015160019094019390935591519194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139061151d9033908e908890615d7a565b60405180910390a461152d6139a1565b611536896141f8565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906115849030908990600401615d9b565b5f604051808303815f87803b15801561159b575f80fd5b505af11580156115ad573d5f803e3d5ffd5b506115e79250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614246565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b81156116c85760018216156116ad575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916116689190615b1d565b90506116748188615b1d565b9650824211156116aa5761169d8561168c8542615b68565b6116969190615b7b565b8290613894565b6116a79088615b1d565b96505b50505b60019190911c906116c16224ea0082615b1d565b9050611624565b600284015480156116e9576116dc81611cf6565b6116e69087615b1d565b95505b5050505050919050565b5f6116fc613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53086611736866121f0565b6040518463ffffffff1660e01b815260040161175493929190615db5565b5f6040518083038186803b15801561176a575f80fd5b505afa15801561177c573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561184657604051630149e46f60e01b81526001600160a01b03821690630149e46f906117bf9088906004016158da565b5f604051808303815f87803b1580156117d6575f80fd5b505af11580156117e8573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f91506118189087906004016158da565b5f604051808303815f87803b15801561182f575f80fd5b505af1158015611841573d5f803e3d5ffd5b505050505b611851858585614291565b95945050505050565b5f6118648161391e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610e9f565b5f6118b08161391e565b6118bb611160613d7b565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119308161391e565b61193a838361436b565b505050565b5f611948613ba7565b611950613bb6565b835f03611970576040516356316e8760e01b815260040160405180910390fd5b60da5461198490869060ff1660035f613be1565b5f85815260d1602052604081209061199c8288613ec6565b90506119a9611160613d7b565b8060dd5f8282546119ba9190615b1d565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f9182916119ff918a906143f0565b9092509050611a0e8289615b1d565b945086851015611a3157604051632c1b6b4160e21b815260040160405180910390fd5b611a3b8489614441565b60d35f828254611a4b9190615b68565b90915550611a5b90508183615b1d565b846002015f828254611a6d9190615b68565b925050819055508060d55f828254611a859190615b1d565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611ada576001600160a01b0387165f90815260d2602052604090208054611ad7908c61406b565b90555b88815f015f828254611aec9190615b1d565b9250508190555082816001015f828254611b069190615b1d565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611b5b6139a1565b611b648a6141f8565b611b996001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614471565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611bdb57611bd66144c9565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611c14575f80fd5b611c1e8282614562565b5050565b5f611c2b613ba7565b60da54611c4090869060ff1660036002613be1565b611c4e8585858560016145c8565b9050611c586139a1565b611c8d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b949350505050565b5f80516020615f80833981519152611cac8161391e565b611cb4614952565b50565b5f611cc18161391e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610e9f565b60df545f908015610f5a57610f55611d0c61378b565b849083613a07565b5f611d1d613ba7565b6001600160a01b0384163303611d46576040516344511af160e01b815260040160405180910390fd5b611d4e613928565b60dd5f828254611d5e9190615b1d565b909155505060405163042dcf6b60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890611db5903090869089908990600401615dd9565b602060405180830381865afa158015611dd0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df49190615d63565b9250825f03611e165760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611e5057508515155b15611f5d576001821615611f42575f81421015611e8757611e748288898b5f6145c8565b9050611e808188615b68565b9650611f34565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611eb99190615b1d565b9150505f611ee060d6548542611ecf9190615b68565b611ed99190615b7b565b8390613894565b611eea9083615b1d565b9050888111611ef95788611f04565b611f04898383613876565b9250825f03611f15575f9850611f31565b611f2284848b8d5f6145c8565b9250611f2e838a615b68565b98505b50505b611f3e8186615b1d565b9450505b60019190911c90611f566224ea0082615b1d565b9050611e42565b50508315801590611f715750600281015415155b15611fa6575f611f808561327c565b90508015611fa4575f611f938288614994565b509050611fa08185615b1d565b9350505b505b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1b003130878a886040518563ffffffff1660e01b8152600401611ffa9493929190615dd9565b6040805180830381865afa158015612014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120389190615e03565b915091508160d55f82825461204d9190615b1d565b90915550612094905033306120628588615b1d565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614471565b306001600160a01b038616036120b5576120b030338984614af1565b61211a565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906120e59033908b908690600401615db5565b5f604051808303815f87803b1580156120fc575f80fd5b505af115801561210e573d5f803e3d5ffd5b5050505061211a6139a1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906121b9908a906004016158da565b5f604051808303815f87803b1580156121d0575f80fd5b505af11580156121e2573d5f803e3d5ffd5b505050505050509392505050565b5f610e1e82610f37565b5f6122048161391e565b61220c614cd9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61225e8361386c565b9050805f0361226b575f80fd5b6122a06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614471565b6122aa8282614d04565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8382614d7a565b60df545f908015610f5a57610f5581610fe561378b565b5f8061231b613ba7565b6123258484614994565b90925090506123326139a1565b6123676001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614471565b9250929050565b5f6123788161391e565b60e35460ff600160a01b90910416151582151514611c1e5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee698906123df90851515815260200190565b60405180910390a25050565b6123f3614dd9565b6123fb614e42565b565b5f6124078161391e565b60db546001600160a01b03161561242357612423611160613d7b565b60db80546001600160a01b0319166001600160a01b0384161790556124466139a1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146124f0576040516317568c8f60e21b815260040160405180910390fd5b6124f8613928565b60dd5f8282546125089190615b1d565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b811561276c576001821615612751575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916125849190615b1d565b905080861061274e5760e3546001600160a01b031680156125f957604051636c912dad60e01b81526001600160a01b03821690636c912dad906125cb908c906004016158da565b5f604051808303815f87803b1580156125e2575f80fd5b505af11580156125f4573d5f803e3d5ffd5b505050505b6126038288615b68565b965061260f8287615b1d565b83545f86815260d1602052604081209298509161262b91614e7f565b905080156126c4578060d35f8282546126449190615b68565b909155505083545f906126739061265b9084614e9e565b5f88815260d160205260409020600201549084613876565b90508060d15f8881526020019081526020015f206002015f8282546126989190615b68565b925050819055508060d55f8282546126b09190615b1d565b909155506126c09050818a615b1d565b9850505b5f85815260d0602090815260408083206001600160a01b038e16845290915281208181556001908101919091558901546126fe9086614eb3565b60018a015560408051848152602081018590526001600160a01b038c1691339188917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a450505b50505b60019190911c906127656224ea0082615b1d565b9050612540565b60028501541580159061278957506127838461327c565b93508315155b156127aa575f6127998588614994565b5090506127a68185615b1d565b9350505b8215612805578260d55f8282546127c19190615b68565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b61280d6139a1565b505050505050565b5f61281f8361300d565b90506128566001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b6128608284614d04565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8184614d7a565b60ca8054610eb890615b30565b5f54610100900460ff16158080156128db57505f54600160ff909116105b806128f45750303b1580156128f457505f5460ff166001145b6128fc575f80fd5b5f805460ff19166001179055801561291d575f805461ff0019166101001790555b612925614f72565b61292d614f84565b60da805468ffffffffffffffff0019166101004263ffffffff1690810263ffffffff60281b191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129805f3361436b565b61298a8b8b611092565b6129938961185a565b61299c88610e24565b6129a5876123fd565b6129ae86612e41565b6129b785611cb7565b6129c084613737565b6129ca83836121fa565b8015612a0f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a25613ba7565b845f03612a455760405163b8cb621960e01b815260040160405180910390fd5b60da54612a5a90879060ff1660036002613be1565b5f86815260d160205260409020612a72611160613d7b565b612a7c8188613ec6565b60dd5f828254612a8c9190615b1d565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612ad69190615b1d565b871115612af15760208101518151612aee9190615b1d565b96505b6040805180820190915281518152602080830151908201525f90612b2190612b19908a614f9e565b518490614fe4565b60d354612b2e9190615b1d565b905060dd5460d45482612b419190615b1d565b1115612b5f57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612c71575f612b73610fed565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bc78a600101548b5f01548a613f80565b612bd18989613fad565b612bdc8a8a8a613fc5565b6040518663ffffffff1660e01b8152600401612bfc959493929190615d3d565b602060405180830381865afa158015612c17573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c3b9190615d63565b9050612c66612c4d611360428f615b68565b612c5f90670de0b6b3a7640000615b1d565b8c90615028565b965050505050612c75565b8692505b85831015612c9657604051632c1b6b4160e21b815260040160405180910390fd5b612ca08484613ff5565b5f80612cec612cb7612cb2878c615b68565b614154565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614180565b9150915081846002015f828254612d039190615b1d565b90915550612d129050816141cc565b612d1c838a61503c565b5060208301518351175f03612d6f575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612d68908c614eb3565b9055612d9f565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b856001600160a01b0316876001600160a01b03168b7fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c338d8a604051612de793929190615d7a565b60405180910390a4612df76139a1565b612e008a6141f8565b612e346001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614246565b5050505095945050505050565b5f612e4b8161391e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610e9f565b5f612e89613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612ec3866121f0565b6040518463ffffffff1660e01b8152600401612ee193929190615db5565b5f6040518083038186803b158015612ef7575f80fd5b505afa158015612f09573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015612fd357604051630149e46f60e01b81526001600160a01b03821690630149e46f90612f4c9033906004016158da565b5f604051808303815f87803b158015612f63575f80fd5b505af1158015612f75573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f9150612fa59087906004016158da565b5f604051808303815f87803b158015612fbc575f80fd5b505af1158015612fce573d5f803e3d5ffd5b505050505b611c8d848461509a565b5f80612fe7613ba7565b612325612ff38561327c565b84614994565b613001613ba7565b61193a33848484614af1565b60cb545f908015610f5a57610f55611d0c610d42565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db59061307590309086908990600401615db5565b5f6040518083038186803b15801561308b575f80fd5b505afa15801561309d573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561310e57604051630149e46f60e01b81526001600160a01b03821690630149e46f906130e09086906004016158da565b5f604051808303815f87803b1580156130f7575f80fd5b505af1158015613109573d5f803e3d5ffd5b505050505b6131198585856150fd565b91506131236139a1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53084613166886121f0565b6040518463ffffffff1660e01b815260040161318493929190615db5565b5f6040518083038186803b15801561319a575f80fd5b505afa1580156131ac573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561321d57604051630149e46f60e01b81526001600160a01b03821690630149e46f906131ef9086906004016158da565b5f604051808303815f87803b158015613206575f80fd5b505af1158015613218573d5f803e3d5ffd5b505050505b6131198585856151f4565b5f6132328161391e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f908015610f5a57610f558161329361378b565b859190613876565b60cb545f908015610f5a57610f5581613293610d42565b6001600160a01b0381165f90815260cc6020526040812054610e1e90610f37565b428410156132df575f80fd5b5f60016132ea611ba6565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156133f2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134285750876001600160a01b0316816001600160a01b0316145b613430575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134a1613ba7565b6134a9613bb6565b835f036134c95760405163774257f760e01b815260040160405180910390fd5b6134d38285613ff5565b60e3546001600160a01b0316801561353f57604051636c912dad60e01b81526001600160a01b03821690636c912dad906135119086906004016158da565b5f604051808303815f87803b158015613528575f80fd5b505af115801561353a573d5f803e3d5ffd5b505050505b61354a611160613d7b565b613553856122fa565b91505f8560d4546135649190615b1d565b60d481905560dc549091506135959061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b8160d3546135a39190615b1d565b11156135c157604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135d29190615b1d565b90915550506001600160a01b0384165f90815260d2602052604081206002018054859290613601908490615b1d565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136596139a1565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906136a79030908890600401615d9b565b5f604051808303815f87803b1580156136be575f80fd5b505af11580156136d0573d5f803e3d5ffd5b5061370a9250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614246565b50509392505050565b5f8281526065602052604090206001015461372d8161391e565b61193a8383614562565b5f6137418161391e565b60dc80546001600160801b03808516600160801b0291161790556040517fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90610e9f9084906158ee565b60d45460dd5460da545f929190839061385890613851906137b990600160281b900463ffffffff1642615b68565b60db546301e13380906001600160a01b0316637c21fb1d6137da888a613fad565b6137e7898b60d354613fc5565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613826573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061384a9190615d63565b9190613876565b8490613894565b90506138648184615b1d565b935050505090565b5f610e1e8261329b565b82820281151584158583048514171661388d575f80fd5b0492915050565b5f610f5c8383670de0b6b3a7640000613876565b60da545f9081906138c490610100900463ffffffff1642615b68565b9050805f036138d4575f91505090565b60da54613918908290613904906138f2906224ea009060ff16615b7b565b60dc546001600160801b031690613894565b61390e9084615b1d565b60d5549190613876565b91505090565b611cb481336152f6565b5f6139316138a8565b90508060d55f8282546139449190615b68565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a1e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a4d57505f919050565b680755bf798b4a1bf1e58212613a61575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156123fb575f80fd5b60e354600160a01b900460ff16156123fb5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613bef6224ea0086615e25565b15613bfc57506001613c4f565b428511613c0b57506002613c4f565b613c1b60ff85166224ea00615b7b565b613c286224ea0042615e25565b613c329042615b68565b613c3c9190615b1d565b851115613c4b57506004613c4f565b5060035b826004811115613c6157613c61615e38565b816004811115613c7357613c73615e38565b14158015613ca35750816004811115613c8e57613c8e615e38565b816004811115613ca057613ca0615e38565b14155b15613d74575f826004811115613cbb57613cbb615e38565b03613d0f57806004811115613cd257613cd2615e38565b836004811115613ce457613ce4615e38565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d2157613d21615e38565b836004811115613d3357613d33615e38565b836004811115613d4557613d45615e38565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d06565b5050505050565b60d45460dd545f919082613d8f8284613fad565b60da549091505f90613de19061107890613db690600160281b900463ffffffff1642615b68565b60db5460d3546301e13380916001600160a01b031690637c21fb1d9088906137e7908b908d90613fc5565b9050613ded8185615b1d565b9350613e0460e2548261389490919063ffffffff16565b945084613e118285615b1d565b613e1b9190615b68565b60dd5560d484905560da805463ffffffff60281b1916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611cb45760e154613ead906001600160a01b0316613ea88361386c565b614d04565b8060dd5f828254613ebe9190615b1d565b909155505050565b60038201545f9042831115613f1a5760028401544260038601819055613f0390613ef1908490615b68565b613efb8487615b68565b839190613876565b9250613f0f8382615b68565b600286015550613f3d565b828103613f29575f9150613f3d565b600384018390556002840180545f90915591505b5092915050565b81545f9081613f538483615b1d565b9050613f6c613f6683876001015461533c565b82614e9e565b613f769082615b68565b9455509192915050565b5f8115801590613f8f57508383115b613f99575f611c8d565b611c8d82613fa78686615b68565b9061534a565b5f825f03613fbb575f610f5c565b610f5c828461534a565b5f835f03613fd3575f611c8d565b611c8d84613fa78486615b1d565b5f610f5c8383670de0b6b3a7640000613a07565b336001600160a01b03831614611c1e576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461193a5761403982610fce565b6140439082615b68565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f036140805750600160201b8117610e1e565b63ffffffff8316808310156140fd575f6224ea0061409e8584615b68565b6140a89190615e4c565b90506140b681610100615b68565b85901c156140d75760405163293cc41f60e21b815260040160405180910390fd5b6140e2816020615b1d565b602086901c901b9450848417600160201b1792505050610e1e565b5f6224ea0061410c8386615b68565b6141169190615e4c565b905060df81111561413a5760405163293cc41f60e21b815260040160405180910390fd5b614145816020615b1d565b6001901b851792505050610e1e565b5f8061416b60e2548461389490919063ffffffff16565b905061417681613e89565b610f5c8184615b68565b5f8082156141b4576141af61419d6141978761535e565b85614e9e565b6141a79085615b68565b859085613876565b6141b6565b5f5b90506141c28185615b68565b9150935093915050565b805f036141d65750565b60e254156141e757611cb481613e89565b8060d55f828254613ebe9190615b1d565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806110fd575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142ea576142c68382615b68565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614311908490615b68565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615fa0833981519152906143589087815260200190565b60405180910390a3506001949350505050565b614375828261247d565b611c1e575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f6143fc8661535e565b905080156144385761441d6144118683614e9e565b60408801519083613876565b92506144298385613894565b91506144358284615b68565b92505b50935093915050565b815460018301545f91906144558482615b1d565b60018601556118516144678383614e9e565b6141979084615b68565b5f6040516323b872dd60e01b5f526001600160a01b0385166004526001600160a01b0384166024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d74575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144fa9190615e5f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61456c828261247d565b15611c1e575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145e95760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906146018289613ec6565b905061460e611160613d7b565b8060dd5f82825461461f9190615b1d565b90915550505f88815260d0602090815260408083206001600160a01b0389168452825280832081518083019092528054808352600190910154928201839052909291614675918b9161467091615b1d565b614e9e565b6040805180820190915283518152602080850151908201529091505f9061469c9083614f9e565b5160e3549091506001600160a01b0316801561470c57604051636c912dad60e01b81526001600160a01b03821690636c912dad906146de908c906004016158da565b5f604051808303815f87803b1580156146f5575f80fd5b505af1158015614707573d5f803e3d5ffd5b505050505b8b4210156147d45760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147549186906143f0565b90925090506147638183615b1d565b886002015f8282546147759190615b68565b909155505089156147a8578060d55f8282546147919190615b1d565b909155506147a190508286615b68565b98506147cd565b6147b28183615b1d565b60d55f8282546147c29190615b1d565b925050819055508498505b505061481b565b60d6546147ef906147e58e42615b68565b6138519190615b7b565b6147f99084615b1d565b96506148058388615b68565b60d55f8282546148159190615b1d565b90915550505b8987111561483c57604051632c1b6b4160e21b815260040160405180910390fd5b6148468683614e7f565b60d35f8282546148569190615b68565b909155506148669050848461503c565b5060208401518451175f036148c2575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d2909252909120908101546148b7908e614eb3565b6001909101556148f2565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a46149438c6141f8565b50505050505095945050505050565b61495a61537c565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516139fd91906158da565b60e3545f9081906001600160a01b03168015614a0457604051636c912dad60e01b81526001600160a01b03821690636c912dad906149d69087906004016158da565b5f604051808303815f87803b1580156149ed575f80fd5b505af11580156149ff573d5f803e3d5ffd5b505050505b614a0f611160613d7b565b6001600160a01b0384165f90815260d2602052604090206002810154614a358782614e9e565b9350614a4084611cf6565b9450845f03614a625760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a739190615b68565b90915550614a8390508482615b68565b82600201819055508360df5f828254614a9c9190615b68565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614b115760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e16ee72090614b5f9087903090600401615d9b565b5f6040518083038186803b158015614b75575f80fd5b505afa158015614b87573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bf857604051630149e46f60e01b81526001600160a01b03821690630149e46f90614bca9086906004016158da565b5f604051808303815f87803b158015614be1575f80fd5b505af1158015614bf3573d5f803e3d5ffd5b505050505b5f614c0283610fce565b9050614c0e838261538a565b614c188482615403565b60408051848152602081018390526001600160a01b03808716929088169133915f80516020615f60833981519152910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c9591815260200190565b60405180910390a3614ca56139a1565b61280d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614246565b614ce1610fed565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d7057604051630149e46f60e01b81526001600160a01b03821690630149e46f90614d429086906004016158da565b5f604051808303815f87803b158015614d59575f80fd5b505af1158015614d6b573d5f803e3d5ffd5b505050505b61193a838361546a565b614d82613ba7565b614d8a613bb6565b614d92614cd9565b5f614d9b613d7b565b90505f614da6613928565b9050614db28482615b1d565b60dd5f828254614dc29190615b1d565b90915550614dd1905082613e89565b6110fd6139a1565b614e037f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361247d565b158015614e245750614e225f80516020615f808339815191523361247d565b155b156123fb57604051631d006fdb60e31b815260040160405180910390fd5b614e4a613ba7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586149873390565b815460018301545f9190614e938483615b68565b855561185161446783835b5f818310614eac5781610f5c565b5090919050565b5f821580614ec6575081600160201b1783145b15614ed257505f610e1e565b63ffffffff8316808303614f4057602184901c60015b60018216158015614ef857508115155b15614f0957600191821c9101614ee8565b6020614f158282615b1d565b9690961c90951b9485614f2b6224ea0083615b7b565b614f359087615b1d565b179350505050610e1e565b6224ea00614f4e8285615b68565b614f589190615e4c565b614f63906020615b1d565b6001901b198416915050610e1e565b5f54610100900460ff166123fb575f80fd5b5f54610100900460ff16614f96575f80fd5b6123fb6154b9565b604080518082019091525f8082526020820152825160208401515f91614fc8916132939082615b1d565b8085529050614fd78184615b68565b6020850152509192915050565b815460018301545f919082614ff98583615b68565b90506150058184614e9e565b61500f8385614e9e565b6150199190615b68565b60019096015550929392505050565b5f610f5c83670de0b6b3a764000084613876565b604080518082019091525f8082526020820152602083015183515f9161506191615b1d565b90505f61506e8483615b68565b855190915061507f90829084613876565b80865261508c9082615b68565b602086015250929392505050565b335f90815260cc60205260408120805483919083906150ba908490615b68565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615fa083398151915290610fbd9086815260200190565b5f61510784610fce565b9050336001600160a01b03831614615174576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151725761514e8282615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61517e848261538a565b6151888282615403565b60408051858152602081018390526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614246565b5f336001600160a01b03831614615260576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461525e5761523a8582615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b615269846121f0565b9050805f03615276575f80fd5b615280818561538a565b61528a8285615403565b60408051828152602081018690526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614246565b615300828261247d565b611c1e5761530d816154d7565b6153188360206154e9565b604051602001615329929190615ee7565b6040516020818303038152906040525f80fd5b5f818311614eac5781610f5c565b5f610f5c83670de0b6b3a764000084613a07565b805160208201515f91906153728282614e9e565b611c8d9083615b68565b60975460ff166123fb575f80fd5b615392613ba7565b61539a614cd9565b6153a5611160613d7b565b5f6153ae613928565b90505f838260dd546153c09190615b1d565b6153ca9190615b68565b90508060d45460d3546153dd9190615b1d565b11156153fb57604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc60205260408120805483929061542a908490615b68565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615fa0833981519152906020015b60405180910390a35050565b8060cb5f82825461547b9190615b1d565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615fa0833981519152910161545e565b5f54610100900460ff166154cb575f80fd5b6097805460ff19169055565b6060610e1e6001600160a01b03831660145b60605f6154f7836002615b7b565b615502906002615b1d565b6001600160401b0381111561551957615519615bee565b6040519080825280601f01601f191660200182016040528015615543576020820181803683370190505b509050600360fc1b815f8151811061555d5761555d615f36565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061558b5761558b615f36565b60200101906001600160f81b03191690815f1a9053505f6155ad846002615b7b565b6155b8906001615b1d565b90505b600181111561562f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106155ec576155ec615f36565b1a60f81b82828151811061560257615602615f36565b60200101906001600160f81b03191690815f1a90535060049490941c9361562881615f4a565b90506155bb565b508315610f5c575f80fd5b6001600160a01b0381168114611cb4575f80fd5b5f6020828403121561565e575f80fd5b8135610f5c8161563a565b5f60208284031215615679575f80fd5b81356001600160e01b031981168114610f5c575f80fd5b80356001600160801b03811681146156a6575f80fd5b919050565b5f602082840312156156bb575f80fd5b610f5c82615690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615709575f80fd5b5035919050565b5f8060408385031215615721575f80fd5b823561572c8161563a565b946020939093013593505050565b5f8083601f84011261574a575f80fd5b5081356001600160401b03811115615760575f80fd5b602083019150836020828501011115612367575f80fd5b5f8060208385031215615788575f80fd5b82356001600160401b0381111561579d575f80fd5b6157a98582860161573a565b90969095509350505050565b5f805f805f60a086880312156157c9575f80fd5b85359450602086013593506040860135925060608601356157e98161563a565b915060808601356157f98161563a565b809150509295509295909350565b5f805f60608486031215615819575f80fd5b83356158248161563a565b925060208401356158348161563a565b929592945050506040919091013590565b803560ff811681146156a6575f80fd5b5f60208284031215615865575f80fd5b610f5c82615845565b5f806040838503121561587f575f80fd5b8235915060208301356158918161563a565b809150509250929050565b5f805f80608085870312156158af575f80fd5b84359350602085013592506040850135915060608501356158cf8161563a565b939692955090935050565b6001600160a01b0391909116815260200190565b6001600160801b0391909116815260200190565b5f805f60608486031215615914575f80fd5b833561591f8161563a565b92506020840135915060408401356159368161563a565b809150509250925092565b5f8060408385031215615952575f80fd5b50508035926020909101359150565b5f60208284031215615971575f80fd5b81358015158114610f5c575f80fd5b5f805f805f805f805f806101208b8d03121561599a575f80fd5b8a356001600160401b038111156159af575f80fd5b6159bb8d828e0161573a565b909b5099506159ce905060208c01615845565b97506159dc60408c01615690565b965060608b01356159ec8161563a565b955060808b0135945060a08b01359350615a0860c08c01615690565b999c989b50969995989497939650919460e0810135936101009091013592509050565b5f805f60608486031215615a3d575f80fd5b833592506020840135615a4f8161563a565b915060408401356159368161563a565b5f805f805f805f60e0888a031215615a75575f80fd5b8735615a808161563a565b96506020880135615a908161563a565b95506040880135945060608801359350615aac60808901615845565b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215615ada575f80fd5b8235615ae58161563a565b915060208301356158918161563a565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610e1e57610e1e615b09565b600181811c90821680615b4457607f821691505b602082108103615b6257634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610e1e57610e1e615b09565b8082028115828204841417610e1e57610e1e615b09565b5f600160ff1b8201615ba657615ba6615b09565b505f0390565b8181035f831280158383131683831282161715613f3d57613f3d615b09565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f82111561193a57805f5260205f20601f840160051c81016020851015615c275750805b601f840160051c820191505b81811015613d74575f8155600101615c33565b81516001600160401b03811115615c5f57615c5f615bee565b615c7381615c6d8454615b30565b84615c02565b6020601f821160018114615ca5575f8315615c8e5750848201515b5f19600385901b1c1916600184901b178455613d74565b5f84815260208120601f198516915b82811015615cd45787850151825560209485019460019092019101615cb4565b5084821015615cf157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b038281168282160390811115610e1e57610e1e615b09565b94855260ff93909316602085015260408401919091526060830152608082015260a00190565b5f60208284031215615d73575f80fd5b5051919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b5f8060408385031215615e14575f80fd5b505080516020909101519092909150565b5f82615e3357615e33615af5565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615e5a57615e5a615af5565b500490565b5f808354615e6c81615b30565b600182168015615e835760018114615e9857615ec5565b60ff1983168652811515820286019350615ec5565b865f5260205f205f5b83811015615ebd57815488820152600190910190602001615ea1565b505081860193505b509195945050505050565b5f81518060208401855e5f93019283525090919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81525f615f126017830185615ed0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526118516011820185615ed0565b634e487b7160e01b5f52603260045260245ffd5b5f81615f5857615f58615b09565b505f19019056fefbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122005ec196d152ea67004b2106a9e8456d6fce9e4ca698150d3a643ce4c0c94880d64736f6c634300081a0033", "storageLayout": { "storage": [ { - "astId": 543, + "astId": 416, "contract": "contracts/Market.sol:Market", "label": "_initialized", "offset": 0, @@ -3528,7 +2785,7 @@ "type": "t_uint8" }, { - "astId": 546, + "astId": 419, "contract": "contracts/Market.sol:Market", "label": "_initializing", "offset": 1, @@ -3536,7 +2793,7 @@ "type": "t_bool" }, { - "astId": 3288, + "astId": 1086, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3544,7 +2801,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 4287, + "astId": 1360, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3568,7 +2825,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 727, + "astId": 600, "contract": "contracts/Market.sol:Market", "label": "_paused", "offset": 0, @@ -3576,7 +2833,7 @@ "type": "t_bool" }, { - "astId": 832, + "astId": 705, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3584,7 +2841,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 35688, + "astId": 16118, "contract": "contracts/Market.sol:Market", "label": "name", "offset": 0, @@ -3592,7 +2849,7 @@ "type": "t_string_storage" }, { - "astId": 35690, + "astId": 16120, "contract": "contracts/Market.sol:Market", "label": "symbol", "offset": 0, @@ -3600,7 +2857,7 @@ "type": "t_string_storage" }, { - "astId": 35694, + "astId": 16124, "contract": "contracts/Market.sol:Market", "label": "totalSupply", "offset": 0, @@ -3608,7 +2865,7 @@ "type": "t_uint256" }, { - "astId": 35698, + "astId": 16128, "contract": "contracts/Market.sol:Market", "label": "balanceOf", "offset": 0, @@ -3616,7 +2873,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 35704, + "astId": 16134, "contract": "contracts/Market.sol:Market", "label": "allowance", "offset": 0, @@ -3624,7 +2881,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 35712, + "astId": 16142, "contract": "contracts/Market.sol:Market", "label": "nonces", "offset": 0, @@ -3632,39 +2889,39 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 15178, + "astId": 7382, "contract": "contracts/Market.sol:Market", "label": "fixedDepositPositions", "offset": 0, "slot": "207", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))" }, { - "astId": 15186, + "astId": 7390, "contract": "contracts/Market.sol:Market", "label": "fixedBorrowPositions", "offset": 0, "slot": "208", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))" }, { - "astId": 15192, + "astId": 7396, "contract": "contracts/Market.sol:Market", "label": "fixedPools", "offset": 0, "slot": "209", - "type": "t_mapping(t_uint256,t_struct(Pool)35048_storage)" + "type": "t_mapping(t_uint256,t_struct(Pool)15534_storage)" }, { - "astId": 15198, + "astId": 7402, "contract": "contracts/Market.sol:Market", "label": "accounts", "offset": 0, "slot": "210", - "type": "t_mapping(t_address,t_struct(Account)19124_storage)" + "type": "t_mapping(t_address,t_struct(Account)11401_storage)" }, { - "astId": 15201, + "astId": 7405, "contract": "contracts/Market.sol:Market", "label": "floatingBackupBorrowed", "offset": 0, @@ -3672,7 +2929,7 @@ "type": "t_uint256" }, { - "astId": 15204, + "astId": 7408, "contract": "contracts/Market.sol:Market", "label": "floatingDebt", "offset": 0, @@ -3680,7 +2937,7 @@ "type": "t_uint256" }, { - "astId": 15207, + "astId": 7411, "contract": "contracts/Market.sol:Market", "label": "earningsAccumulator", "offset": 0, @@ -3688,7 +2945,7 @@ "type": "t_uint256" }, { - "astId": 15210, + "astId": 7414, "contract": "contracts/Market.sol:Market", "label": "penaltyRate", "offset": 0, @@ -3696,7 +2953,7 @@ "type": "t_uint256" }, { - "astId": 15213, + "astId": 7417, "contract": "contracts/Market.sol:Market", "label": "backupFeeRate", "offset": 0, @@ -3704,7 +2961,7 @@ "type": "t_uint256" }, { - "astId": 15216, + "astId": 7420, "contract": "contracts/Market.sol:Market", "label": "dampSpeedUp", "offset": 0, @@ -3712,7 +2969,7 @@ "type": "t_uint256" }, { - "astId": 15219, + "astId": 7423, "contract": "contracts/Market.sol:Market", "label": "dampSpeedDown", "offset": 0, @@ -3720,7 +2977,7 @@ "type": "t_uint256" }, { - "astId": 15222, + "astId": 7426, "contract": "contracts/Market.sol:Market", "label": "maxFuturePools", "offset": 0, @@ -3728,7 +2985,7 @@ "type": "t_uint8" }, { - "astId": 15225, + "astId": 7429, "contract": "contracts/Market.sol:Market", "label": "lastAccumulatorAccrual", "offset": 1, @@ -3736,7 +2993,7 @@ "type": "t_uint32" }, { - "astId": 15228, + "astId": 7432, "contract": "contracts/Market.sol:Market", "label": "lastFloatingDebtUpdate", "offset": 5, @@ -3744,7 +3001,7 @@ "type": "t_uint32" }, { - "astId": 15231, + "astId": 7435, "contract": "contracts/Market.sol:Market", "label": "lastAverageUpdate", "offset": 9, @@ -3752,15 +3009,15 @@ "type": "t_uint32" }, { - "astId": 15235, + "astId": 7439, "contract": "contracts/Market.sol:Market", "label": "interestRateModel", "offset": 0, "slot": "219", - "type": "t_contract(InterestRateModel)15062" + "type": "t_contract(InterestRateModel)7266" }, { - "astId": 15238, + "astId": 7442, "contract": "contracts/Market.sol:Market", "label": "earningsAccumulatorSmoothFactor", "offset": 0, @@ -3768,7 +3025,7 @@ "type": "t_uint128" }, { - "astId": 15241, + "astId": 7445, "contract": "contracts/Market.sol:Market", "label": "reserveFactor", "offset": 16, @@ -3776,7 +3033,7 @@ "type": "t_uint128" }, { - "astId": 15244, + "astId": 7448, "contract": "contracts/Market.sol:Market", "label": "floatingAssets", "offset": 0, @@ -3784,7 +3041,7 @@ "type": "t_uint256" }, { - "astId": 15247, + "astId": 7451, "contract": "contracts/Market.sol:Market", "label": "floatingAssetsAverage", "offset": 0, @@ -3792,7 +3049,7 @@ "type": "t_uint256" }, { - "astId": 15250, + "astId": 7454, "contract": "contracts/Market.sol:Market", "label": "totalFloatingBorrowShares", "offset": 0, @@ -3800,7 +3057,7 @@ "type": "t_uint256" }, { - "astId": 15253, + "astId": 7457, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3808,7 +3065,7 @@ "type": "t_uint256" }, { - "astId": 15256, + "astId": 7460, "contract": "contracts/Market.sol:Market", "label": "treasury", "offset": 0, @@ -3816,7 +3073,7 @@ "type": "t_address" }, { - "astId": 15259, + "astId": 7463, "contract": "contracts/Market.sol:Market", "label": "treasuryFeeRate", "offset": 0, @@ -3824,15 +3081,15 @@ "type": "t_uint256" }, { - "astId": 15263, + "astId": 7467, "contract": "contracts/Market.sol:Market", "label": "rewardsController", "offset": 0, "slot": "227", - "type": "t_contract(RewardsController)23082" + "type": "t_contract(RewardsController)14682" }, { - "astId": 15266, + "astId": 7470, "contract": "contracts/Market.sol:Market", "label": "isFrozen", "offset": 20, @@ -3868,12 +3125,12 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(InterestRateModel)15062": { + "t_contract(InterestRateModel)7266": { "encoding": "inplace", "label": "contract InterestRateModel", "numberOfBytes": "20" }, - "t_contract(RewardsController)23082": { + "t_contract(RewardsController)14682": { "encoding": "inplace", "label": "contract RewardsController", "numberOfBytes": "20" @@ -3892,19 +3149,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_uint256)" }, - "t_mapping(t_address,t_struct(Account)19124_storage)": { + "t_mapping(t_address,t_struct(Account)11401_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct Market.Account)", "numberOfBytes": "32", - "value": "t_struct(Account)19124_storage" + "value": "t_struct(Account)11401_storage" }, - "t_mapping(t_address,t_struct(Position)35054_storage)": { + "t_mapping(t_address,t_struct(Position)15540_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct FixedLib.Position)", "numberOfBytes": "32", - "value": "t_struct(Position)35054_storage" + "value": "t_struct(Position)15540_storage" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -3920,31 +3177,31 @@ "numberOfBytes": "32", "value": "t_struct(RoleData)23_storage" }, - "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))": { + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => mapping(address => struct FixedLib.Position))", "numberOfBytes": "32", - "value": "t_mapping(t_address,t_struct(Position)35054_storage)" + "value": "t_mapping(t_address,t_struct(Position)15540_storage)" }, - "t_mapping(t_uint256,t_struct(Pool)35048_storage)": { + "t_mapping(t_uint256,t_struct(Pool)15534_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct FixedLib.Pool)", "numberOfBytes": "32", - "value": "t_struct(Pool)35048_storage" + "value": "t_struct(Pool)15534_storage" }, "t_string_storage": { "encoding": "bytes", "label": "string", "numberOfBytes": "32" }, - "t_struct(Account)19124_storage": { + "t_struct(Account)11401_storage": { "encoding": "inplace", "label": "struct Market.Account", "members": [ { - "astId": 19119, + "astId": 11396, "contract": "contracts/Market.sol:Market", "label": "fixedDeposits", "offset": 0, @@ -3952,7 +3209,7 @@ "type": "t_uint256" }, { - "astId": 19121, + "astId": 11398, "contract": "contracts/Market.sol:Market", "label": "fixedBorrows", "offset": 0, @@ -3960,7 +3217,7 @@ "type": "t_uint256" }, { - "astId": 19123, + "astId": 11400, "contract": "contracts/Market.sol:Market", "label": "floatingBorrowShares", "offset": 0, @@ -3970,12 +3227,12 @@ ], "numberOfBytes": "96" }, - "t_struct(Pool)35048_storage": { + "t_struct(Pool)15534_storage": { "encoding": "inplace", "label": "struct FixedLib.Pool", "members": [ { - "astId": 35041, + "astId": 15527, "contract": "contracts/Market.sol:Market", "label": "borrowed", "offset": 0, @@ -3983,7 +3240,7 @@ "type": "t_uint256" }, { - "astId": 35043, + "astId": 15529, "contract": "contracts/Market.sol:Market", "label": "supplied", "offset": 0, @@ -3991,7 +3248,7 @@ "type": "t_uint256" }, { - "astId": 35045, + "astId": 15531, "contract": "contracts/Market.sol:Market", "label": "unassignedEarnings", "offset": 0, @@ -3999,7 +3256,7 @@ "type": "t_uint256" }, { - "astId": 35047, + "astId": 15533, "contract": "contracts/Market.sol:Market", "label": "lastAccrual", "offset": 0, @@ -4009,12 +3266,12 @@ ], "numberOfBytes": "128" }, - "t_struct(Position)35054_storage": { + "t_struct(Position)15540_storage": { "encoding": "inplace", "label": "struct FixedLib.Position", "members": [ { - "astId": 35051, + "astId": 15537, "contract": "contracts/Market.sol:Market", "label": "principal", "offset": 0, @@ -4022,7 +3279,7 @@ "type": "t_uint256" }, { - "astId": 35053, + "astId": 15539, "contract": "contracts/Market.sol:Market", "label": "fee", "offset": 0, diff --git a/deployments/optimism/MarketUSDC.e.json b/deployments/optimism/MarketUSDC.e.json index 4cea75ea..dd5b14e8 100644 --- a/deployments/optimism/MarketUSDC.e.json +++ b/deployments/optimism/MarketUSDC.e.json @@ -2989,12 +2989,12 @@ "0xfBa759BCd1a99a7724c5068FEddb4F5b844b941A", "0x9f73066e00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000001bc16d674ec8000000000000000000000000000003859fa7549449a7dde7663e5c06a38c5b0d448900000000000000000000000000000000000000000000000000000035e55f1909000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000001057acf5f78000000000000000000000000000000000000000000000000000058d15e176280000" ], - "numDeployments": 7, + "numDeployments": 8, "solcInputHash": "85c8bc749730c336d6cf31aaa3d211b2", "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"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\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"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.\",\"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`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"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\":{\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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.5.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 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(\\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(\\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\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"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/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../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 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(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) 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 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 Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\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\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 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(\\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 (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\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 /// @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\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405260405162000b5038038062000b5083398101604081905262000026916200038b565b828162000036828260006200004d565b50620000449050826200008a565b50505062000489565b6200005883620000e5565b600082511180620000665750805b1562000085576200008383836200012760201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000b562000156565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e2816200018f565b50565b620000f081620001ed565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200014f838360405180606001604052806027815260200162000b296027913962000247565b9392505050565b60006200018060008051602062000b0983398151915260001b620002c660201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b038116620001a357600080fd5b80620001cc60008051602062000b0983398151915260001b620002c660201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200020381620002c960201b6200025a1760201c565b6200020d57600080fd5b80620001cc7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b620002c660201b620001ea1760201c565b6060600080856001600160a01b0316856040516200026691906200046b565b600060405180830381855af49150503d8060008114620002a3576040519150601f19603f3d011682016040523d82523d6000602084013e620002a8565b606091505b509092509050620002bc86838387620002d8565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200030857825160000362000300576001600160a01b0385163b6200030057600080fd5b508162000314565b6200031483836200031c565b949350505050565b8151156200032d5781518083602001fd5b600080fd5b80516001600160a01b03811681146200034a57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200038257818101518382015260200162000368565b50506000910152565b600080600060608486031215620003a157600080fd5b620003ac8462000332565b9250620003bc6020850162000332565b60408501519092506001600160401b0380821115620003da57600080fd5b818601915086601f830112620003ef57600080fd5b8151818111156200040457620004046200034f565b604051601f8201601f19908116603f011681019083821181831017156200042f576200042f6200034f565b816040528281528960208487010111156200044957600080fd5b6200045c83602083016020880162000365565b80955050505050509250925092565b600082516200047f81846020870162000365565b9190910192915050565b61067080620004996000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b610080366004610546565b610118565b61005b610093366004610561565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e4366004610546565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b610116610111610285565b61028f565b565b6101206102b3565b6001600160a01b0316330361014d5761014a816040518060200160405280600081525060006102e6565b50565b61014a6100fe565b61015d6102b3565b6001600160a01b031633036101b4576101af8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506102e6915050565b505050565b6101af6100fe565b60006101c66102b3565b6001600160a01b031633036101e2576101dd610285565b905090565b6101ea6100fe565b90565b6101f56102b3565b6001600160a01b0316330361014d5761014a81610311565b60006102176102b3565b6001600160a01b031633036101e2576101dd6102b3565b6060610253838360405180606001604052806027815260200161061460279139610365565b9392505050565b6001600160a01b03163b151590565b6102716102b3565b6001600160a01b0316330361011657600080fd5b60006101dd6103dd565b3660008037600080366000845af43d6000803e8080156102ae573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6102ef83610405565b6000825111806102fc5750805b156101af5761030b838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61033a6102b3565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610445565b6060600080856001600160a01b03168560405161038291906105e4565b600060405180830381855af49150503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091506103d38683838761049c565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6102d7565b61040e816104da565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661045857600080fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156104c85782516000036104c1576001600160a01b0385163b6104c157600080fd5b50816104d2565b6104d28383610515565b949350505050565b6001600160a01b0381163b6104ee57600080fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61047b565b8151156105255781518083602001fd5b600080fd5b80356001600160a01b038116811461054157600080fd5b919050565b60006020828403121561055857600080fd5b6102538261052a565b60008060006040848603121561057657600080fd5b61057f8461052a565b9250602084013567ffffffffffffffff8082111561059c57600080fd5b818601915086601f8301126105b057600080fd5b8135818111156105bf57600080fd5b8760208285010111156105d157600080fd5b6020830194508093505050509250925092565b6000825160005b8181101561060557602081860181015185830152016105eb565b50600092019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203011748945e626a6c7d6bd1969f4e5640e829c89504a5d4e52671d90f482851564736f6c63430008110033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b610080366004610546565b610118565b61005b610093366004610561565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e4366004610546565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b610116610111610285565b61028f565b565b6101206102b3565b6001600160a01b0316330361014d5761014a816040518060200160405280600081525060006102e6565b50565b61014a6100fe565b61015d6102b3565b6001600160a01b031633036101b4576101af8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506102e6915050565b505050565b6101af6100fe565b60006101c66102b3565b6001600160a01b031633036101e2576101dd610285565b905090565b6101ea6100fe565b90565b6101f56102b3565b6001600160a01b0316330361014d5761014a81610311565b60006102176102b3565b6001600160a01b031633036101e2576101dd6102b3565b6060610253838360405180606001604052806027815260200161061460279139610365565b9392505050565b6001600160a01b03163b151590565b6102716102b3565b6001600160a01b0316330361011657600080fd5b60006101dd6103dd565b3660008037600080366000845af43d6000803e8080156102ae573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6102ef83610405565b6000825111806102fc5750805b156101af5761030b838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61033a6102b3565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610445565b6060600080856001600160a01b03168560405161038291906105e4565b600060405180830381855af49150503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091506103d38683838761049c565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6102d7565b61040e816104da565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661045857600080fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156104c85782516000036104c1576001600160a01b0385163b6104c157600080fd5b50816104d2565b6104d28383610515565b949350505050565b6001600160a01b0381163b6104ee57600080fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61047b565b8151156105255781518083602001fd5b600080fd5b80356001600160a01b038116811461054157600080fd5b919050565b60006020828403121561055857600080fd5b6102538261052a565b60008060006040848603121561057657600080fd5b61057f8461052a565b9250602084013567ffffffffffffffff8082111561059c57600080fd5b818601915086601f8301126105b057600080fd5b8135818111156105bf57600080fd5b8760208285010111156105d157600080fd5b6020830194508093505050509250925092565b6000825160005b8181101561060557602081860181015185830152016105eb565b50600092019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203011748945e626a6c7d6bd1969f4e5640e829c89504a5d4e52671d90f482851564736f6c63430008110033", - "implementation": "0x6fC143C9e6b9DCBc4023cc1f7D87eedb419f8024", + "implementation": "0xCAA6136c4f85Bca3b309b28E559Fd3a27e0c40B3", "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.", "kind": "dev", diff --git a/deployments/optimism/MarketUSDC.e_Implementation.json b/deployments/optimism/MarketUSDC.e_Implementation.json index 29f4a7c8..b9e432c1 100644 --- a/deployments/optimism/MarketUSDC.e_Implementation.json +++ b/deployments/optimism/MarketUSDC.e_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x6fC143C9e6b9DCBc4023cc1f7D87eedb419f8024", + "address": "0xCAA6136c4f85Bca3b309b28E559Fd3a27e0c40B3", "abi": [ { "inputs": [ @@ -2736,32 +2736,32 @@ "type": "function" } ], - "transactionHash": "0x22b22f74479465b3e1ab70f6d0972ff9d7dc2e1ba61654c0a5aac17b33eca6fb", + "transactionHash": "0xf414fe2c908313815dd5b4ef0a6077370d3cf3b77c42b089cf85a1a19707de69", "receipt": { "to": null, "from": "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", - "contractAddress": "0x6fC143C9e6b9DCBc4023cc1f7D87eedb419f8024", - "transactionIndex": 13, - "gasUsed": "5366976", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000400000000000000000000000800000000040000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd9f20498a3426783e2244de83b96703c2b19bc9b6931eb36457d1f66b590ffae", - "transactionHash": "0x22b22f74479465b3e1ab70f6d0972ff9d7dc2e1ba61654c0a5aac17b33eca6fb", + "contractAddress": "0xCAA6136c4f85Bca3b309b28E559Fd3a27e0c40B3", + "transactionIndex": 16, + "gasUsed": "5411813", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000", + "blockHash": "0x57fffff8944ee79ead5fdcf8f0b4b340106355043f7abedf04e3f18a9436c856", + "transactionHash": "0xf414fe2c908313815dd5b4ef0a6077370d3cf3b77c42b089cf85a1a19707de69", "logs": [ { - "transactionIndex": 13, - "blockNumber": 118840369, - "transactionHash": "0x22b22f74479465b3e1ab70f6d0972ff9d7dc2e1ba61654c0a5aac17b33eca6fb", - "address": "0x6fC143C9e6b9DCBc4023cc1f7D87eedb419f8024", + "transactionIndex": 16, + "blockNumber": 124901222, + "transactionHash": "0xf414fe2c908313815dd5b4ef0a6077370d3cf3b77c42b089cf85a1a19707de69", + "address": "0xCAA6136c4f85Bca3b309b28E559Fd3a27e0c40B3", "topics": [ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" ], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 65, - "blockHash": "0xd9f20498a3426783e2244de83b96703c2b19bc9b6931eb36457d1f66b590ffae" + "logIndex": 85, + "blockHash": "0x57fffff8944ee79ead5fdcf8f0b4b340106355043f7abedf04e3f18a9436c856" } ], - "blockNumber": 118840369, - "cumulativeGasUsed": "9111843", + "blockNumber": 124901222, + "cumulativeGasUsed": "9187973", "status": 1, "byzantium": true }, @@ -2769,758 +2769,15 @@ "0x7F5c764cBc14f9669B88837ca1490cCa17c31607", "0xaEb62e6F27BC103702E7BC879AE98bceA56f027E" ], - "numDeployments": 7, - "solcInputHash": "e3ac7af802d0124bd24cbb337b6ddc93", - "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"contract Auditor\",\"name\":\"auditor_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Disagreement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientProtocolLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketFrozen\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaturityOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAuditor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPausingRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SelfLiquidation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolState\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"alternativeState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolStates\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBorrow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRepay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWithdraw\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AccumulatorAccrual\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"backupFeeRate\",\"type\":\"uint256\"}],\"name\":\"BackupFeeRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"BorrowAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedUp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedDown\",\"type\":\"uint256\"}],\"name\":\"DampSpeedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"DepositAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulatorSmoothFactor\",\"type\":\"uint256\"}],\"name\":\"EarningsAccumulatorSmoothFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"}],\"name\":\"FixedEarningsUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilization\",\"type\":\"uint256\"}],\"name\":\"FloatingDebtUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isFrozen\",\"type\":\"bool\"}],\"name\":\"Frozen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel\",\"type\":\"address\"}],\"name\":\"InterestRateModelSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lendersAssets\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizedAssets\",\"type\":\"uint256\"}],\"name\":\"Liquidate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDepositShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDebt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulator\",\"type\":\"uint256\"}],\"name\":\"MarketUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxFuturePools\",\"type\":\"uint256\"}],\"name\":\"MaxFuturePoolsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyRate\",\"type\":\"uint256\"}],\"name\":\"PenaltyRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Repay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"name\":\"RepayAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveFactor\",\"type\":\"uint256\"}],\"name\":\"ReserveFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController\",\"type\":\"address\"}],\"name\":\"RewardsControllerSet\",\"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\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"SpreadBadDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate\",\"type\":\"uint256\"}],\"name\":\"TreasurySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"WithdrawAtMaturity\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EMERGENCY_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"accountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fixedDeposits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fixedBorrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auditor\",\"outputs\":[{\"internalType\":\"contract Auditor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"backupFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrowAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsOwed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"clearBadDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"depositAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulatorSmoothFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedBorrowPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedDepositPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"fixedPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplied\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastAccrual\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingBackupBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"maxFuturePools_\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedUp_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedDown_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAccumulatorAccrual\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAverageUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFloatingDebtUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxFuturePools\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"previewDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"debt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewFloatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRefund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewRepay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repayAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepayAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsController\",\"outputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"}],\"name\":\"setAssetSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setBackupFeeRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"up\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"down\",\"type\":\"uint256\"}],\"name\":\"setDampSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"}],\"name\":\"setEarningsAccumulatorSmoothFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isFrozen_\",\"type\":\"bool\"}],\"name\":\"setFrozen\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"futurePools\",\"type\":\"uint8\"}],\"name\":\"setMaxFuturePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"}],\"name\":\"setReserveFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController_\",\"type\":\"address\"}],\"name\":\"setRewardsController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setTreasury\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasuryFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsDiscounted\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\"}},\"BackupFeeRateSet(uint256)\":{\"params\":{\"backupFeeRate\":\"rate charged to the fixed pools to be accrued by the floating depositors.\"}},\"Borrow(address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"receiver\":\"address that received the borrowed assets.\",\"shares\":\"amount of borrow shares assigned to the account.\"}},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"fee\":\"extra amount that will need to be paid at maturity.\",\"maturity\":\"maturity in which the account will have to repay the loan.\",\"receiver\":\"address that received the borrowed assets.\"}},\"DampSpeedSet(uint256,uint256)\":{\"params\":{\"dampSpeedDown\":\"represented with 18 decimals.\",\"dampSpeedUp\":\"represented with 18 decimals.\"}},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were deposited.\",\"caller\":\"address which deposited the assets.\",\"fee\":\"is the extra amount that it will be collected at maturity.\",\"maturity\":\"maturity at which the account will be able to collect his deposit + his fee.\",\"owner\":\"address that will be able to withdraw the deposited assets.\"}},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"params\":{\"earningsAccumulatorSmoothFactor\":\"factor represented with 18 decimals.\"}},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"params\":{\"maturity\":\"maturity date where the earnings were updated.\",\"timestamp\":\"current timestamp.\",\"unassignedEarnings\":\"pending unassigned earnings.\"}},\"FloatingDebtUpdate(uint256,uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\",\"utilization\":\"new floating utilization.\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InterestRateModelSet(address)\":{\"params\":{\"interestRateModel\":\"new interest rate model to be used to calculate rates.\"}},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were repaid.\",\"borrower\":\"address which had the original debt.\",\"lendersAssets\":\"incentive paid to lenders.\",\"receiver\":\"address which repaid the previously borrowed amount.\",\"seizeMarket\":\"address of the asset that were seized by the liquidator.\",\"seizedAssets\":\"amount seized of the collateral.\"}},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"earningsAccumulator\":\"earnings accumulator.\",\"floatingAssets\":\"total floating supply assets.\",\"floatingBorrowShares\":\"total floating borrow shares.\",\"floatingDebt\":\"total floating borrow assets.\",\"floatingDepositShares\":\"total floating supply shares.\",\"timestamp\":\"current timestamp.\"}},\"MaxFuturePoolsSet(uint256)\":{\"params\":{\"maxFuturePools\":\"represented with 0 decimals.\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PenaltyRateSet(uint256)\":{\"params\":{\"penaltyRate\":\"penaltyRate percentage per second represented with 18 decimals.\"}},\"Repay(address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"shares\":\"amount of borrow shares that were subtracted from the account's accountability.\"}},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"maturity\":\"maturity where the account repaid its borrowed amounts.\",\"positionAssets\":\"amount of the debt that was covered in this repayment (penalties could have been repaid).\"}},\"ReserveFactorSet(uint256)\":{\"params\":{\"reserveFactor\":\"reserveFactor percentage.\"}},\"RewardsControllerSet(address)\":{\"params\":{\"rewardsController\":\"new rewards controller to update account rewards when operating with the Market.\"}},\"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`)\"},\"Seize(address,address,uint256)\":{\"params\":{\"assets\":\"amount seized of the collateral.\",\"borrower\":\"address which had the original debt.\",\"liquidator\":\"address which seized this collateral.\"}},\"SpreadBadDebt(address,uint256)\":{\"params\":{\"assets\":\"amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\",\"borrower\":\"address which was cleared from bad debt.\"}},\"TreasurySet(address,uint256)\":{\"params\":{\"treasury\":\"address of the treasury that will receive the minted eTokens.\",\"treasuryFeeRate\":\"represented with 18 decimals.\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets withdrawn (can include a discount for early withdraw).\",\"caller\":\"address which withdraw the asset.\",\"maturity\":\"maturity where the account withdraw its deposits.\",\"owner\":\"address which had the assets withdrawn.\",\"positionAssets\":\"position size reduced.\",\"receiver\":\"address which will be collecting the assets.\"}}},\"kind\":\"dev\",\"methods\":{\"accountSnapshot(address)\":{\"params\":{\"account\":\"account to return status snapshot in the specified maturity date.\"},\"returns\":{\"_0\":\"the amount deposited to the floating pool and the amount owed to floating and fixed pools.\"}},\"borrow(uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"borrowShares\":\"shares corresponding to the borrowed assets.\"}},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"maturity\":\"maturity date for repayment.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"assetsOwed\":\"total amount of assets (principal + fee) to be repaid at maturity.\"}},\"clearBadDebt(address)\":{\"details\":\"Can only be called from the auditor.\",\"params\":{\"borrower\":\"account with insufficient collateral to be cleared the debt.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"assets\":\"amount to receive from the msg.sender.\",\"maturity\":\"maturity date where the assets will be deposited.\",\"minAssetsRequired\":\"minimum amount of assets required by the depositor for the transaction to be accepted.\",\"receiver\":\"address that will be able to withdraw the deposited assets.\"},\"returns\":{\"positionAssets\":\"total amount of assets (principal + fee) to be withdrawn at maturity.\"}},\"fixedPoolBalance(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed and supplied amount of the fixed pool.\"}},\"fixedPoolBorrowed(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed amount of the fixed pool.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"details\":\"can only be called once.\"},\"liquidate(address,uint256,address)\":{\"details\":\"Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.\",\"params\":{\"borrower\":\"account that has an outstanding debt across floating or fixed pools.\",\"maxAssets\":\"maximum amount of debt that the liquidator is willing to accept. (it can be less)\",\"seizeMarket\":\"market from which the collateral will be seized to give to the liquidator.\"},\"returns\":{\"repaidAssets\":\"actual amount repaid.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"previewBorrow(uint256)\":{\"params\":{\"assets\":\"amount of assets to borrow.\"},\"returns\":{\"_0\":\"amount of shares that will be asigned to the account after the borrow.\"}},\"previewDebt(address)\":{\"params\":{\"borrower\":\"account to return status snapshot for fixed and floating borrows.\"},\"returns\":{\"debt\":\"the total debt, denominated in number of assets.\"}},\"previewFloatingAssetsAverage()\":{\"returns\":{\"_0\":\"projected `floatingAssetsAverage`.\"}},\"previewRefund(uint256)\":{\"params\":{\"shares\":\"amount of shares to subtract from caller's accountability.\"},\"returns\":{\"_0\":\"amount of assets that will be repaid.\"}},\"previewRepay(uint256)\":{\"params\":{\"assets\":\"amount of assets to repay.\"},\"returns\":{\"_0\":\"amount of shares that will be subtracted from the account after the repay.\"}},\"redeem(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\",\"shares\":\"amount of shares to be redeemed for underlying asset.\"},\"returns\":{\"assets\":\"amount of underlying asset that was withdrawn.\"}},\"refund(uint256,address)\":{\"params\":{\"borrowShares\":\"shares to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualShares\":\"actual subtracted shares from the borrower's accountability.\",\"assets\":\"subtracted assets from the borrower's accountability.\"}},\"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.\"},\"repay(uint256,address)\":{\"params\":{\"assets\":\"assets to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualRepay\":\"the actual amount that should be transferred into the protocol.\",\"borrowShares\":\"subtracted shares from the borrower's accountability.\"}},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"borrower\":\"address of the account that has the debt.\",\"maturity\":\"maturity date where the assets will be repaid.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept to be repaid.\",\"positionAssets\":\"amount to be paid for the borrower's debt.\"},\"returns\":{\"actualRepayAssets\":\"the actual amount that was transferred into the protocol.\"}},\"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.\"},\"seize(address,address,uint256)\":{\"details\":\"Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\",\"params\":{\"assets\":\"amount to be removed from borrower's possession.\",\"borrower\":\"address from which the assets will be seized.\",\"liquidator\":\"address which will receive the seized assets.\"}},\"setAssetSymbol(string)\":{\"params\":{\"assetSymbol\":\"the symbol for the underlying asset.\"}},\"setBackupFeeRate(uint256)\":{\"params\":{\"backupFeeRate_\":\"percentage amount represented with 18 decimals.\"}},\"setDampSpeed(uint256,uint256)\":{\"params\":{\"down\":\"damp speed down, represented with 18 decimals.\",\"up\":\"damp speed up, represented with 18 decimals.\"}},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"params\":{\"earningsAccumulatorSmoothFactor_\":\"represented with 18 decimals.\"}},\"setInterestRateModel(address)\":{\"params\":{\"interestRateModel_\":\"new interest rate model.\"}},\"setMaxFuturePools(uint8)\":{\"details\":\"If value is decreased, VALID maturities will become NOT_READY.\",\"params\":{\"futurePools\":\"number of pools to be active at the same time.\"}},\"setPenaltyRate(uint256)\":{\"params\":{\"penaltyRate_\":\"percentage represented with 18 decimals.\"}},\"setReserveFactor(uint128)\":{\"params\":{\"reserveFactor_\":\"parameter represented with 18 decimals.\"}},\"setRewardsController(address)\":{\"params\":{\"rewardsController_\":\"new rewards controller.\"}},\"setTreasury(address,uint256)\":{\"params\":{\"treasuryFeeRate_\":\"represented with 18 decimals.\",\"treasury_\":\"address of the treasury that will receive the minted eTokens.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalAssets()\":{\"returns\":{\"_0\":\"actual floatingAssets plus earnings to be accrued at current timestamp.\"}},\"totalFloatingBorrowAssets()\":{\"returns\":{\"_0\":\"actual floating debt plus projected interest.\"}},\"transfer(address,uint256)\":{\"details\":\"Makes sure that the caller doesn't have shortfall after transferring.\",\"params\":{\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Makes sure that `from` address doesn't have shortfall after transferring.\",\"params\":{\"from\":\"address from which the assets will be transferred.\",\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"withdraw(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"assets\":\"amount of underlying to be withdrawn.\",\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\"},\"returns\":{\"shares\":\"amount of shares redeemed for underlying asset.\"}},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"maturity\":\"maturity date where the assets will be withdrawn.\",\"minAssetsRequired\":\"minimum amount required by the account (if discount included for early withdrawal).\",\"owner\":\"address that previously deposited the assets.\",\"positionAssets\":\"position size to be reduced.\",\"receiver\":\"address that will receive the withdrawn assets.\"},\"returns\":{\"assetsDiscounted\":\"amount of assets withdrawn (can include a discount for early withdraw).\"}}},\"stateVariables\":{\"__gap\":{\"custom:oz-renamed-from\":\"floatingUtilization\",\"details\":\"gap from deprecated state.\"},\"auditor\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"notice\":\"Emitted when accumulator distributes earnings.\"},\"BackupFeeRateSet(uint256)\":{\"notice\":\"Emitted when the backupFeeRate parameter is changed by admin.\"},\"Borrow(address,address,address,uint256,uint256)\":{\"notice\":\"Event emitted when an account borrows amount of assets from a floating pool.\"},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account borrows amount of an asset from a certain maturity date.\"},\"DampSpeedSet(uint256,uint256)\":{\"notice\":\"Emitted when the damp speeds are changed by admin.\"},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period.\"},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"notice\":\"Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\"},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"notice\":\"Emitted when the earnings of a maturity are updated.\"},\"FloatingDebtUpdate(uint256,uint256)\":{\"notice\":\"Emitted when the floating debt is updated.\"},\"Frozen(address,bool)\":{\"notice\":\"Emitted when `account` sets the `isFrozen` flag.\"},\"InterestRateModelSet(address)\":{\"notice\":\"Emitted when the interestRateModel is changed by admin.\"},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"notice\":\"Emitted when an account's position had a liquidation.\"},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when market state is updated.\"},\"MaxFuturePoolsSet(uint256)\":{\"notice\":\"Emitted when the maxFuturePools is changed by admin.\"},\"PenaltyRateSet(uint256)\":{\"notice\":\"Emitted when the penaltyRate is changed by admin.\"},\"Repay(address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays amount of assets to a floating pool.\"},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays its borrows after maturity.\"},\"ReserveFactorSet(uint256)\":{\"notice\":\"Emitted when the reserveFactor is changed by admin.\"},\"RewardsControllerSet(address)\":{\"notice\":\"Emitted when the rewardsController is changed by admin.\"},\"Seize(address,address,uint256)\":{\"notice\":\"Emitted when an account's collateral has been seized.\"},\"SpreadBadDebt(address,uint256)\":{\"notice\":\"Emitted when an account is cleared from bad debt.\"},\"TreasurySet(address,uint256)\":{\"notice\":\"Emitted when the treasury variables are changed by admin.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account withdraws from a fixed rate pool.\"}},\"kind\":\"user\",\"methods\":{\"accountSnapshot(address)\":{\"notice\":\"Gets current snapshot for an account across all maturities.\"},\"accounts(address)\":{\"notice\":\"Tracks fixed deposit and borrow map and floating borrow shares of an account.\"},\"backupFeeRate()\":{\"notice\":\"Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\"},\"borrow(uint256,address,address)\":{\"notice\":\"Borrows a certain amount from the floating pool.\"},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Borrows a certain amount from a maturity.\"},\"clearBadDebt(address)\":{\"notice\":\"Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\"},\"dampSpeedDown()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\"},\"dampSpeedUp()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Deposits a certain amount to a maturity.\"},\"earningsAccumulator()\":{\"notice\":\"Accumulated earnings from extraordinary sources to be gradually distributed.\"},\"earningsAccumulatorSmoothFactor()\":{\"notice\":\"Factor used for gradual accrual of earnings to the floating pool.\"},\"fixedBorrowPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed borrow positions by maturity, account and position.\"},\"fixedDepositPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed deposit positions by maturity, account and position.\"},\"fixedPoolBalance(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed and supplied amount.\"},\"fixedPoolBorrowed(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed amount.\"},\"fixedPools(uint256)\":{\"notice\":\"Tracks fixed pools state by maturity.\"},\"floatingAssets()\":{\"notice\":\"Amount of floating assets deposited to the pool.\"},\"floatingAssetsAverage()\":{\"notice\":\"Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\"},\"floatingBackupBorrowed()\":{\"notice\":\"Amount of assets lent by the floating pool to the fixed pools.\"},\"floatingDebt()\":{\"notice\":\"Amount of assets lent by the floating pool to accounts.\"},\"initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"notice\":\"Initializes the contract.\"},\"interestRateModel()\":{\"notice\":\"Interest rate model contract used to get the borrow rates.\"},\"isFrozen()\":{\"notice\":\"Flag to prevent new borrows and deposits.\"},\"lastAccumulatorAccrual()\":{\"notice\":\"Last time the accumulator distributed earnings.\"},\"lastAverageUpdate()\":{\"notice\":\"Last time the floating assets average was updated.\"},\"lastFloatingDebtUpdate()\":{\"notice\":\"Last time the floating debt was updated.\"},\"liquidate(address,uint256,address)\":{\"notice\":\"Liquidates undercollateralized fixed/floating (or both) position(s).\"},\"maxFuturePools()\":{\"notice\":\"Number of fixed pools to be active at the same time.\"},\"pause()\":{\"notice\":\"Sets the pause state to true in case of emergency, triggered by an authorized account.\"},\"penaltyRate()\":{\"notice\":\"Rate per second to be charged to delayed fixed pools borrowers after maturity.\"},\"previewBorrow(uint256)\":{\"notice\":\"Simulates the effects of a borrow at the current time, given current contract conditions.\"},\"previewDebt(address)\":{\"notice\":\"Gets all borrows and penalties for an account.\"},\"previewFloatingAssetsAverage()\":{\"notice\":\"Returns the current `floatingAssetsAverage` without updating the storage variable.\"},\"previewRefund(uint256)\":{\"notice\":\"Simulates the effects of a refund at the current time, given current contract conditions.\"},\"previewRepay(uint256)\":{\"notice\":\"Simulates the effects of a repay at the current time, given current contract conditions.\"},\"redeem(uint256,address,address)\":{\"notice\":\"Redeems the owner's floating pool assets to the receiver address.\"},\"refund(uint256,address)\":{\"notice\":\"Repays a certain amount of shares to the floating pool.\"},\"repay(uint256,address)\":{\"notice\":\"Repays a certain amount of assets to the floating pool.\"},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Repays a certain amount to a maturity.\"},\"reserveFactor()\":{\"notice\":\"Percentage factor that represents the liquidity reserves that can't be borrowed.\"},\"rewardsController()\":{\"notice\":\"Address of the rewards controller that will accrue rewards for accounts operating with the Market.\"},\"seize(address,address,uint256)\":{\"notice\":\"Public function to seize a certain amount of assets.\"},\"setAssetSymbol(string)\":{\"notice\":\"Sets name and symbol for the Market.\"},\"setBackupFeeRate(uint256)\":{\"notice\":\"Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity.\"},\"setDampSpeed(uint256,uint256)\":{\"notice\":\"Sets the damp speed used to update the floatingAssetsAverage.\"},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"notice\":\"Sets the factor used when smoothly accruing earnings to the floating pool.\"},\"setFrozen(bool)\":{\"notice\":\"Sets `isFrozen` state, triggered by an authorized account.\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model to be used to calculate rates.\"},\"setMaxFuturePools(uint8)\":{\"notice\":\"Sets the protocol's max future pools for fixed borrowing and lending.\"},\"setPenaltyRate(uint256)\":{\"notice\":\"Sets the penalty rate per second.\"},\"setReserveFactor(uint128)\":{\"notice\":\"Sets the percentage that represents the liquidity reserves that can't be borrowed.\"},\"setRewardsController(address)\":{\"notice\":\"Sets the rewards controller to update account rewards when operating with the Market.\"},\"setTreasury(address,uint256)\":{\"notice\":\"Sets the treasury variables.\"},\"totalAssets()\":{\"notice\":\"Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator.\"},\"totalFloatingBorrowAssets()\":{\"notice\":\"Calculates the total floating debt, considering elapsed time since last update and current interest rate.\"},\"totalFloatingBorrowShares()\":{\"notice\":\"Total amount of floating borrow shares assigned to floating borrow accounts.\"},\"transfer(address,uint256)\":{\"notice\":\"Moves amount of shares from the caller's account to `to`.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Moves amount of shares from `from` to `to` using the allowance mechanism.\"},\"treasury()\":{\"notice\":\"Address of the treasury that will receive the allocated earnings.\"},\"treasuryFeeRate()\":{\"notice\":\"Rate to be charged by the treasury to floating and fixed borrows.\"},\"unpause()\":{\"notice\":\"Sets the pause state to false when threat is gone, triggered by an authorized account.\"},\"withdraw(uint256,address,address)\":{\"notice\":\"Withdraws the owner's floating pool assets to the receiver address.\"},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Withdraws a certain amount from a maturity.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Market.sol\":\"Market\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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 {Initializable} from \\\"../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 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 function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_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(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\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"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/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\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\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"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 (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport {Initializable} from \\\"../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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\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\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"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 {Initializable} from \\\"../../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\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"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/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\"},\"contracts/Auditor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract Auditor is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n\\n /// @notice Address that a market should have as price feed to consider as base price and avoid external price call.\\n address public constant BASE_FEED = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n /// @notice Target health factor that the account should have after it's liquidated to prevent cascade liquidations.\\n uint256 public constant TARGET_HEALTH = 1.25e18;\\n /// @notice Maximum value the liquidator can send and still have granular control of max assets.\\n /// Above this threshold, they should send `type(uint256).max`.\\n uint256 public constant ASSETS_THRESHOLD = type(uint256).max / 1e18;\\n\\n /// @notice Decimals that the answer of all price feeds should have.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 public immutable priceDecimals;\\n /// @notice Base factor to scale the price returned by the feed to 18 decimals.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable baseFactor;\\n /// @notice Base price used if the feed to fetch the price from is `BASE_FEED`.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable basePrice;\\n\\n /// @notice Tracks the markets' indexes that an account has entered as collateral.\\n mapping(address => uint256) public accountMarkets;\\n /// @notice Stores market parameters per each enabled market.\\n mapping(Market => MarketData) public markets;\\n /// @notice Array of all enabled markets.\\n Market[] public marketList;\\n\\n /// @notice Liquidation incentive factors for the liquidator and the lenders of the market where the debt is repaid.\\n LiquidationIncentive public liquidationIncentive;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(uint256 priceDecimals_) {\\n priceDecimals = priceDecimals_;\\n baseFactor = 10 ** (18 - priceDecimals_);\\n basePrice = 10 ** priceDecimals_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(LiquidationIncentive memory liquidationIncentive_) external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setLiquidationIncentive(liquidationIncentive_);\\n }\\n\\n /// @notice Allows assets of a certain market to be used as collateral for borrowing other assets.\\n /// @param market market to enabled as collateral.\\n function enterMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) != 0) return;\\n accountMarkets[msg.sender] = marketMap | marketMask;\\n\\n emit MarketEntered(market, msg.sender);\\n }\\n\\n /// @notice Removes market from sender's account liquidity calculation.\\n /// @dev Sender must not have an outstanding borrow balance in the asset, or be providing necessary collateral\\n /// for an outstanding borrow.\\n /// @param market market to be disabled as collateral.\\n function exitMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n (uint256 assets, uint256 debt) = market.accountSnapshot(msg.sender);\\n\\n // fail if the sender has a borrow balance\\n if (debt != 0) revert RemainingDebt();\\n\\n // fail if the sender is not permitted to redeem all of their assets\\n checkShortfall(market, msg.sender, assets);\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) == 0) return;\\n accountMarkets[msg.sender] = marketMap & ~marketMask;\\n\\n emit MarketExited(market, msg.sender);\\n }\\n\\n /// @notice Returns account's liquidity calculation.\\n /// @param account account in which the liquidity will be calculated.\\n /// @param marketToSimulate market in which to simulate withdraw operation.\\n /// @param withdrawAmount amount to simulate as withdraw.\\n /// @return sumCollateral sum of all collateral, already multiplied by each adjust factor (denominated in base).\\n /// @return sumDebtPlusEffects sum of all debt divided by adjust factor considering withdrawal (denominated in base).\\n function accountLiquidity(\\n address account,\\n Market marketToSimulate,\\n uint256 withdrawAmount\\n ) public view returns (uint256 sumCollateral, uint256 sumDebtPlusEffects) {\\n AccountLiquidity memory vars; // holds all our calculation results\\n\\n // for each asset the account is in\\n uint256 marketMap = accountMarkets[account];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 baseUnit = 10 ** m.decimals;\\n uint256 adjustFactor = m.adjustFactor;\\n\\n // read the balances\\n (vars.balance, vars.borrowBalance) = market.accountSnapshot(account);\\n\\n // get the normalized price of the asset (18 decimals)\\n vars.price = assetPrice(m.priceFeed);\\n\\n // sum all the collateral prices\\n sumCollateral += vars.balance.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n\\n // sum all the debt\\n sumDebtPlusEffects += vars.borrowBalance.mulDivUp(vars.price, baseUnit).divWadUp(adjustFactor);\\n\\n // simulate the effects of withdrawing from a pool\\n if (market == marketToSimulate) {\\n // calculate the effects of redeeming markets\\n // (having less collateral is the same as having more debt for this calculation)\\n if (withdrawAmount != 0) {\\n sumDebtPlusEffects += withdrawAmount.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n }\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Validates that the current state of the position and system are valid.\\n /// @dev To be called after adding the borrowed debt to the account position.\\n /// @param market address of the market where the borrow is made.\\n /// @param borrower address of the account that will repay the debt.\\n function checkBorrow(Market market, address borrower) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[borrower];\\n uint256 marketMask = 1 << m.index;\\n\\n // validate borrow state\\n if ((marketMap & marketMask) == 0) {\\n // only markets may call checkBorrow if borrower not in market\\n if (msg.sender != address(market)) revert NotMarket();\\n\\n accountMarkets[borrower] = marketMap | marketMask;\\n emit MarketEntered(market, borrower);\\n }\\n\\n // verify that current liquidity is not short\\n (uint256 collateral, uint256 debt) = accountLiquidity(borrower, Market(address(0)), 0);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Checks if the account has liquidity shortfall.\\n /// @param market address of the market where the operation will happen.\\n /// @param account address of the account to check for possible shortfall.\\n /// @param amount amount that the account wants to withdraw or transfer.\\n function checkShortfall(Market market, address account, uint256 amount) public view {\\n // if the account is not 'in' the market, bypass the liquidity check\\n if ((accountMarkets[account] & (1 << markets[market].index)) == 0) return;\\n\\n // otherwise, perform a hypothetical liquidity check to guard against shortfall\\n (uint256 collateral, uint256 debt) = accountLiquidity(account, market, amount);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Allows/rejects liquidation of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt is being repaid.\\n /// @param seizeMarket market from where the liquidator will seize assets.\\n /// @param borrower address in which the assets are being liquidated.\\n /// @param maxLiquidatorAssets maximum amount of debt the liquidator is willing to accept.\\n /// @return maxRepayAssets capped amount of debt the liquidator is allowed to repay.\\n function checkLiquidation(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 maxLiquidatorAssets\\n ) external view returns (uint256 maxRepayAssets) {\\n // if markets are listed, they have the same auditor\\n if (!markets[repayMarket].isListed || !markets[seizeMarket].isListed) revert MarketNotListed();\\n\\n MarketVars memory repay;\\n LiquidityVars memory base;\\n uint256 marketMap = accountMarkets[borrower];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage marketData = markets[market];\\n MarketVars memory m = MarketVars({\\n price: assetPrice(marketData.priceFeed),\\n adjustFactor: marketData.adjustFactor,\\n baseUnit: 10 ** marketData.decimals\\n });\\n\\n if (market == repayMarket) repay = m;\\n\\n (uint256 collateral, uint256 debt) = market.accountSnapshot(borrower);\\n\\n uint256 value = debt.mulDivUp(m.price, m.baseUnit);\\n base.totalDebt += value;\\n base.adjustedDebt += value.divWadUp(m.adjustFactor);\\n\\n value = collateral.mulDivDown(m.price, m.baseUnit);\\n base.totalCollateral += value;\\n base.adjustedCollateral += value.mulWadDown(m.adjustFactor);\\n if (market == seizeMarket) base.seizeAvailable = value;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (base.adjustedCollateral >= base.adjustedDebt) revert InsufficientShortfall();\\n\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n uint256 adjustFactor = base.adjustedCollateral.mulWadDown(base.totalDebt).divWadUp(\\n base.adjustedDebt.mulWadUp(base.totalCollateral)\\n );\\n uint256 closeFactor = (TARGET_HEALTH - base.adjustedCollateral.divWadUp(base.adjustedDebt)).divWadUp(\\n TARGET_HEALTH - adjustFactor.mulWadDown(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n );\\n maxRepayAssets = Math.min(\\n Math\\n .min(\\n base.totalDebt.mulWadUp(Math.min(1e18, closeFactor)),\\n base.seizeAvailable.divWadUp(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n )\\n .mulDivUp(repay.baseUnit, repay.price),\\n maxLiquidatorAssets < ASSETS_THRESHOLD\\n ? maxLiquidatorAssets.divWadDown(1e18 + memIncentive.lenders)\\n : maxLiquidatorAssets\\n );\\n }\\n\\n /// @notice Allow/rejects seizing of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market where the assets will be seized.\\n function checkSeize(Market repayMarket, Market seizeMarket) external view {\\n // if markets are listed, they also point to the same Auditor\\n if (!markets[seizeMarket].isListed || !markets[repayMarket].isListed) revert MarketNotListed();\\n }\\n\\n /// @notice Calculates the amount of collateral to be seized when a position is undercollateralized.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market from where the assets will be seized by the liquidator.\\n /// @param borrower account in which assets are being seized.\\n /// @param actualRepayAssets amount being repaid.\\n /// @return lendersAssets amount to be added for other lenders as a compensation of bad debt clearing.\\n /// @return seizeAssets amount that can be seized by the liquidator.\\n function calculateSeize(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 actualRepayAssets\\n ) external view returns (uint256 lendersAssets, uint256 seizeAssets) {\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n lendersAssets = actualRepayAssets.mulWadDown(memIncentive.lenders);\\n\\n // read prices for borrowed and collateral markets\\n uint256 priceBorrowed = assetPrice(markets[repayMarket].priceFeed);\\n uint256 priceCollateral = assetPrice(markets[seizeMarket].priceFeed);\\n uint256 baseAmount = actualRepayAssets.mulDivUp(priceBorrowed, 10 ** markets[repayMarket].decimals);\\n\\n seizeAssets = Math.min(\\n baseAmount.mulDivUp(10 ** markets[seizeMarket].decimals, priceCollateral).mulWadUp(\\n 1e18 + memIncentive.liquidator + memIncentive.lenders\\n ),\\n seizeMarket.maxWithdraw(borrower)\\n );\\n }\\n\\n /// @notice Checks if account has debt with no collateral, if so then call `clearBadDebt` from each market.\\n /// @dev Collateral is multiplied by price and adjust factor to be accurately evaluated as positive collateral asset.\\n /// @param account account in which debt is being checked.\\n function handleBadDebt(address account) external {\\n uint256 memMarketMap = accountMarkets[account];\\n uint256 marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 assets = market.maxWithdraw(account);\\n if (assets.mulDivDown(assetPrice(m.priceFeed), 10 ** m.decimals).mulWadDown(m.adjustFactor) > 0) return;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) marketList[i].clearBadDebt(account);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the asset price of a price feed.\\n /// @dev If Chainlink's asset price is <= 0 the call is reverted.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price.\\n /// @return The price of the asset scaled to 18-digit decimals.\\n function assetPrice(IPriceFeed priceFeed) public view returns (uint256) {\\n if (address(priceFeed) == BASE_FEED) return basePrice;\\n\\n int256 price = priceFeed.latestAnswer();\\n if (price <= 0) revert InvalidPrice();\\n return uint256(price) * baseFactor;\\n }\\n\\n /// @notice Retrieves all markets.\\n function allMarkets() external view returns (Market[] memory) {\\n return marketList;\\n }\\n\\n /// @notice Enables a certain market.\\n /// @dev Enabling more than 256 markets will cause an overflow when casting market index to uint8.\\n /// @param market market to add to the protocol.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n /// @param adjustFactor market's adjust factor for the underlying asset.\\n function enableMarket(\\n Market market,\\n IPriceFeed priceFeed,\\n uint128 adjustFactor\\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (market.auditor() != this) revert AuditorMismatch();\\n if (markets[market].isListed) revert MarketAlreadyListed();\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n\\n uint8 decimals = market.decimals();\\n markets[market] = MarketData({\\n isListed: true,\\n adjustFactor: adjustFactor,\\n decimals: decimals,\\n index: uint8(marketList.length),\\n priceFeed: priceFeed\\n });\\n\\n marketList.push(market);\\n\\n emit MarketListed(market, decimals);\\n emit PriceFeedSet(market, priceFeed);\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the adjust factor for a certain market.\\n /// @param market address of the market to change adjust factor for.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n function setAdjustFactor(Market market, uint128 adjustFactor) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (!markets[market].isListed) revert MarketNotListed();\\n\\n markets[market].adjustFactor = adjustFactor;\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the Chainlink Price Feed Aggregator source for a market.\\n /// @param market market address of the asset.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n function setPriceFeed(Market market, IPriceFeed priceFeed) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n markets[market].priceFeed = priceFeed;\\n emit PriceFeedSet(market, priceFeed);\\n }\\n\\n /// @notice Sets liquidation incentive (liquidator and lenders) for the whole ecosystem.\\n /// @param liquidationIncentive_ new liquidation incentive.\\n function setLiquidationIncentive(\\n LiquidationIncentive memory liquidationIncentive_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n liquidationIncentive = liquidationIncentive_;\\n emit LiquidationIncentiveSet(liquidationIncentive_);\\n }\\n\\n /// @notice Emitted when a new market is listed for borrow/lending.\\n /// @param market address of the market that was listed.\\n /// @param decimals decimals of the market's underlying asset.\\n event MarketListed(Market indexed market, uint8 decimals);\\n\\n /// @notice Emitted when an account enters a market to use his deposit as collateral for a loan.\\n /// @param market address of the market that the account entered.\\n /// @param account address of the account that just entered a market.\\n event MarketEntered(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when an account leaves a market.\\n /// Means that they would stop using their deposit as collateral and won't ask for any loans in this market.\\n /// @param market address of the market that the account just left.\\n /// @param account address of the account that just left a market.\\n event MarketExited(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when a adjust factor is changed by admin.\\n /// @param market address of the market that has a new adjust factor.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n event AdjustFactorSet(Market indexed market, uint256 adjustFactor);\\n\\n /// @notice Emitted when a new liquidationIncentive has been set.\\n /// @param liquidationIncentive represented with 18 decimals.\\n event LiquidationIncentiveSet(LiquidationIncentive liquidationIncentive);\\n\\n /// @notice Emitted when a market and prie feed is changed by admin.\\n /// @param market address of the asset used to get the price.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n event PriceFeedSet(Market indexed market, IPriceFeed indexed priceFeed);\\n\\n /// @notice Stores the market parameters used for liquidity calculations.\\n /// @param adjustFactor used to asses the lending power of the market's underlying asset.\\n /// @param decimals number of decimals of the market's underlying asset.\\n /// @param index index of the market in the `marketList`.\\n /// @param isListed true if the market is enabled.\\n /// @param priceFeed address of the price feed used to query the asset's price.\\n struct MarketData {\\n uint128 adjustFactor;\\n uint8 decimals;\\n uint8 index;\\n bool isListed;\\n IPriceFeed priceFeed;\\n }\\n\\n /// @notice Stores the liquidator and lenders factors used in liquidations to calculate the amount to seize.\\n /// @param liquidator factor used to calculate the extra bonus a liquidator can seize.\\n /// @param lenders factor used to calculate the bonus that the pool lenders receive.\\n struct LiquidationIncentive {\\n uint128 liquidator;\\n uint128 lenders;\\n }\\n\\n /// @notice Used as memory access to temporary store account liquidity data.\\n /// @param balance collateral balance of the account.\\n /// @param borrowBalance borrow balance of the account.\\n /// @param price asset price returned by the price feed with 18 decimals.\\n struct AccountLiquidity {\\n uint256 balance;\\n uint256 borrowBalance;\\n uint256 price;\\n }\\n}\\n\\nerror AuditorMismatch();\\nerror InsufficientAccountLiquidity();\\nerror InsufficientShortfall();\\nerror InvalidPrice();\\nerror InvalidPriceFeed();\\nerror MarketAlreadyListed();\\nerror MarketNotListed();\\nerror NotMarket();\\nerror RemainingDebt();\\n\\nstruct MarketVars {\\n uint256 price;\\n uint256 baseUnit;\\n uint128 adjustFactor;\\n}\\n\\nstruct LiquidityVars {\\n uint256 totalDebt;\\n uint256 totalCollateral;\\n uint256 adjustedDebt;\\n uint256 adjustedCollateral;\\n uint256 seizeAvailable;\\n}\\n\",\"keccak256\":\"0xa5facf0b53ee0f3a07843361add23000e569743c9b5a3cdf7817dc51a833040b\",\"license\":\"BUSL-1.1\"},\"contracts/InterestRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract InterestRateModel {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for int256;\\n using SafeCast for uint256;\\n using SafeCast for int256;\\n\\n /// @notice Scale factor of the floating curve.\\n uint256 public immutable floatingCurveA;\\n /// @notice Origin intercept of the floating curve.\\n int256 public immutable floatingCurveB;\\n /// @notice Asymptote of the floating curve.\\n uint256 public immutable floatingMaxUtilization;\\n\\n /// @notice natural level of utilization, represented with 18 decimals.\\n uint256 public immutable naturalUtilization;\\n /// @notice speed of growth for the base rate, represented with 18 decimals.\\n int256 public immutable growthSpeed;\\n /// @notice speed of the sigmoid curve, represented with 18 decimals.\\n int256 public immutable sigmoidSpeed;\\n /// @notice spread factor for the fixed rate, represented with 18 decimals.\\n int256 public immutable spreadFactor;\\n /// @notice speed of maturity for the fixed rate, represented with 18 decimals.\\n int256 public immutable maturitySpeed;\\n /// @notice time preference for the fixed rate, represented with 18 decimals.\\n int256 public immutable timePreference;\\n /// @notice liquidity naturally designated to fixed pools, represented with 18 decimals.\\n uint256 public immutable fixedAllocation;\\n /// @notice maximum interest rate, represented with 18 decimals.\\n uint256 public immutable maxRate;\\n\\n /// @dev maximum input value for expWad, ~ln((2^255 - 1) / 1e18), represented with 18 decimals.\\n int256 internal constant EXP_THRESHOLD = 135305999368893231588;\\n /// @dev auxiliary variable to save an extra operation.\\n int256 internal immutable auxSigmoid;\\n\\n /// @notice set of parameters used to initialize the interest rate model.\\n Parameters internal _parameters;\\n\\n constructor(Parameters memory p, Market market_) {\\n assert(\\n p.minRate > 0 &&\\n p.naturalRate > 0 &&\\n p.maxUtilization > 1e18 &&\\n p.naturalUtilization > 0 &&\\n p.naturalUtilization < 1e18 &&\\n p.growthSpeed > 0 &&\\n p.sigmoidSpeed > 0 &&\\n p.spreadFactor > 0 &&\\n p.maturitySpeed > 0 &&\\n p.maxRate > 0 &&\\n p.maxRate <= 15_000e16\\n );\\n\\n _parameters = p;\\n growthSpeed = p.growthSpeed.toInt256();\\n sigmoidSpeed = p.sigmoidSpeed.toInt256();\\n spreadFactor = p.spreadFactor.toInt256();\\n maturitySpeed = p.maturitySpeed.toInt256();\\n floatingMaxUtilization = p.maxUtilization;\\n naturalUtilization = p.naturalUtilization;\\n\\n floatingCurveA =\\n ((p.naturalRate.mulWadUp(\\n uint256(((growthSpeed * (1e18 - int256(p.naturalUtilization / 2)).lnWad()) / 1e18).expWad())\\n ) - p.minRate) *\\n (p.maxUtilization - p.naturalUtilization) *\\n (p.maxUtilization)) /\\n (p.naturalUtilization * 1e18);\\n floatingCurveB = int256(p.minRate) - int256(floatingCurveA.divWadDown(p.maxUtilization));\\n\\n market = market_;\\n fixedCurveA = address(market_) != address(0) ? floatingCurveA : 0;\\n fixedCurveB = address(market_) != address(0) ? floatingCurveB : int256(0);\\n fixedMaxUtilization = address(market_) != address(0) ? p.maxUtilization : 0;\\n\\n timePreference = p.timePreference;\\n fixedAllocation = p.fixedAllocation;\\n maxRate = p.maxRate;\\n\\n auxSigmoid = int256(naturalUtilization.divWadDown(1e18 - naturalUtilization)).lnWad();\\n\\n // reverts if it's an invalid curve (such as one yielding a negative interest rate).\\n fixedRate(block.timestamp + FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL), 2, 1, 1, 2);\\n baseRate(1e18 - 1, 1e18 - 1);\\n }\\n\\n /// @notice fixed rate with given conditions, represented with 18 decimals.\\n /// @param maturity maturity of the pool.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param uFixed fixed utilization of the pool.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `base * spread` and `maxRate` with given conditions.\\n function fixedRate(\\n uint256 maturity,\\n uint256 maxPools,\\n uint256 uFixed,\\n uint256 uFloating,\\n uint256 uGlobal\\n ) public view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n if (uFixed > uGlobal) revert UtilizationExceeded();\\n if (uGlobal == 0) return baseRate(uFloating, 0);\\n\\n FixedVars memory v;\\n v.sqFNatPools = (maxPools * 1e18).divWadDown(fixedAllocation);\\n v.fNatPools = (v.sqFNatPools * 1e18).sqrt();\\n v.fixedFactor = (maxPools * uFixed).mulDivDown(1e36, uGlobal * fixedAllocation);\\n v.natPools =\\n ((2e18 - v.sqFNatPools.toInt256()) * 1e36) /\\n (v.fNatPools.toInt256() * (1e18 - v.fNatPools.toInt256()));\\n v.maturityFactor = (maturity - block.timestamp).divWadDown(\\n block.timestamp + maxPools * FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL)\\n );\\n\\n uint256 spread = (1e18 +\\n (((maturitySpeed * (v.maturityFactor).toInt256().lnWad()) / 1e18).expWad() *\\n (timePreference +\\n (spreadFactor *\\n ((v.natPools * (v.fixedFactor * 1e18).sqrt().toInt256()) /\\n 1e18 +\\n ((1e18 - v.natPools) * v.fixedFactor.toInt256()) /\\n 1e18 -\\n 1e18)) /\\n 1e18)) /\\n 1e18).toUint256();\\n uint256 base = baseRate(uFloating, uGlobal);\\n\\n if (base >= maxRate.divWadDown(spread)) return maxRate;\\n return base.mulWadUp(spread);\\n }\\n\\n /// @notice base rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the base rate, without capping.\\n function baseRate(uint256 uFloating, uint256 uGlobal) internal view returns (uint256) {\\n if (uFloating > uGlobal) revert UtilizationExceeded();\\n if (uGlobal >= 1e18) return type(uint256).max;\\n\\n uint256 r = ((floatingCurveA.divWadDown(floatingMaxUtilization - uFloating)).toInt256() + floatingCurveB)\\n .toUint256();\\n\\n if (uGlobal == 0) return r;\\n\\n int256 x = -((sigmoidSpeed * (int256(uGlobal.divWadDown(1e18 - uGlobal)).lnWad() - auxSigmoid)) / 1e18);\\n uint256 sigmoid = x > EXP_THRESHOLD ? 0 : uint256(1e18).divWadDown(1e18 + x.expWad().toUint256());\\n x = (-growthSpeed * (1e18 - sigmoid.mulWadDown(uGlobal)).toInt256().lnWad()) / 1e18;\\n uint256 globalFactor = ((x > EXP_THRESHOLD ? EXP_THRESHOLD : x).expWad()).toUint256();\\n\\n if (globalFactor > type(uint256).max / r) return type(uint256).max;\\n\\n return r.mulWadUp(globalFactor);\\n }\\n\\n /// @notice floating rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `baseRate` and `maxRate` with given conditions.\\n function floatingRate(uint256 uFloating, uint256 uGlobal) public view returns (uint256) {\\n return Math.min(baseRate(uFloating, uGlobal), maxRate);\\n }\\n\\n function parameters() external view returns (Parameters memory) {\\n return _parameters;\\n }\\n\\n // Legacy interface, kept for compatibility.\\n\\n /// @notice Market where the interest rate model is used. Keeps compatibility with legacy interest rate model.\\n Market public immutable market;\\n uint256 public immutable fixedCurveA;\\n int256 public immutable fixedCurveB;\\n uint256 public immutable fixedMaxUtilization;\\n\\n /// @dev Deprecated in favor of `floatingRate(uFloating, uGlobal)`.\\n function floatingRate(uint256) public view returns (uint256) {\\n uint256 floatingAssets = market.floatingAssets();\\n uint256 floatingDebt = market.floatingDebt();\\n return\\n floatingRate(\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed())\\n );\\n }\\n\\n /// @dev Deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function fixedBorrowRate(\\n uint256 maturity,\\n uint256 amount,\\n uint256 borrowed,\\n uint256 supplied,\\n uint256\\n ) external view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n uint256 floatingAssets = previewFloatingAssetsAverage(maturity);\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n uint256 newBorrowed = borrowed + amount;\\n uint256 backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, supplied), newBorrowed);\\n\\n return\\n fixedRate(\\n maturity,\\n market.maxFuturePools(),\\n fixedUtilization(supplied, newBorrowed, floatingAssets),\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed() + backupDebtAddition)\\n ).mulDivDown(maturity - block.timestamp, 365 days);\\n }\\n\\n /// @dev deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function minFixedRate(uint256, uint256, uint256) external view returns (uint256 rate, uint256 utilization) {\\n uint256 floatingAssets = market.floatingAssetsAverage();\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n utilization = globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed());\\n rate = baseRate(floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0, utilization);\\n }\\n\\n function previewFloatingAssetsAverage(uint256 maturity) internal view returns (uint256) {\\n FixedLib.Pool memory pool;\\n (pool.borrowed, pool.supplied, pool.unassignedEarnings, pool.lastAccrual) = market.fixedPools(maturity);\\n uint256 memFloatingAssets = market.floatingAssets() +\\n pool.unassignedEarnings.mulDivDown(block.timestamp - pool.lastAccrual, maturity - pool.lastAccrual);\\n uint256 memFloatingAssetsAverage = market.floatingAssetsAverage();\\n uint256 averageFactor = (1e18 -\\n (\\n -int256(\\n memFloatingAssets < memFloatingAssetsAverage\\n ? market.dampSpeedDown()\\n : market.dampSpeedUp() * (block.timestamp - market.lastAverageUpdate())\\n )\\n ).expWad()).toUint256();\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n function globalUtilization(\\n uint256 floatingAssets,\\n uint256 floatingDebt,\\n uint256 backupBorrowed\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 ? (floatingDebt + backupBorrowed).divWadUp(floatingAssets) : 0;\\n }\\n\\n function fixedUtilization(\\n uint256 supplied,\\n uint256 borrowed,\\n uint256 floatingAssets\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(floatingAssets) : 0;\\n }\\n}\\n\\nerror AlreadyMatured();\\nerror UtilizationExceeded();\\n\\nstruct Parameters {\\n uint256 minRate;\\n uint256 naturalRate;\\n uint256 maxUtilization;\\n uint256 naturalUtilization;\\n uint256 growthSpeed;\\n uint256 sigmoidSpeed;\\n uint256 spreadFactor;\\n uint256 maturitySpeed;\\n int256 timePreference;\\n uint256 fixedAllocation;\\n uint256 maxRate;\\n}\\n\\nstruct FixedVars {\\n uint256 sqFNatPools;\\n uint256 fNatPools;\\n uint256 fixedFactor;\\n int256 natPools;\\n uint256 maturityFactor;\\n}\\n\",\"keccak256\":\"0x9df5219d8182a14f123a725c73a586aed83c3d39c17b45a0a59e3923e4fe6532\",\"license\":\"BUSL-1.1\"},\"contracts/Market.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { PausableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { ERC4626, ERC20, SafeTransferLib } from \\\"solmate/src/mixins/ERC4626.sol\\\";\\nimport { InterestRateModel } from \\\"./InterestRateModel.sol\\\";\\nimport { RewardsController } from \\\"./RewardsController.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Auditor } from \\\"./Auditor.sol\\\";\\n\\ncontract Market is Initializable, AccessControlUpgradeable, PausableUpgradeable, ERC4626 {\\n using FixedPointMathLib for int256;\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint128;\\n using SafeTransferLib for ERC20;\\n using FixedLib for FixedLib.Pool;\\n using FixedLib for FixedLib.Position;\\n using FixedLib for uint256;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant EMERGENCY_ADMIN_ROLE = keccak256(\\\"EMERGENCY_ADMIN_ROLE\\\");\\n\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n Auditor public immutable auditor;\\n\\n /// @notice Tracks account's fixed deposit positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedDepositPositions;\\n /// @notice Tracks account's fixed borrow positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedBorrowPositions;\\n /// @notice Tracks fixed pools state by maturity.\\n mapping(uint256 => FixedLib.Pool) public fixedPools;\\n\\n /// @notice Tracks fixed deposit and borrow map and floating borrow shares of an account.\\n mapping(address => Account) public accounts;\\n\\n /// @notice Amount of assets lent by the floating pool to the fixed pools.\\n uint256 public floatingBackupBorrowed;\\n /// @notice Amount of assets lent by the floating pool to accounts.\\n uint256 public floatingDebt;\\n\\n /// @notice Accumulated earnings from extraordinary sources to be gradually distributed.\\n uint256 public earningsAccumulator;\\n /// @notice Rate per second to be charged to delayed fixed pools borrowers after maturity.\\n uint256 public penaltyRate;\\n /// @notice Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\\n uint256 public backupFeeRate;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\\n uint256 public dampSpeedUp;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\\n uint256 public dampSpeedDown;\\n\\n /// @notice Number of fixed pools to be active at the same time.\\n uint8 public maxFuturePools;\\n /// @notice Last time the accumulator distributed earnings.\\n uint32 public lastAccumulatorAccrual;\\n /// @notice Last time the floating debt was updated.\\n uint32 public lastFloatingDebtUpdate;\\n /// @notice Last time the floating assets average was updated.\\n uint32 public lastAverageUpdate;\\n\\n /// @notice Interest rate model contract used to get the borrow rates.\\n InterestRateModel public interestRateModel;\\n\\n /// @notice Factor used for gradual accrual of earnings to the floating pool.\\n uint128 public earningsAccumulatorSmoothFactor;\\n /// @notice Percentage factor that represents the liquidity reserves that can't be borrowed.\\n uint128 public reserveFactor;\\n\\n /// @notice Amount of floating assets deposited to the pool.\\n uint256 public floatingAssets;\\n /// @notice Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\\n uint256 public floatingAssetsAverage;\\n\\n /// @notice Total amount of floating borrow shares assigned to floating borrow accounts.\\n uint256 public totalFloatingBorrowShares;\\n\\n /// @dev gap from deprecated state.\\n /// @custom:oz-renamed-from floatingUtilization\\n uint256 private __gap;\\n\\n /// @notice Address of the treasury that will receive the allocated earnings.\\n address public treasury;\\n /// @notice Rate to be charged by the treasury to floating and fixed borrows.\\n uint256 public treasuryFeeRate;\\n\\n /// @notice Address of the rewards controller that will accrue rewards for accounts operating with the Market.\\n RewardsController public rewardsController;\\n\\n /// @notice Flag to prevent new borrows and deposits.\\n bool public isFrozen;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(ERC20 asset_, Auditor auditor_) ERC4626(asset_, \\\"\\\", \\\"\\\") {\\n auditor = auditor_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(\\n string calldata assetSymbol,\\n uint8 maxFuturePools_,\\n uint128 earningsAccumulatorSmoothFactor_,\\n InterestRateModel interestRateModel_,\\n uint256 penaltyRate_,\\n uint256 backupFeeRate_,\\n uint128 reserveFactor_,\\n uint256 dampSpeedUp_,\\n uint256 dampSpeedDown_\\n ) external initializer {\\n __AccessControl_init();\\n __Pausable_init();\\n\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n lastAverageUpdate = uint32(block.timestamp);\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setAssetSymbol(assetSymbol);\\n setMaxFuturePools(maxFuturePools_);\\n setEarningsAccumulatorSmoothFactor(earningsAccumulatorSmoothFactor_);\\n setInterestRateModel(interestRateModel_);\\n setPenaltyRate(penaltyRate_);\\n setBackupFeeRate(backupFeeRate_);\\n setReserveFactor(reserveFactor_);\\n setDampSpeed(dampSpeedUp_, dampSpeedDown_);\\n }\\n\\n /// @notice Borrows a certain amount from the floating pool.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return borrowShares shares corresponding to the borrowed assets.\\n function borrow(\\n uint256 assets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 borrowShares) {\\n spendAllowance(borrower, assets);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n\\n borrowShares = previewBorrow(assets);\\n\\n uint256 newFloatingDebt = floatingDebt + assets;\\n floatingDebt = newFloatingDebt;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed, also considering the reserves\\n if (floatingBackupBorrowed + newFloatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n\\n totalFloatingBorrowShares += borrowShares;\\n accounts[borrower].floatingBorrowShares += borrowShares;\\n\\n emit Borrow(msg.sender, receiver, borrower, assets, borrowShares);\\n emitMarketUpdate();\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Repays a certain amount of assets to the floating pool.\\n /// @param assets assets to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepay the actual amount that should be transferred into the protocol.\\n /// @return borrowShares subtracted shares from the borrower's accountability.\\n function repay(\\n uint256 assets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepay, uint256 borrowShares) {\\n (actualRepay, borrowShares) = noTransferRefund(previewRepay(assets), borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), actualRepay);\\n }\\n\\n /// @notice Repays a certain amount of shares to the floating pool.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return assets subtracted assets from the borrower's accountability.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function refund(\\n uint256 borrowShares,\\n address borrower\\n ) external whenNotPaused returns (uint256 assets, uint256 actualShares) {\\n (assets, actualShares) = noTransferRefund(borrowShares, borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Allows to (partially) repay a floating borrow. It does not transfer assets.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower the address of the account that has the debt.\\n /// @return assets the actual amount that should be transferred into the protocol.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function noTransferRefund(\\n uint256 borrowShares,\\n address borrower\\n ) internal returns (uint256 assets, uint256 actualShares) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n Account storage account = accounts[borrower];\\n uint256 accountBorrowShares = account.floatingBorrowShares;\\n actualShares = Math.min(borrowShares, accountBorrowShares);\\n assets = previewRefund(actualShares);\\n\\n if (assets == 0) revert ZeroRepay();\\n\\n floatingDebt -= assets;\\n account.floatingBorrowShares = accountBorrowShares - actualShares;\\n totalFloatingBorrowShares -= actualShares;\\n\\n emit Repay(msg.sender, borrower, assets, actualShares);\\n }\\n\\n /// @notice Deposits a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be deposited.\\n /// @param assets amount to receive from the msg.sender.\\n /// @param minAssetsRequired minimum amount of assets required by the depositor for the transaction to be accepted.\\n /// @param receiver address that will be able to withdraw the deposited assets.\\n /// @return positionAssets total amount of assets (principal + fee) to be withdrawn at maturity.\\n function depositAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 minAssetsRequired,\\n address receiver\\n ) external whenNotPaused whenNotFrozen returns (uint256 positionAssets) {\\n if (assets == 0) revert ZeroDeposit();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n floatingAssets += backupEarnings;\\n\\n (uint256 fee, uint256 backupFee) = pool.calculateDeposit(assets, backupFeeRate);\\n positionAssets = assets + fee;\\n if (positionAssets < minAssetsRequired) revert Disagreement();\\n\\n floatingBackupBorrowed -= pool.deposit(assets);\\n pool.unassignedEarnings -= fee + backupFee;\\n earningsAccumulator += backupFee;\\n\\n // update account's position\\n FixedLib.Position storage position = fixedDepositPositions[maturity][receiver];\\n\\n // if account doesn't have a current position, add it to the list\\n if (position.principal == 0) {\\n Account storage account = accounts[receiver];\\n account.fixedDeposits = account.fixedDeposits.setMaturity(maturity);\\n }\\n\\n position.principal += assets;\\n position.fee += fee;\\n\\n emit DepositAtMaturity(maturity, msg.sender, receiver, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Borrows a certain amount from a maturity.\\n /// @param maturity maturity date for repayment.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return assetsOwed total amount of assets (principal + fee) to be repaid at maturity.\\n function borrowAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 maxAssets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 assetsOwed) {\\n if (assets == 0) revert ZeroBorrow();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n {\\n uint256 backupDebtAddition = pool.borrow(assets);\\n if (backupDebtAddition != 0) {\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed + backupDebtAddition;\\n depositToTreasury(updateFloatingDebt());\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n }\\n uint256 fee;\\n {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, floatingBackupBorrowed)\\n );\\n fee = assets.mulWadDown(fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n }\\n assetsOwed = assets + fee;\\n\\n // validate that the account is not taking arbitrary fees\\n if (assetsOwed > maxAssets) revert Disagreement();\\n\\n spendAllowance(borrower, assetsOwed);\\n\\n {\\n // if account doesn't have a current position, add it to the list\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n if (position.principal == 0) {\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.setMaturity(maturity);\\n }\\n\\n // calculate what portion of the fees are to be accrued and what portion goes to earnings accumulator\\n (uint256 newUnassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(fee),\\n assets\\n );\\n if (newUnassignedEarnings != 0) pool.unassignedEarnings += newUnassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n fixedBorrowPositions[maturity][borrower] = FixedLib.Position(position.principal + assets, position.fee + fee);\\n }\\n\\n emit BorrowAtMaturity(maturity, msg.sender, receiver, borrower, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Withdraws a certain amount from a maturity.\\n /// @param maturity maturity date where the assets will be withdrawn.\\n /// @param positionAssets position size to be reduced.\\n /// @param minAssetsRequired minimum amount required by the account (if discount included for early withdrawal).\\n /// @param receiver address that will receive the withdrawn assets.\\n /// @param owner address that previously deposited the assets.\\n /// @return assetsDiscounted amount of assets withdrawn (can include a discount for early withdraw).\\n function withdrawAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 minAssetsRequired,\\n address receiver,\\n address owner\\n ) external whenNotPaused returns (uint256 assetsDiscounted) {\\n if (positionAssets == 0) revert ZeroWithdraw();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n FixedLib.Position memory position = fixedDepositPositions[maturity][owner];\\n\\n if (positionAssets > position.principal + position.fee) positionAssets = position.principal + position.fee;\\n\\n {\\n // remove the supply from the fixed rate pool\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed +\\n pool.withdraw(\\n FixedLib.Position(position.principal, position.fee).scaleProportionally(positionAssets).principal\\n );\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets) revert InsufficientProtocolLiquidity();\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n\\n // verify if there are any penalties/fee for the account because of early withdrawal, if so discount\\n if (block.timestamp < maturity) {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingBackupBorrowed = floatingBackupBorrowed;\\n\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, memFloatingBackupBorrowed)\\n );\\n assetsDiscounted = positionAssets.divWadDown(1e18 + fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n } else {\\n assetsDiscounted = positionAssets;\\n }\\n\\n if (assetsDiscounted < minAssetsRequired) revert Disagreement();\\n\\n spendAllowance(owner, assetsDiscounted);\\n\\n // all the fees go to unassigned or to the floating pool\\n (uint256 unassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(positionAssets - assetsDiscounted),\\n assetsDiscounted\\n );\\n pool.unassignedEarnings += unassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n // the account gets discounted the full amount\\n position.reduceProportionally(positionAssets);\\n if (position.principal | position.fee == 0) {\\n delete fixedDepositPositions[maturity][owner];\\n Account storage account = accounts[owner];\\n account.fixedDeposits = account.fixedDeposits.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedDepositPositions[maturity][owner] = position;\\n }\\n\\n emit WithdrawAtMaturity(maturity, msg.sender, receiver, owner, positionAssets, assetsDiscounted);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransfer(receiver, assetsDiscounted);\\n }\\n\\n /// @notice Repays a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be repaid.\\n /// @param positionAssets amount to be paid for the borrower's debt.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepayAssets the actual amount that was transferred into the protocol.\\n function repayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepayAssets) {\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n actualRepayAssets = noTransferRepayAtMaturity(maturity, positionAssets, maxAssets, borrower, true);\\n emitMarketUpdate();\\n\\n asset.safeTransferFrom(msg.sender, address(this), actualRepayAssets);\\n }\\n\\n /// @notice Allows to (partially) repay a fixed rate position. It does not transfer assets.\\n /// @param maturity the maturity to access the pool.\\n /// @param positionAssets the amount of debt of the pool that should be paid.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower the address of the account that has the debt.\\n /// @param canDiscount should early repay discounts be applied.\\n /// @return actualRepayAssets the actual amount that should be transferred into the protocol.\\n function noTransferRepayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower,\\n bool canDiscount\\n ) internal returns (uint256 actualRepayAssets) {\\n if (positionAssets == 0) revert ZeroRepay();\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n floatingAssets += backupEarnings;\\n\\n FixedLib.Position memory position = fixedBorrowPositions[maturity][borrower];\\n\\n uint256 debtCovered = Math.min(positionAssets, position.principal + position.fee);\\n\\n uint256 principalCovered = FixedLib\\n .Position(position.principal, position.fee)\\n .scaleProportionally(debtCovered)\\n .principal;\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n // early repayment allows a discount from the unassigned earnings\\n if (block.timestamp < maturity) {\\n if (canDiscount) {\\n // calculate the deposit fee considering the amount of debt the account'll pay\\n (uint256 discountFee, uint256 backupFee) = pool.calculateDeposit(principalCovered, backupFeeRate);\\n\\n // remove the fee from unassigned earnings\\n pool.unassignedEarnings -= discountFee + backupFee;\\n\\n // the fee charged to the fixed pool supplier goes to the earnings accumulator\\n earningsAccumulator += backupFee;\\n\\n // the fee gets discounted from the account through `actualRepayAssets`\\n actualRepayAssets = debtCovered - discountFee;\\n } else {\\n actualRepayAssets = debtCovered;\\n }\\n } else {\\n actualRepayAssets = debtCovered + debtCovered.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n\\n // all penalties go to the earnings accumulator\\n earningsAccumulator += actualRepayAssets - debtCovered;\\n }\\n\\n // verify that the account agrees to this discount or penalty\\n if (actualRepayAssets > maxAssets) revert Disagreement();\\n\\n // reduce the borrowed from the pool and might decrease the floating backup borrowed\\n floatingBackupBorrowed -= pool.repay(principalCovered);\\n\\n // update the account position\\n position.reduceProportionally(debtCovered);\\n if (position.principal | position.fee == 0) {\\n delete fixedBorrowPositions[maturity][borrower];\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedBorrowPositions[maturity][borrower] = position;\\n }\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, actualRepayAssets, debtCovered);\\n emitFixedEarningsUpdate(maturity);\\n }\\n\\n /// @notice Liquidates undercollateralized fixed/floating (or both) position(s).\\n /// @dev Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool,\\n /// or/and for multiple fixed pools, seizing a portion of borrower's collateral.\\n /// @param borrower account that has an outstanding debt across floating or fixed pools.\\n /// @param maxAssets maximum amount of debt that the liquidator is willing to accept. (it can be less)\\n /// @param seizeMarket market from which the collateral will be seized to give to the liquidator.\\n /// @return repaidAssets actual amount repaid.\\n function liquidate(\\n address borrower,\\n uint256 maxAssets,\\n Market seizeMarket\\n ) external whenNotPaused returns (uint256 repaidAssets) {\\n if (msg.sender == borrower) revert SelfLiquidation();\\n\\n maxAssets = auditor.checkLiquidation(this, seizeMarket, borrower, maxAssets);\\n if (maxAssets == 0) revert ZeroRepay();\\n\\n Account storage account = accounts[borrower];\\n\\n {\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0 && maxAssets != 0) {\\n if (packedMaturities & 1 != 0) {\\n uint256 actualRepay;\\n if (block.timestamp < maturity) {\\n actualRepay = noTransferRepayAtMaturity(maturity, maxAssets, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n } else {\\n uint256 position;\\n {\\n FixedLib.Position storage p = fixedBorrowPositions[maturity][borrower];\\n position = p.principal + p.fee;\\n }\\n uint256 debt = position + position.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n actualRepay = debt > maxAssets ? maxAssets.mulDivDown(position, debt) : maxAssets;\\n\\n if (actualRepay == 0) maxAssets = 0;\\n else {\\n actualRepay = noTransferRepayAtMaturity(maturity, actualRepay, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n }\\n }\\n repaidAssets += actualRepay;\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n\\n if (maxAssets != 0 && account.floatingBorrowShares != 0) {\\n uint256 borrowShares = previewRepay(maxAssets);\\n if (borrowShares != 0) {\\n (uint256 actualRepayAssets, ) = noTransferRefund(borrowShares, borrower);\\n repaidAssets += actualRepayAssets;\\n }\\n }\\n\\n // reverts on failure\\n (uint256 lendersAssets, uint256 seizeAssets) = auditor.calculateSeize(this, seizeMarket, borrower, repaidAssets);\\n earningsAccumulator += lendersAssets;\\n\\n if (address(seizeMarket) == address(this)) {\\n internalSeize(this, msg.sender, borrower, seizeAssets);\\n } else {\\n seizeMarket.seize(msg.sender, borrower, seizeAssets);\\n\\n emitMarketUpdate();\\n }\\n\\n emit Liquidate(msg.sender, borrower, repaidAssets, lendersAssets, seizeMarket, seizeAssets);\\n\\n auditor.handleBadDebt(borrower);\\n\\n asset.safeTransferFrom(msg.sender, address(this), repaidAssets + lendersAssets);\\n }\\n\\n /// @notice Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\\n /// @dev Can only be called from the auditor.\\n /// @param borrower account with insufficient collateral to be cleared the debt.\\n function clearBadDebt(address borrower) external {\\n if (msg.sender != address(auditor)) revert NotAuditor();\\n\\n floatingAssets += accrueAccumulatedEarnings();\\n Account storage account = accounts[borrower];\\n uint256 accumulator = earningsAccumulator;\\n uint256 totalBadDebt = 0;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 badDebt = position.principal + position.fee;\\n if (accumulator >= badDebt) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n accumulator -= badDebt;\\n totalBadDebt += badDebt;\\n floatingBackupBorrowed -= fixedPools[maturity].repay(position.principal);\\n delete fixedBorrowPositions[maturity][borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, badDebt, badDebt);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n if (account.floatingBorrowShares != 0 && (accumulator = previewRepay(accumulator)) != 0) {\\n (uint256 badDebt, ) = noTransferRefund(accumulator, borrower);\\n totalBadDebt += badDebt;\\n }\\n if (totalBadDebt != 0) {\\n earningsAccumulator -= totalBadDebt;\\n emit SpreadBadDebt(borrower, totalBadDebt);\\n }\\n emitMarketUpdate();\\n }\\n\\n /// @notice Public function to seize a certain amount of assets.\\n /// @dev Public function for liquidator to seize borrowers assets in the floating pool.\\n /// This function will only be called from another Market, on `liquidation` calls.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function seize(address liquidator, address borrower, uint256 assets) external whenNotPaused {\\n internalSeize(Market(msg.sender), liquidator, borrower, assets);\\n }\\n\\n /// @notice Internal function to seize a certain amount of assets.\\n /// @dev Internal function for liquidator to seize borrowers assets in the floating pool.\\n /// Will only be called from this Market on `liquidation` or through `seize` calls from another Market.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param seizeMarket address which is calling the seize function (see `seize` public function).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function internalSeize(Market seizeMarket, address liquidator, address borrower, uint256 assets) internal {\\n if (assets == 0) revert ZeroWithdraw();\\n\\n // reverts on failure\\n auditor.checkSeize(seizeMarket, this);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(borrower);\\n uint256 shares = previewWithdraw(assets);\\n beforeWithdraw(assets, shares);\\n _burn(borrower, shares);\\n emit Withdraw(msg.sender, liquidator, borrower, assets, shares);\\n emit Seize(liquidator, borrower, assets);\\n emitMarketUpdate();\\n\\n asset.safeTransfer(liquidator, assets);\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be withdrawn from the floating pool.\\n function beforeWithdraw(uint256 assets, uint256) internal override whenNotPaused {\\n updateFloatingAssetsAverage();\\n depositToTreasury(updateFloatingDebt());\\n uint256 earnings = accrueAccumulatedEarnings();\\n uint256 newFloatingAssets = floatingAssets + earnings - assets;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed\\n if (floatingBackupBorrowed + floatingDebt > newFloatingAssets) revert InsufficientProtocolLiquidity();\\n floatingAssets = newFloatingAssets;\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be deposited to the floating pool.\\n function afterDeposit(uint256 assets, uint256) internal override whenNotPaused whenNotFrozen {\\n updateFloatingAssetsAverage();\\n uint256 treasuryFee = updateFloatingDebt();\\n uint256 earnings = accrueAccumulatedEarnings();\\n floatingAssets += earnings + assets;\\n depositToTreasury(treasuryFee);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Withdraws the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param assets amount of underlying to be withdrawn.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return shares amount of shares redeemed for underlying asset.\\n function withdraw(uint256 assets, address receiver, address owner) public override returns (uint256 shares) {\\n auditor.checkShortfall(this, owner, assets);\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n shares = super.withdraw(assets, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Redeems the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param shares amount of shares to be redeemed for underlying asset.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return assets amount of underlying asset that was withdrawn.\\n function redeem(uint256 shares, address receiver, address owner) public override returns (uint256 assets) {\\n auditor.checkShortfall(this, owner, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n assets = super.redeem(shares, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n function _mint(address to, uint256 amount) internal override {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(to);\\n super._mint(to, amount);\\n }\\n\\n /// @notice Moves amount of shares from the caller's account to `to`.\\n /// @dev Makes sure that the caller doesn't have shortfall after transferring.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transfer(address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, msg.sender, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(msg.sender);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transfer(to, shares);\\n }\\n\\n /// @notice Moves amount of shares from `from` to `to` using the allowance mechanism.\\n /// @dev Makes sure that `from` address doesn't have shortfall after transferring.\\n /// @param from address from which the assets will be transferred.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transferFrom(address from, address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, from, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(from);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transferFrom(from, to, shares);\\n }\\n\\n /// @notice Gets current snapshot for an account across all maturities.\\n /// @param account account to return status snapshot in the specified maturity date.\\n /// @return the amount deposited to the floating pool and the amount owed to floating and fixed pools.\\n function accountSnapshot(address account) external view returns (uint256, uint256) {\\n return (convertToAssets(balanceOf[account]), previewDebt(account));\\n }\\n\\n /// @notice Gets all borrows and penalties for an account.\\n /// @param borrower account to return status snapshot for fixed and floating borrows.\\n /// @return debt the total debt, denominated in number of assets.\\n function previewDebt(address borrower) public view returns (uint256 debt) {\\n Account storage account = accounts[borrower];\\n uint256 memPenaltyRate = penaltyRate;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n // calculate all maturities using the base maturity and the following bits representing the following intervals\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 positionAssets = position.principal + position.fee;\\n\\n debt += positionAssets;\\n\\n if (block.timestamp > maturity) {\\n debt += positionAssets.mulWadDown((block.timestamp - maturity) * memPenaltyRate);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n // calculate floating borrowed debt\\n uint256 shares = account.floatingBorrowShares;\\n if (shares != 0) debt += previewRefund(shares);\\n }\\n\\n /// @notice Charges treasury fee to certain amount of earnings.\\n /// @param earnings amount of earnings.\\n /// @return earnings minus the fees charged by the treasury.\\n function chargeTreasuryFee(uint256 earnings) internal returns (uint256) {\\n uint256 fee = earnings.mulWadDown(treasuryFeeRate);\\n depositToTreasury(fee);\\n return earnings - fee;\\n }\\n\\n /// @notice Collects all earnings that are charged to borrowers that make use of fixed pool deposits' assets.\\n /// @param earnings amount of earnings.\\n function collectFreeLunch(uint256 earnings) internal {\\n if (earnings == 0) return;\\n\\n if (treasuryFeeRate != 0) {\\n depositToTreasury(earnings);\\n } else {\\n earningsAccumulator += earnings;\\n }\\n }\\n\\n /// @notice Deposits amount of assets on behalf of the treasury address.\\n /// @param fee amount of assets to be deposited.\\n function depositToTreasury(uint256 fee) internal {\\n if (fee != 0) {\\n _mint(treasury, previewDeposit(fee));\\n floatingAssets += fee;\\n }\\n }\\n\\n /// @notice Calculates the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings to be distributed from the accumulator.\\n function accumulatedEarnings() internal view returns (uint256 earnings) {\\n uint256 elapsed = block.timestamp - lastAccumulatorAccrual;\\n if (elapsed == 0) return 0;\\n return\\n earningsAccumulator.mulDivDown(\\n elapsed,\\n elapsed + earningsAccumulatorSmoothFactor.mulWadDown(maxFuturePools * FixedLib.INTERVAL)\\n );\\n }\\n\\n /// @notice Accrues the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings distributed from the accumulator.\\n function accrueAccumulatedEarnings() internal returns (uint256 earnings) {\\n earnings = accumulatedEarnings();\\n\\n earningsAccumulator -= earnings;\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n emit AccumulatorAccrual(block.timestamp);\\n }\\n\\n /// @notice Updates the `floatingAssetsAverage`.\\n function updateFloatingAssetsAverage() internal {\\n floatingAssetsAverage = previewFloatingAssetsAverage();\\n lastAverageUpdate = uint32(block.timestamp);\\n }\\n\\n /// @notice Returns the current `floatingAssetsAverage` without updating the storage variable.\\n /// @return projected `floatingAssetsAverage`.\\n function previewFloatingAssetsAverage() public view returns (uint256) {\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 memFloatingAssetsAverage = floatingAssetsAverage;\\n uint256 dampSpeedFactor = memFloatingAssets < memFloatingAssetsAverage ? dampSpeedDown : dampSpeedUp;\\n uint256 averageFactor = uint256(1e18 - (-int256(dampSpeedFactor * (block.timestamp - lastAverageUpdate))).expWad());\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n /// @notice Updates the floating pool borrows' variables.\\n /// @return treasuryFee amount of fees charged by the treasury to the new calculated floating debt.\\n function updateFloatingDebt() internal returns (uint256 treasuryFee) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 utilization = floatingUtilization(memFloatingAssets, memFloatingDebt);\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(utilization, globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed))\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n\\n memFloatingDebt += newDebt;\\n treasuryFee = newDebt.mulWadDown(treasuryFeeRate);\\n floatingAssets = memFloatingAssets + newDebt - treasuryFee;\\n floatingDebt = memFloatingDebt;\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n emit FloatingDebtUpdate(block.timestamp, utilization);\\n }\\n\\n /// @notice Calculates the total floating debt, considering elapsed time since last update and current interest rate.\\n /// @return actual floating debt plus projected interest.\\n function totalFloatingBorrowAssets() public view returns (uint256) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(\\n floatingUtilization(memFloatingAssets, memFloatingDebt),\\n globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed)\\n )\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n return memFloatingDebt + newDebt;\\n }\\n\\n /// @notice Calculates the floating pool balance plus earnings to be accrued at current timestamp\\n /// from maturities and accumulator.\\n /// @return actual floatingAssets plus earnings to be accrued at current timestamp.\\n function totalAssets() public view override returns (uint256) {\\n unchecked {\\n uint256 backupEarnings = 0;\\n\\n uint256 latestMaturity = block.timestamp - (block.timestamp % FixedLib.INTERVAL);\\n uint256 maxMaturity = latestMaturity + maxFuturePools * FixedLib.INTERVAL;\\n\\n for (uint256 maturity = latestMaturity; maturity <= maxMaturity; maturity += FixedLib.INTERVAL) {\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (maturity > lastAccrual) {\\n backupEarnings += block.timestamp < maturity\\n ? pool.unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual)\\n : pool.unassignedEarnings;\\n }\\n }\\n\\n return\\n floatingAssets +\\n backupEarnings +\\n accumulatedEarnings() +\\n (totalFloatingBorrowAssets() - floatingDebt).mulWadDown(1e18 - treasuryFeeRate);\\n }\\n }\\n\\n /// @notice Simulates the effects of a borrow at the current time, given current contract conditions.\\n /// @param assets amount of assets to borrow.\\n /// @return amount of shares that will be asigned to the account after the borrow.\\n function previewBorrow(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a repay at the current time, given current contract conditions.\\n /// @param assets amount of assets to repay.\\n /// @return amount of shares that will be subtracted from the account after the repay.\\n function previewRepay(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a refund at the current time, given current contract conditions.\\n /// @param shares amount of shares to subtract from caller's accountability.\\n /// @return amount of assets that will be repaid.\\n function previewRefund(uint256 shares) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalFloatingBorrowAssets(), supply);\\n }\\n\\n /// @notice Checks msg.sender's allowance over account's assets.\\n /// @param account account in which the allowance will be checked.\\n /// @param assets assets from account that msg.sender wants to operate on.\\n function spendAllowance(address account, uint256 assets) internal {\\n if (msg.sender != account) {\\n uint256 allowed = allowance[account][msg.sender]; // saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[account][msg.sender] = allowed - previewWithdraw(assets);\\n }\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed amount of the fixed pool.\\n function fixedPoolBorrowed(uint256 maturity) external view returns (uint256) {\\n return fixedPools[maturity].borrowed;\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed and supplied amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed and supplied amount of the fixed pool.\\n function fixedPoolBalance(uint256 maturity) external view returns (uint256, uint256) {\\n return (fixedPools[maturity].borrowed, fixedPools[maturity].supplied);\\n }\\n\\n /// @notice Retrieves fixed utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function fixedUtilization(uint256 supplied, uint256 borrowed, uint256 assets) internal pure returns (uint256) {\\n return assets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves global utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function globalUtilization(uint256 assets, uint256 debt, uint256 backupBorrowed) internal pure returns (uint256) {\\n return assets != 0 ? (debt + backupBorrowed).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves floating utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function floatingUtilization(uint256 assets, uint256 debt) internal pure returns (uint256) {\\n return assets != 0 ? debt.divWadUp(assets) : 0;\\n }\\n\\n /// @notice Emits MarketUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitMarketUpdate() internal {\\n emit MarketUpdate(\\n block.timestamp,\\n totalSupply,\\n floatingAssets,\\n totalFloatingBorrowShares,\\n floatingDebt,\\n earningsAccumulator\\n );\\n }\\n\\n /// @notice Emits FixedEarningsUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitFixedEarningsUpdate(uint256 maturity) internal {\\n emit FixedEarningsUpdate(block.timestamp, maturity, fixedPools[maturity].unassignedEarnings);\\n }\\n\\n /// @notice Sets name and symbol for the Market.\\n /// @param assetSymbol the symbol for the underlying asset.\\n function setAssetSymbol(string calldata assetSymbol) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n name = string.concat(\\\"exactly \\\", assetSymbol);\\n symbol = string.concat(\\\"exa\\\", assetSymbol);\\n }\\n\\n /// @notice Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially\\n /// providing liquidity.\\n /// @param backupFeeRate_ percentage amount represented with 18 decimals.\\n function setBackupFeeRate(uint256 backupFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n backupFeeRate = backupFeeRate_;\\n emit BackupFeeRateSet(backupFeeRate_);\\n }\\n\\n /// @notice Sets the damp speed used to update the floatingAssetsAverage.\\n /// @param up damp speed up, represented with 18 decimals.\\n /// @param down damp speed down, represented with 18 decimals.\\n function setDampSpeed(uint256 up, uint256 down) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n updateFloatingAssetsAverage();\\n dampSpeedUp = up;\\n dampSpeedDown = down;\\n emit DampSpeedSet(up, down);\\n }\\n\\n /// @notice Sets the factor used when smoothly accruing earnings to the floating pool.\\n /// @param earningsAccumulatorSmoothFactor_ represented with 18 decimals.\\n function setEarningsAccumulatorSmoothFactor(\\n uint128 earningsAccumulatorSmoothFactor_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n floatingAssets += accrueAccumulatedEarnings();\\n emitMarketUpdate();\\n earningsAccumulatorSmoothFactor = earningsAccumulatorSmoothFactor_;\\n emit EarningsAccumulatorSmoothFactorSet(earningsAccumulatorSmoothFactor_);\\n }\\n\\n /// @notice Sets the interest rate model to be used to calculate rates.\\n /// @param interestRateModel_ new interest rate model.\\n function setInterestRateModel(InterestRateModel interestRateModel_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(interestRateModel) != address(0)) depositToTreasury(updateFloatingDebt());\\n\\n interestRateModel = interestRateModel_;\\n emitMarketUpdate();\\n emit InterestRateModelSet(interestRateModel_);\\n }\\n\\n /// @notice Sets the rewards controller to update account rewards when operating with the Market.\\n /// @param rewardsController_ new rewards controller.\\n function setRewardsController(RewardsController rewardsController_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n rewardsController = rewardsController_;\\n emit RewardsControllerSet(rewardsController_);\\n }\\n\\n /// @notice Sets the protocol's max future pools for fixed borrowing and lending.\\n /// @dev If value is decreased, VALID maturities will become NOT_READY.\\n /// @param futurePools number of pools to be active at the same time.\\n function setMaxFuturePools(uint8 futurePools) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n maxFuturePools = futurePools;\\n emit MaxFuturePoolsSet(futurePools);\\n }\\n\\n /// @notice Sets the penalty rate per second.\\n /// @param penaltyRate_ percentage represented with 18 decimals.\\n function setPenaltyRate(uint256 penaltyRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n penaltyRate = penaltyRate_;\\n emit PenaltyRateSet(penaltyRate_);\\n }\\n\\n /// @notice Sets the percentage that represents the liquidity reserves that can't be borrowed.\\n /// @param reserveFactor_ parameter represented with 18 decimals.\\n function setReserveFactor(uint128 reserveFactor_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n reserveFactor = reserveFactor_;\\n emit ReserveFactorSet(reserveFactor_);\\n }\\n\\n /// @notice Sets the treasury variables.\\n /// @param treasury_ address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate_ represented with 18 decimals.\\n function setTreasury(address treasury_, uint256 treasuryFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n depositToTreasury(updateFloatingDebt());\\n treasury = treasury_;\\n treasuryFeeRate = treasuryFeeRate_;\\n emit TreasurySet(treasury_, treasuryFeeRate_);\\n }\\n\\n /// @notice Sets the pause state to true in case of emergency, triggered by an authorized account.\\n function pause() external onlyPausingRoles {\\n _pause();\\n }\\n\\n /// @notice Sets the pause state to false when threat is gone, triggered by an authorized account.\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @notice Sets `isFrozen` state, triggered by an authorized account.\\n function setFrozen(bool isFrozen_) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (isFrozen == isFrozen_) return;\\n isFrozen = isFrozen_;\\n emit Frozen(msg.sender, isFrozen_);\\n }\\n\\n /// @dev Throws if the market is frozen.\\n function requireNotFrozen() internal view {\\n if (isFrozen) revert MarketFrozen();\\n }\\n\\n /// @dev Modifier to make a function callable only when the market is not frozen.\\n modifier whenNotFrozen() {\\n requireNotFrozen();\\n _;\\n }\\n\\n /// @dev Throws if the caller is not an `EMERGENCY_ADMIN_ROLE` or `PAUSER_ROLE`.\\n function requirePausingRoles() internal view {\\n if (!hasRole(EMERGENCY_ADMIN_ROLE, msg.sender) && !hasRole(PAUSER_ROLE, msg.sender)) {\\n revert NotPausingRole();\\n }\\n }\\n\\n /// @dev Modifier to make a function callable only by pausing roles.\\n modifier onlyPausingRoles() {\\n requirePausingRoles();\\n _;\\n }\\n\\n /// @notice Event emitted when an account borrows amount of assets from a floating pool.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of assets that were borrowed.\\n /// @param shares amount of borrow shares assigned to the account.\\n event Borrow(\\n address indexed caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /// @notice Emitted when an account repays amount of assets to a floating pool.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of assets that was repaid.\\n /// @param shares amount of borrow shares that were subtracted from the account's accountability.\\n event Repay(address indexed caller, address indexed borrower, uint256 assets, uint256 shares);\\n\\n /// @notice Emitted when an account deposits an amount of an asset to a certain fixed rate pool,\\n /// collecting fees at the end of the period.\\n /// @param maturity maturity at which the account will be able to collect his deposit + his fee.\\n /// @param caller address which deposited the assets.\\n /// @param owner address that will be able to withdraw the deposited assets.\\n /// @param assets amount of the asset that were deposited.\\n /// @param fee is the extra amount that it will be collected at maturity.\\n event DepositAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed owner,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account withdraws from a fixed rate pool.\\n /// @param maturity maturity where the account withdraw its deposits.\\n /// @param caller address which withdraw the asset.\\n /// @param receiver address which will be collecting the assets.\\n /// @param owner address which had the assets withdrawn.\\n /// @param positionAssets position size reduced.\\n /// @param assets amount of assets withdrawn (can include a discount for early withdraw).\\n event WithdrawAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 positionAssets,\\n uint256 assets\\n );\\n\\n /// @notice Emitted when an account borrows amount of an asset from a certain maturity date.\\n /// @param maturity maturity in which the account will have to repay the loan.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of the asset that were borrowed.\\n /// @param fee extra amount that will need to be paid at maturity.\\n event BorrowAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account repays its borrows after maturity.\\n /// @param maturity maturity where the account repaid its borrowed amounts.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount that was repaid.\\n /// @param positionAssets amount of the debt that was covered in this repayment (penalties could have been repaid).\\n event RepayAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed borrower,\\n uint256 assets,\\n uint256 positionAssets\\n );\\n\\n /// @notice Emitted when an account's position had a liquidation.\\n /// @param receiver address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of the asset that were repaid.\\n /// @param lendersAssets incentive paid to lenders.\\n /// @param seizeMarket address of the asset that were seized by the liquidator.\\n /// @param seizedAssets amount seized of the collateral.\\n event Liquidate(\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 lendersAssets,\\n Market indexed seizeMarket,\\n uint256 seizedAssets\\n );\\n\\n /// @notice Emitted when an account's collateral has been seized.\\n /// @param liquidator address which seized this collateral.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount seized of the collateral.\\n event Seize(address indexed liquidator, address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when an account is cleared from bad debt.\\n /// @param borrower address which was cleared from bad debt.\\n /// @param assets amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\\n event SpreadBadDebt(address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when the backupFeeRate parameter is changed by admin.\\n /// @param backupFeeRate rate charged to the fixed pools to be accrued by the floating depositors.\\n event BackupFeeRateSet(uint256 backupFeeRate);\\n\\n /// @notice Emitted when the damp speeds are changed by admin.\\n /// @param dampSpeedUp represented with 18 decimals.\\n /// @param dampSpeedDown represented with 18 decimals.\\n event DampSpeedSet(uint256 dampSpeedUp, uint256 dampSpeedDown);\\n\\n /// @notice Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\\n /// @param earningsAccumulatorSmoothFactor factor represented with 18 decimals.\\n event EarningsAccumulatorSmoothFactorSet(uint256 earningsAccumulatorSmoothFactor);\\n\\n /// @notice Emitted when the interestRateModel is changed by admin.\\n /// @param interestRateModel new interest rate model to be used to calculate rates.\\n event InterestRateModelSet(InterestRateModel indexed interestRateModel);\\n\\n /// @notice Emitted when the maxFuturePools is changed by admin.\\n /// @param maxFuturePools represented with 0 decimals.\\n event MaxFuturePoolsSet(uint256 maxFuturePools);\\n\\n /// @notice Emitted when the penaltyRate is changed by admin.\\n /// @param penaltyRate penaltyRate percentage per second represented with 18 decimals.\\n event PenaltyRateSet(uint256 penaltyRate);\\n\\n /// @notice Emitted when the reserveFactor is changed by admin.\\n /// @param reserveFactor reserveFactor percentage.\\n event ReserveFactorSet(uint256 reserveFactor);\\n\\n /// @notice Emitted when the treasury variables are changed by admin.\\n /// @param treasury address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate represented with 18 decimals.\\n event TreasurySet(address indexed treasury, uint256 treasuryFeeRate);\\n\\n /// @notice Emitted when the rewardsController is changed by admin.\\n /// @param rewardsController new rewards controller to update account rewards when operating with the Market.\\n event RewardsControllerSet(RewardsController indexed rewardsController);\\n\\n /// @notice Emitted when market state is updated.\\n /// @param timestamp current timestamp.\\n /// @param floatingDepositShares total floating supply shares.\\n /// @param floatingAssets total floating supply assets.\\n /// @param floatingBorrowShares total floating borrow shares.\\n /// @param floatingDebt total floating borrow assets.\\n /// @param earningsAccumulator earnings accumulator.\\n event MarketUpdate(\\n uint256 timestamp,\\n uint256 floatingDepositShares,\\n uint256 floatingAssets,\\n uint256 floatingBorrowShares,\\n uint256 floatingDebt,\\n uint256 earningsAccumulator\\n );\\n\\n /// @notice Emitted when the earnings of a maturity are updated.\\n /// @param timestamp current timestamp.\\n /// @param maturity maturity date where the earnings were updated.\\n /// @param unassignedEarnings pending unassigned earnings.\\n event FixedEarningsUpdate(uint256 timestamp, uint256 indexed maturity, uint256 unassignedEarnings);\\n\\n /// @notice Emitted when accumulator distributes earnings.\\n /// @param timestamp current timestamp.\\n event AccumulatorAccrual(uint256 timestamp);\\n\\n /// @notice Emitted when the floating debt is updated.\\n /// @param timestamp current timestamp.\\n /// @param utilization new floating utilization.\\n event FloatingDebtUpdate(uint256 timestamp, uint256 utilization);\\n\\n /// @notice Emitted when `account` sets the `isFrozen` flag.\\n event Frozen(address indexed account, bool isFrozen);\\n\\n /// @notice Stores fixed deposits and fixed borrows map and floating borrow shares of an account.\\n /// @param fixedDeposits encoded map maturity dates where the account supplied to.\\n /// @param fixedBorrows encoded map maturity dates where the account borrowed from.\\n /// @param floatingBorrowShares number of floating borrow shares assigned to the account.\\n struct Account {\\n uint256 fixedDeposits;\\n uint256 fixedBorrows;\\n uint256 floatingBorrowShares;\\n }\\n}\\n\\nerror Disagreement();\\nerror InsufficientProtocolLiquidity();\\nerror MarketFrozen();\\nerror NotAuditor();\\nerror NotPausingRole();\\nerror SelfLiquidation();\\nerror ZeroBorrow();\\nerror ZeroDeposit();\\nerror ZeroRepay();\\nerror ZeroWithdraw();\\n\",\"keccak256\":\"0xdf09a69098df74396067954be63e073deb5d0b9222cae1a1a3b9c2bf69678429\",\"license\":\"BUSL-1.1\"},\"contracts/RewardsController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { SafeTransferLib } from \\\"solmate/src/utils/SafeTransferLib.sol\\\";\\nimport { ERC20 } from \\\"solmate/src/tokens/ERC20.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract RewardsController is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint64;\\n using FixedPointMathLib for int256;\\n using SafeTransferLib for ERC20;\\n\\n /// @notice Max utilization supported by the sigmoid function not to cause a division by zero (1e18 = WAD).\\n uint256 public constant UTILIZATION_CAP = 1e18 - 1;\\n /// @notice Tracks the reward distribution data for a given market.\\n mapping(Market => Distribution) public distribution;\\n /// @notice Tracks enabled asset rewards.\\n mapping(ERC20 => bool) public rewardEnabled;\\n /// @notice Stores registered asset rewards.\\n ERC20[] public rewardList;\\n /// @notice Stores Markets with distributions set.\\n Market[] public marketList;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev Can only be called once.\\n function initialize() external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded deposit.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleDeposit(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n ops[0] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n update(account, market, dist.availableRewards[r], ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded borrow.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleBorrow(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n (, , uint256 accountFloatingBorrowShares) = market.accounts(account);\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n ERC20 reward = dist.availableRewards[r];\\n ops[0] = AccountOperation({\\n operation: true,\\n balance: accountFloatingBorrowShares + accountFixedBorrowShares(market, account, dist.rewards[reward].start)\\n });\\n update(account, Market(msg.sender), reward, ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Claims all `msg.sender` rewards to the given account.\\n /// @param to The address to send the rewards to.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claimAll(address to) external returns (ERC20[] memory rewardsList, uint256[] memory claimedAmounts) {\\n return claim(allMarketsOperations(), to, rewardList);\\n }\\n\\n /// @notice Claims `msg.sender` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param to The address to send the rewards to.\\n /// @param rewardsList The list of rewards assets to claim.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n address to,\\n ERC20[] memory rewardsList\\n ) public claimSender returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n uint256 rewardsCount = rewardsList.length;\\n claimedAmounts = new uint256[](rewardsCount);\\n address sender = _claimSender;\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n uint256 availableRewards = dist.availableRewardsCount;\\n for (uint128 r = 0; r < availableRewards; ) {\\n update(\\n sender,\\n marketOperation.market,\\n dist.availableRewards[r],\\n accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n sender,\\n dist.rewards[dist.availableRewards[r]].start\\n )\\n );\\n unchecked {\\n ++r;\\n }\\n }\\n for (uint256 r = 0; r < rewardsCount; ) {\\n RewardData storage rewardData = dist.rewards[rewardsList[r]];\\n for (uint256 o = 0; o < marketOperation.operations.length; ) {\\n uint256 rewardAmount = rewardData.accounts[sender][marketOperation.operations[o]].accrued;\\n if (rewardAmount != 0) {\\n claimedAmounts[r] += rewardAmount;\\n rewardData.accounts[sender][marketOperation.operations[o]].accrued = 0;\\n }\\n unchecked {\\n ++o;\\n }\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 r = 0; r < rewardsList.length; ) {\\n uint256 claimedAmount = claimedAmounts[r];\\n if (claimedAmount > 0) {\\n rewardsList[r].safeTransfer(to, claimedAmount);\\n emit Claim(sender, rewardsList[r], to, claimedAmount);\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n return (rewardsList, claimedAmounts);\\n }\\n\\n /// @notice Claims `permit.owner` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param permit Arguments and signature from `permit.owner`.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n ClaimPermit calldata permit\\n ) external permitSender(permit) returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n return claim(marketOps, msg.sender, permit.assets);\\n }\\n\\n /// @notice Gets the configuration of a given distribution.\\n /// @param market The market to get the distribution configuration for.\\n /// @param reward The reward asset.\\n /// @return The distribution configuration.\\n function rewardConfig(Market market, ERC20 reward) external view returns (Config memory) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return\\n Config({\\n market: market,\\n reward: reward,\\n priceFeed: rewardData.priceFeed,\\n start: rewardData.start,\\n distributionPeriod: rewardData.end - rewardData.start,\\n targetDebt: rewardData.targetDebt,\\n totalDistribution: rewardData.totalDistribution,\\n undistributedFactor: rewardData.undistributedFactor,\\n flipSpeed: rewardData.flipSpeed,\\n compensationFactor: rewardData.compensationFactor,\\n transitionFactor: rewardData.transitionFactor,\\n borrowAllocationWeightFactor: rewardData.borrowAllocationWeightFactor,\\n depositAllocationWeightAddend: rewardData.depositAllocationWeightAddend,\\n depositAllocationWeightFactor: rewardData.depositAllocationWeightFactor\\n });\\n }\\n\\n /// @notice Gets the amount of reward assets that are being distributed for a Market.\\n /// @param market Market to get the number of available rewards to distribute.\\n /// @return The amount reward assets set to a Market.\\n function availableRewardsCount(Market market) external view returns (uint256) {\\n return distribution[market].availableRewardsCount;\\n }\\n\\n /// @notice Gets the account data of a given account, Market, operation and reward asset.\\n /// @param account The account to get the operation data from.\\n /// @param market The market in which the operation was made.\\n /// @param operation True if the operation was a borrow, false if it was a deposit.\\n /// @param reward The reward asset.\\n /// @return accrued The accrued amount.\\n /// @return index The account index.\\n function accountOperation(\\n address account,\\n Market market,\\n bool operation,\\n ERC20 reward\\n ) external view returns (uint256, uint256) {\\n Account storage operationAccount = distribution[market].rewards[reward].accounts[account][operation];\\n return (operationAccount.accrued, operationAccount.index);\\n }\\n\\n /// @notice Gets the distribution `start`, `end` and `lastUpdate` value of a given market and reward.\\n /// @param market The market to get the distribution times.\\n /// @param reward The reward asset.\\n /// @return The distribution `start`, `end` and `lastUpdate` time.\\n function distributionTime(Market market, ERC20 reward) external view returns (uint32, uint32, uint32) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.start, rewardData.end, rewardData.lastUpdate);\\n }\\n\\n /// @notice Retrieves all rewards addresses.\\n function allRewards() external view returns (ERC20[] memory) {\\n return rewardList;\\n }\\n\\n /// @notice Gets all market and operations.\\n /// @return marketOps The list of market operations.\\n function allMarketsOperations() public view returns (MarketOperation[] memory marketOps) {\\n Market[] memory markets = marketList;\\n marketOps = new MarketOperation[](markets.length);\\n for (uint256 m = 0; m < markets.length; ) {\\n bool[] memory ops = new bool[](2);\\n ops[0] = true;\\n ops[1] = false;\\n marketOps[m] = MarketOperation({ market: markets[m], operations: ops });\\n unchecked {\\n ++m;\\n }\\n }\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account and reward asset.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function allClaimable(address account, ERC20 reward) external view returns (uint256 unclaimedRewards) {\\n return claimable(allMarketsOperations(), account, reward);\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account, Market operations and reward asset.\\n /// @param marketOps The list of Market operations to get the accrued and pending rewards from.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function claimable(\\n MarketOperation[] memory marketOps,\\n address account,\\n ERC20 reward\\n ) public view returns (uint256 unclaimedRewards) {\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n RewardData storage rewardData = dist.rewards[reward];\\n if (dist.availableRewardsCount == 0) {\\n unchecked {\\n ++i;\\n }\\n continue;\\n }\\n\\n AccountOperation[] memory ops = accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n account,\\n rewardData.start\\n );\\n uint256 balance;\\n for (uint256 o = 0; o < ops.length; ) {\\n unclaimedRewards += rewardData.accounts[account][ops[o].operation].accrued;\\n balance += ops[o].balance;\\n unchecked {\\n ++o;\\n }\\n }\\n if (balance > 0) {\\n unclaimedRewards += pendingRewards(\\n account,\\n reward,\\n AccountMarketOperation({ market: marketOperation.market, accountOperations: ops })\\n );\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Iterates and accrues all rewards for the operations of the given account in the given market.\\n /// @param account The account to accrue the rewards for.\\n /// @param market The Market in which the operations where made.\\n /// @param reward The reward asset.\\n /// @param ops The operations to accrue the rewards for.\\n function update(address account, Market market, ERC20 reward, AccountOperation[] memory ops) internal {\\n uint256 baseUnit = distribution[market].baseUnit;\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n {\\n uint256 lastUpdate = rewardData.lastUpdate;\\n // `lastUpdate` can be greater than `block.timestamp` if distribution is set to start on a future date\\n if (block.timestamp > lastUpdate) {\\n (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) = previewAllocation(\\n rewardData,\\n market,\\n block.timestamp - lastUpdate\\n );\\n if (borrowIndex > type(uint128).max || depositIndex > type(uint128).max) revert IndexOverflow();\\n rewardData.borrowIndex = uint128(borrowIndex);\\n rewardData.depositIndex = uint128(depositIndex);\\n rewardData.lastUpdate = uint32(block.timestamp);\\n rewardData.lastUndistributed = newUndistributed;\\n emit IndexUpdate(market, reward, borrowIndex, depositIndex, newUndistributed, block.timestamp);\\n }\\n }\\n\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 i = 0; i < ops.length; ) {\\n AccountOperation memory op = ops[i];\\n Account storage accountData = operationAccount[op.operation];\\n uint256 accountIndex = accountData.index;\\n uint256 newAccountIndex;\\n if (op.operation) {\\n newAccountIndex = rewardData.borrowIndex;\\n } else {\\n newAccountIndex = rewardData.depositIndex;\\n }\\n if (accountIndex != newAccountIndex) {\\n accountData.index = uint128(newAccountIndex);\\n if (op.balance != 0) {\\n uint256 rewardsAccrued = accountRewards(op.balance, newAccountIndex, accountIndex, baseUnit);\\n accountData.accrued += uint128(rewardsAccrued);\\n emit Accrue(market, reward, account, op.operation, accountIndex, newAccountIndex, rewardsAccrued);\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the equivalent of borrow shares from fixed pool principal borrows of an account.\\n /// @param market The Market to get the fixed borrows from.\\n /// @param account The account that borrowed from fixed pools.\\n /// @return fixedDebt The fixed borrow shares.\\n function accountFixedBorrowShares(\\n Market market,\\n address account,\\n uint32 start\\n ) internal view returns (uint256 fixedDebt) {\\n uint256 firstMaturity = start - (start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 principal, ) = market.fixedBorrowPositions(maturity, account);\\n fixedDebt += principal;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n fixedDebt = market.previewRepay(fixedDebt);\\n }\\n\\n /// @notice Gets the reward indexes and last amount of undistributed rewards for a given market and reward asset.\\n /// @param market The market to get the reward indexes for.\\n /// @param reward The reward asset to get the reward indexes for.\\n /// @return borrowIndex The index for the floating and fixed borrow operation.\\n /// @return depositIndex The index for the floating deposit operation.\\n /// @return lastUndistributed The last amount of undistributed rewards.\\n function rewardIndexes(Market market, ERC20 reward) external view returns (uint256, uint256, uint256) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.borrowIndex, rewardData.depositIndex, rewardData.lastUndistributed);\\n }\\n\\n /// @notice Calculates the rewards not accrued yet for the given operations of a given account and reward asset.\\n /// @param account The account to get the pending rewards for.\\n /// @param reward The reward asset to get the pending rewards for.\\n /// @param ops The operations to get the pending rewards for.\\n /// @return rewards The pending rewards for the given operations.\\n function pendingRewards(\\n address account,\\n ERC20 reward,\\n AccountMarketOperation memory ops\\n ) internal view returns (uint256 rewards) {\\n RewardData storage rewardData = distribution[ops.market].rewards[reward];\\n uint256 baseUnit = distribution[ops.market].baseUnit;\\n uint256 lastUpdate = rewardData.lastUpdate;\\n (uint256 borrowIndex, uint256 depositIndex, ) = previewAllocation(\\n rewardData,\\n ops.market,\\n block.timestamp > lastUpdate ? block.timestamp - lastUpdate : 0\\n );\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 o = 0; o < ops.accountOperations.length; ) {\\n uint256 nextIndex;\\n if (ops.accountOperations[o].operation) {\\n nextIndex = borrowIndex;\\n } else {\\n nextIndex = depositIndex;\\n }\\n\\n rewards += accountRewards(\\n ops.accountOperations[o].balance,\\n nextIndex,\\n operationAccount[ops.accountOperations[o].operation].index,\\n baseUnit\\n );\\n unchecked {\\n ++o;\\n }\\n }\\n }\\n\\n /// @notice Calculates and returns the new amount of rewards given by the difference between the `accountIndex` and\\n /// the `globalIndex`.\\n /// @param balance The account's balance in the operation's pool.\\n /// @param globalIndex Current index of the distribution.\\n /// @param accountIndex Last index stored for the account.\\n /// @param baseUnit One unit of the Market's asset (10**decimals).\\n /// @return The amount of new rewards to be accrued by the account.\\n function accountRewards(\\n uint256 balance,\\n uint256 globalIndex,\\n uint256 accountIndex,\\n uint256 baseUnit\\n ) internal pure returns (uint256) {\\n return balance.mulDivDown(globalIndex - accountIndex, baseUnit);\\n }\\n\\n /// @notice Retrieves projected distribution indexes and new undistributed amount for a given `deltaTime`.\\n /// @param market The market to calculate the indexes for.\\n /// @param reward The reward asset to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n Market market,\\n ERC20 reward,\\n uint256 deltaTime\\n ) external view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n return previewAllocation(distribution[market].rewards[reward], market, deltaTime);\\n }\\n\\n /// @notice Calculates and returns the distribution indexes and new undistributed tokens for a given `rewardData`.\\n /// @param rewardData The distribution's data.\\n /// @param market The market to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n RewardData storage rewardData,\\n Market market,\\n uint256 deltaTime\\n ) internal view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n TotalMarketBalance memory m;\\n m.floatingDebt = market.floatingDebt();\\n m.floatingAssets = market.floatingAssets();\\n TimeVars memory t;\\n t.start = rewardData.start;\\n t.end = rewardData.end;\\n {\\n uint256 firstMaturity = t.start - (t.start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n uint256 fixedDebt;\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 borrowed, ) = market.fixedPoolBalance(maturity);\\n fixedDebt += borrowed;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n m.debt = m.floatingDebt + fixedDebt;\\n m.fixedBorrowShares = market.previewRepay(fixedDebt);\\n }\\n uint256 target;\\n {\\n uint256 targetDebt = rewardData.targetDebt;\\n target = m.debt < targetDebt ? m.debt.divWadDown(targetDebt) : 1e18;\\n }\\n uint256 rewards;\\n {\\n uint256 releaseRate = rewardData.releaseRate;\\n uint256 lastUndistributed = rewardData.lastUndistributed;\\n t.period = t.end - t.start;\\n uint256 distributionFactor = t.period > 0\\n ? rewardData.undistributedFactor.mulDivDown(target, t.period * 1e18)\\n : 0;\\n if (block.timestamp <= t.end) {\\n if (distributionFactor > 0) {\\n uint256 exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n } else if (rewardData.lastUpdate > t.end) {\\n newUndistributed =\\n lastUndistributed -\\n lastUndistributed.mulWadUp(1e18 - uint256((-int256(distributionFactor * deltaTime)).expWad()));\\n rewards = uint256(-(int256(newUndistributed) - int256(lastUndistributed)));\\n } else {\\n uint256 exponential;\\n deltaTime = t.end - rewardData.lastUpdate;\\n if (distributionFactor > 0) {\\n exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n exponential = uint256((-int256(distributionFactor * (block.timestamp - t.end))).expWad());\\n newUndistributed = newUndistributed - newUndistributed.mulWadUp(1e18 - exponential);\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n }\\n if (rewards == 0) return (rewardData.borrowIndex, rewardData.depositIndex, newUndistributed);\\n }\\n {\\n AllocationVars memory v;\\n v.globalUtilization = Math.min(\\n m.floatingAssets != 0\\n ? 1e18 - (m.floatingAssets - m.floatingDebt - market.floatingBackupBorrowed()).divWadDown(m.floatingAssets)\\n : 0,\\n UTILIZATION_CAP\\n );\\n v.transitionFactor = rewardData.transitionFactor;\\n v.flipSpeed = rewardData.flipSpeed;\\n v.borrowAllocationWeightFactor = rewardData.borrowAllocationWeightFactor;\\n v.sigmoid = v.globalUtilization > 0\\n ? uint256(1e18).divWadDown(\\n 1e18 +\\n uint256(\\n (-(v.flipSpeed *\\n (int256(v.globalUtilization.divWadDown(1e18 - v.globalUtilization)).lnWad() -\\n int256(v.transitionFactor.divWadDown(1e18 - v.transitionFactor)).lnWad())) / 1e18).expWad()\\n )\\n )\\n : 0;\\n v.borrowRewardRule = rewardData\\n .compensationFactor\\n .mulWadDown(\\n market\\n .interestRateModel()\\n .floatingRate(m.floatingAssets != 0 ? m.floatingDebt.divWadDown(m.floatingAssets) : 0, v.globalUtilization)\\n .mulWadDown(1e18 - v.globalUtilization.mulWadUp(1e18 - market.treasuryFeeRate())) +\\n v.borrowAllocationWeightFactor\\n )\\n .mulWadDown(1e18 - v.sigmoid);\\n v.depositRewardRule =\\n rewardData.depositAllocationWeightAddend.mulWadDown(1e18 - v.sigmoid) +\\n rewardData.depositAllocationWeightFactor.mulWadDown(v.sigmoid);\\n v.borrowAllocation = v.borrowRewardRule.divWadDown(v.borrowRewardRule + v.depositRewardRule);\\n v.depositAllocation = 1e18 - v.borrowAllocation;\\n {\\n uint256 totalDepositSupply = market.totalSupply();\\n uint256 totalBorrowSupply = market.totalFloatingBorrowShares() + m.fixedBorrowShares;\\n uint256 baseUnit = distribution[market].baseUnit;\\n borrowIndex =\\n rewardData.borrowIndex +\\n (totalBorrowSupply > 0 ? rewards.mulWadDown(v.borrowAllocation).mulDivDown(baseUnit, totalBorrowSupply) : 0);\\n depositIndex =\\n rewardData.depositIndex +\\n (\\n totalDepositSupply > 0\\n ? rewards.mulWadDown(v.depositAllocation).mulDivDown(baseUnit, totalDepositSupply)\\n : 0\\n );\\n }\\n }\\n }\\n\\n /// @notice Get account balances of the given Market operations.\\n /// @param market The address of the Market.\\n /// @param ops List of operations to retrieve account balance.\\n /// @param account Account to get the balance from.\\n /// @param distributionStart Timestamp of the start of the distribution to correctly get the rewarded fixed pools.\\n /// @return accountBalanceOps contains a list with account balance per each operation.\\n function accountBalanceOperations(\\n Market market,\\n bool[] memory ops,\\n address account,\\n uint32 distributionStart\\n ) internal view returns (AccountOperation[] memory accountBalanceOps) {\\n accountBalanceOps = new AccountOperation[](ops.length);\\n for (uint256 i = 0; i < ops.length; ) {\\n if (ops[i]) {\\n (, , uint256 floatingBorrowShares) = market.accounts(account);\\n accountBalanceOps[i] = AccountOperation({\\n operation: true,\\n balance: floatingBorrowShares + accountFixedBorrowShares(market, account, distributionStart)\\n });\\n } else {\\n accountBalanceOps[i] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Withdraws the contract's balance of the given asset to the given address.\\n /// @param asset The asset to withdraw.\\n /// @param to The address to withdraw the asset to.\\n function withdraw(ERC20 asset, address to) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n asset.safeTransfer(to, asset.balanceOf(address(this)));\\n }\\n\\n /// @notice Enables or updates the reward distribution for the given markets and rewards.\\n /// @param configs The configurations to update each RewardData with.\\n function config(Config[] memory configs) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n for (uint256 i = 0; i < configs.length; ) {\\n // transitionFactor cannot be eq or higher than 1e18 to avoid division by zero or underflow\\n if (configs[i].transitionFactor >= 1e18) revert InvalidConfig();\\n // depositAllocationWeightFactor cannot be zero to avoid division by zero when sigmoid equals 1e18\\n if (configs[i].depositAllocationWeightFactor == 0) revert InvalidConfig();\\n\\n Distribution storage dist = distribution[configs[i].market];\\n RewardData storage rewardData = dist.rewards[configs[i].reward];\\n\\n if (dist.baseUnit == 0) {\\n // never initialized before, adding to the list of markets\\n marketList.push(configs[i].market);\\n }\\n if (!rewardEnabled[configs[i].reward]) {\\n // add reward address to global rewards list if still not enabled\\n rewardEnabled[configs[i].reward] = true;\\n rewardList.push(configs[i].reward);\\n }\\n if (rewardData.lastUpdate == 0) {\\n // add reward address to distribution data's available rewards if distribution is new\\n dist.availableRewards[dist.availableRewardsCount++] = configs[i].reward;\\n dist.baseUnit = 10 ** configs[i].market.decimals();\\n // set initial parameters if distribution is new\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n } else {\\n uint32 start = rewardData.start;\\n uint32 end = rewardData.end;\\n // update global indexes before updating distribution values\\n bool[] memory ops = new bool[](1);\\n ops[0] = true;\\n update(\\n address(0),\\n configs[i].market,\\n configs[i].reward,\\n accountBalanceOperations(configs[i].market, ops, address(0), start)\\n );\\n // properly update release rate\\n if (block.timestamp < end) {\\n uint256 released = 0;\\n uint256 elapsed = 0;\\n if (block.timestamp > start) {\\n released =\\n rewardData.lastConfigReleased +\\n rewardData.releaseRate *\\n (block.timestamp - rewardData.lastConfig);\\n elapsed = block.timestamp - start;\\n if (configs[i].totalDistribution <= released || configs[i].distributionPeriod <= elapsed) {\\n revert InvalidConfig();\\n }\\n rewardData.lastConfigReleased = released;\\n }\\n\\n rewardData.releaseRate =\\n (configs[i].totalDistribution - released) /\\n (configs[i].distributionPeriod - elapsed);\\n } else if (rewardData.start != configs[i].start) {\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n rewardData.lastConfigReleased = 0;\\n }\\n }\\n rewardData.lastConfig = uint32(block.timestamp);\\n rewardData.end = rewardData.start + uint32(configs[i].distributionPeriod);\\n rewardData.priceFeed = configs[i].priceFeed;\\n // set emission and distribution parameters\\n rewardData.totalDistribution = configs[i].totalDistribution;\\n rewardData.targetDebt = configs[i].targetDebt;\\n rewardData.undistributedFactor = configs[i].undistributedFactor;\\n rewardData.flipSpeed = configs[i].flipSpeed;\\n rewardData.compensationFactor = configs[i].compensationFactor;\\n rewardData.borrowAllocationWeightFactor = configs[i].borrowAllocationWeightFactor;\\n rewardData.depositAllocationWeightAddend = configs[i].depositAllocationWeightAddend;\\n rewardData.transitionFactor = configs[i].transitionFactor;\\n rewardData.depositAllocationWeightFactor = configs[i].depositAllocationWeightFactor;\\n\\n emit DistributionSet(configs[i].market, configs[i].reward, configs[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n mapping(address => uint256) public nonces;\\n\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(\\\"RewardsController\\\"),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n address private _claimSender;\\n modifier claimSender() {\\n if (_claimSender == address(0)) _claimSender = msg.sender;\\n _;\\n delete _claimSender;\\n }\\n\\n modifier permitSender(ClaimPermit calldata permit) {\\n assert(_claimSender == address(0));\\n assert(permit.deadline >= block.timestamp);\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\\"ClaimPermit(address owner,address spender,address[] assets,uint256 deadline)\\\"),\\n permit.owner,\\n msg.sender,\\n permit.assets,\\n nonces[permit.owner]++,\\n permit.deadline\\n )\\n )\\n )\\n ),\\n permit.v,\\n permit.r,\\n permit.s\\n );\\n assert(recoveredAddress != address(0) && recoveredAddress == permit.owner);\\n _claimSender = permit.owner;\\n }\\n _;\\n assert(_claimSender == address(0));\\n }\\n\\n struct TotalMarketBalance {\\n uint256 debt;\\n uint256 fixedBorrowShares;\\n uint256 floatingDebt;\\n uint256 floatingAssets;\\n }\\n\\n struct TimeVars {\\n uint256 start;\\n uint256 end;\\n uint256 period;\\n }\\n\\n struct AllocationVars {\\n uint256 globalUtilization;\\n uint256 sigmoid;\\n uint256 borrowRewardRule;\\n uint256 depositRewardRule;\\n uint256 borrowAllocation;\\n uint256 depositAllocation;\\n uint256 transitionFactor;\\n int256 flipSpeed;\\n uint256 borrowAllocationWeightFactor;\\n }\\n\\n struct AccountOperation {\\n bool operation;\\n uint256 balance;\\n }\\n\\n struct MarketOperation {\\n Market market;\\n bool[] operations;\\n }\\n\\n struct AccountMarketOperation {\\n Market market;\\n AccountOperation[] accountOperations;\\n }\\n\\n struct Account {\\n // liquidity index of the reward distribution for the account\\n uint128 index;\\n // amount of accrued rewards for the account since last account index update\\n uint128 accrued;\\n }\\n\\n struct Config {\\n Market market;\\n ERC20 reward;\\n IPriceFeed priceFeed;\\n uint32 start;\\n uint256 distributionPeriod;\\n uint256 targetDebt;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n }\\n\\n struct RewardData {\\n // distribution model\\n uint256 targetDebt;\\n uint256 releaseRate;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n uint256 lastUndistributed;\\n // allocation model\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n // liquidity indexes of the reward distribution\\n uint128 borrowIndex;\\n uint128 depositIndex;\\n // distribution timestamps\\n uint32 start;\\n uint32 end;\\n uint32 lastUpdate;\\n // config helpers\\n uint32 lastConfig;\\n uint256 lastConfigReleased;\\n // price feed\\n IPriceFeed priceFeed;\\n // account addresses and their rewards data (index & accrued)\\n mapping(address => mapping(bool => Account)) accounts;\\n }\\n\\n struct Distribution {\\n // reward assets and their data\\n mapping(ERC20 => RewardData) rewards;\\n // list of reward asset addresses for the market\\n mapping(uint128 => ERC20) availableRewards;\\n // count of reward tokens for the market\\n uint8 availableRewardsCount;\\n // base unit of the market\\n uint256 baseUnit;\\n }\\n\\n /// @notice Emitted when rewards are accrued by an account.\\n /// @param market Market where the operation was made.\\n /// @param reward reward asset.\\n /// @param account account that accrued the rewards.\\n /// @param operation true if the operation was a borrow, false if it was a deposit.\\n /// @param accountIndex previous account index.\\n /// @param operationIndex new operation index that is assigned to the `accountIndex`.\\n /// @param rewardsAccrued amount of rewards accrued.\\n event Accrue(\\n Market indexed market,\\n ERC20 indexed reward,\\n address indexed account,\\n bool operation,\\n uint256 accountIndex,\\n uint256 operationIndex,\\n uint256 rewardsAccrued\\n );\\n\\n /// @notice Emitted when rewards are claimed by an account.\\n /// @param account account that claimed the rewards.\\n /// @param reward reward asset.\\n /// @param to account that received the rewards.\\n /// @param amount amount of rewards claimed.\\n event Claim(address indexed account, ERC20 indexed reward, address indexed to, uint256 amount);\\n\\n /// @notice Emitted when a distribution is set.\\n /// @param market Market whose distribution was set.\\n /// @param reward reward asset to be distributed when operating with the Market.\\n /// @param config configuration struct containing the distribution parameters.\\n event DistributionSet(Market indexed market, ERC20 indexed reward, Config config);\\n\\n /// @notice Emitted when the distribution indexes are updated.\\n /// @param market Market of the distribution.\\n /// @param reward reward asset.\\n /// @param borrowIndex index of the borrow operations of a distribution.\\n /// @param depositIndex index of the deposit operations of a distribution.\\n /// @param newUndistributed amount of undistributed rewards.\\n /// @param lastUpdate current timestamp.\\n event IndexUpdate(\\n Market indexed market,\\n ERC20 indexed reward,\\n uint256 borrowIndex,\\n uint256 depositIndex,\\n uint256 newUndistributed,\\n uint256 lastUpdate\\n );\\n}\\n\\nerror IndexOverflow();\\nerror InvalidConfig();\\n\\nstruct ClaimPermit {\\n address owner;\\n ERC20[] assets;\\n uint256 deadline;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n}\\n\",\"keccak256\":\"0xb49f89a25450c5d31384afa51595c7e2cf0b32ea73d6e8fd2b2c937cc60c7b5f\",\"license\":\"BUSL-1.1\"},\"contracts/utils/FixedLib.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\nlibrary FixedLib {\\n using FixedPointMathLib for uint256;\\n\\n uint256 internal constant INTERVAL = 4 weeks;\\n\\n /// @notice Gets the amount of revenue sharing between the backup supplier and the new fixed pool supplier.\\n /// @param pool fixed rate pool.\\n /// @param amount amount being provided by the fixed pool supplier.\\n /// @param backupFeeRate rate charged to the fixed pool supplier to be accrued by the backup supplier.\\n /// @return yield amount to be offered to the fixed pool supplier.\\n /// @return backupFee yield to be accrued by the backup supplier for initially providing the liquidity.\\n function calculateDeposit(\\n Pool memory pool,\\n uint256 amount,\\n uint256 backupFeeRate\\n ) internal pure returns (uint256 yield, uint256 backupFee) {\\n uint256 memBackupSupplied = backupSupplied(pool);\\n if (memBackupSupplied != 0) {\\n yield = pool.unassignedEarnings.mulDivDown(Math.min(amount, memBackupSupplied), memBackupSupplied);\\n backupFee = yield.mulWadDown(backupFeeRate);\\n yield -= backupFee;\\n }\\n }\\n\\n /// @notice Registers an operation to add supply to a fixed rate pool and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be added to the supply.\\n /// @param amount amount to be added to the supply.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function deposit(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.supplied = supplied + amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to reduce borrowed amount from a fixed rate pool\\n /// and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be repaid.\\n /// @param amount amount to be added to the fixed rate pool.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function repay(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.borrowed = borrowed - amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to increase borrowed amount of a fixed rate pool\\n /// and potentially increase backup debt.\\n /// @param pool fixed rate pool where an amount will be borrowed.\\n /// @param amount amount to be borrowed from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function borrow(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 newBorrowed = borrowed + amount;\\n\\n backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, pool.supplied), newBorrowed);\\n pool.borrowed = newBorrowed;\\n }\\n\\n /// @notice Registers an operation to reduce supply from a fixed rate pool and potentially increase backup debt.\\n /// @param pool fixed rate pool where amount will be withdrawn.\\n /// @param amountToDiscount amount to be withdrawn from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function withdraw(Pool storage pool, uint256 amountToDiscount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n uint256 newSupply = supplied - amountToDiscount;\\n\\n backupDebtAddition = Math.min(supplied, borrowed) - Math.min(newSupply, borrowed);\\n pool.supplied = newSupply;\\n }\\n\\n /// @notice Accrues backup earnings from `unassignedEarnings` based on the `lastAccrual` time.\\n /// @param pool fixed rate pool where earnings will be accrued.\\n /// @param maturity maturity date of the pool.\\n /// @return backupEarnings amount of earnings to be distributed to the backup supplier.\\n function accrueEarnings(Pool storage pool, uint256 maturity) internal returns (uint256 backupEarnings) {\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (block.timestamp < maturity) {\\n uint256 unassignedEarnings = pool.unassignedEarnings;\\n pool.lastAccrual = block.timestamp;\\n backupEarnings = unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual);\\n pool.unassignedEarnings = unassignedEarnings - backupEarnings;\\n } else if (lastAccrual == maturity) {\\n backupEarnings = 0;\\n } else {\\n pool.lastAccrual = maturity;\\n backupEarnings = pool.unassignedEarnings;\\n pool.unassignedEarnings = 0;\\n }\\n }\\n\\n /// @notice Calculates the amount that a fixed rate pool borrowed from the backup supplier.\\n /// @param pool fixed rate pool.\\n /// @return amount borrowed from the fixed rate pool.\\n function backupSupplied(Pool memory pool) internal pure returns (uint256) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n return borrowed - Math.min(borrowed, supplied);\\n }\\n\\n /// @notice Modify positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it. Needs for the amount to be less than the principal and the fee\\n /// @param position original position to be scaled.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return scaled position.\\n function scaleProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 principal = amount.mulDivDown(position.principal, position.principal + position.fee);\\n position.principal = principal;\\n position.fee = amount - principal;\\n return position;\\n }\\n\\n /// @notice Reduce positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it.\\n /// @param position original position to be reduced.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return reduced position.\\n function reduceProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 positionAssets = position.principal + position.fee;\\n uint256 newPositionAssets = positionAssets - amount;\\n position.principal = newPositionAssets.mulDivDown(position.principal, positionAssets);\\n position.fee = newPositionAssets - position.principal;\\n return position;\\n }\\n\\n /// @notice Calculates what proportion of earnings would `borrowAmount` represent considering `backupSupplied`.\\n /// @param earnings amount to be distributed.\\n /// @param borrowAmount amount that will be checked if came from the backup supplier or fixed rate pool.\\n /// @return unassignedEarnings earnings to be added to `unassignedEarnings`.\\n /// @return backupEarnings earnings to be distributed to the backup supplier.\\n function distributeEarnings(\\n Pool memory pool,\\n uint256 earnings,\\n uint256 borrowAmount\\n ) internal pure returns (uint256 unassignedEarnings, uint256 backupEarnings) {\\n backupEarnings = borrowAmount == 0\\n ? 0\\n : earnings.mulDivDown(borrowAmount - Math.min(backupSupplied(pool), borrowAmount), borrowAmount);\\n unassignedEarnings = earnings - backupEarnings;\\n }\\n\\n /// @notice Adds a maturity date to the borrow or supply positions of the account.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity the new maturity where the account will borrow or supply to.\\n /// @return updated encoded maturity dates.\\n function setMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n // initialize the maturity with also the 1st bit on the 33th position set\\n if (encoded == 0) return maturity | (1 << 32);\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n if (maturity < baseMaturity) {\\n // if the new maturity is lower than the base, set it as the new base\\n // wipe clean the last 32 bits, shift the amount of `INTERVAL` and set the new value with the 33rd bit set\\n uint256 range = (baseMaturity - maturity) / INTERVAL;\\n if (encoded >> (256 - range) != 0) revert MaturityOverflow();\\n encoded = ((encoded >> 32) << (32 + range));\\n return maturity | encoded | (1 << 32);\\n } else {\\n uint256 range = (maturity - baseMaturity) / INTERVAL;\\n if (range > 223) revert MaturityOverflow();\\n return encoded | (1 << (32 + range));\\n }\\n }\\n\\n /// @notice Remove maturity from account's borrow or supplied positions.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity maturity date to be removed.\\n /// @return updated encoded maturity dates.\\n function clearMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n if (encoded == 0 || encoded == maturity | (1 << 32)) return 0;\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n // if the baseMaturity is the one being cleaned\\n if (maturity == baseMaturity) {\\n // wipe 32 bytes + 1 for the old base flag\\n uint256 packed = encoded >> 33;\\n uint256 range = 1;\\n while ((packed & 1) == 0 && packed != 0) {\\n unchecked {\\n ++range;\\n }\\n packed >>= 1;\\n }\\n encoded = ((encoded >> (32 + range)) << 32);\\n return (maturity + (range * INTERVAL)) | encoded;\\n } else {\\n // otherwise just clear the bit\\n return encoded & ~(1 << (32 + ((maturity - baseMaturity) / INTERVAL)));\\n }\\n }\\n\\n /// @notice Verifies that a maturity is `VALID`, `MATURED`, `NOT_READY` or `INVALID`.\\n /// @dev if expected state doesn't match the calculated one, it reverts with a custom error `UnmatchedPoolState`.\\n /// @param maturity timestamp of the maturity date to be verified.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param requiredState state required by the caller to be verified (see `State` for description).\\n /// @param alternativeState state required by the caller to be verified (see `State` for description).\\n function checkPoolState(uint256 maturity, uint8 maxPools, State requiredState, State alternativeState) internal view {\\n State state;\\n if (maturity % INTERVAL != 0) {\\n state = State.INVALID;\\n } else if (maturity <= block.timestamp) {\\n state = State.MATURED;\\n } else if (maturity > block.timestamp - (block.timestamp % INTERVAL) + (INTERVAL * maxPools)) {\\n state = State.NOT_READY;\\n } else {\\n state = State.VALID;\\n }\\n\\n if (state != requiredState && state != alternativeState) {\\n if (alternativeState == State.NONE) revert UnmatchedPoolState(uint8(state), uint8(requiredState));\\n\\n revert UnmatchedPoolStates(uint8(state), uint8(requiredState), uint8(alternativeState));\\n }\\n }\\n\\n /// @notice Stores the accountability of a fixed interest rate pool.\\n /// @param borrowed total amount borrowed from the pool.\\n /// @param supplied total amount supplied to the pool.\\n /// @param unassignedEarnings total amount of earnings not yet distributed and accrued.\\n /// @param lastAccrual timestamp for the last time that some earnings have been distributed to the backup supplier.\\n struct Pool {\\n uint256 borrowed;\\n uint256 supplied;\\n uint256 unassignedEarnings;\\n uint256 lastAccrual;\\n }\\n\\n /// @notice Stores principal and fee of a borrow or a supply position of a account in a fixed rate pool.\\n /// @param principal amount borrowed or supplied to the fixed rate pool.\\n /// @param fee amount of fees to be repaid or earned at the maturity of the fixed rate pool.\\n struct Position {\\n uint256 principal;\\n uint256 fee;\\n }\\n\\n enum State {\\n NONE,\\n INVALID,\\n MATURED,\\n VALID,\\n NOT_READY\\n }\\n}\\n\\nerror MaturityOverflow();\\nerror UnmatchedPoolState(uint8 state, uint8 requiredState);\\nerror UnmatchedPoolStates(uint8 state, uint8 requiredState, uint8 alternativeState);\\n\",\"keccak256\":\"0xb959d7d8c709c18ad668f58ab3d622b942ef36d72e6268e925e632b56a80ddc1\",\"license\":\"BUSL-1.1\"},\"contracts/utils/IPriceFeed.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\ninterface IPriceFeed {\\n function decimals() external view returns (uint8);\\n\\n function latestAnswer() external view returns (int256);\\n}\\n\",\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\"},\"solmate/src/mixins/ERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\nimport {SafeTransferLib} from \\\"../utils/SafeTransferLib.sol\\\";\\nimport {FixedPointMathLib} from \\\"../utils/FixedPointMathLib.sol\\\";\\n\\n/// @notice Minimal ERC4626 tokenized Vault implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)\\nabstract contract ERC4626 is ERC20 {\\n using SafeTransferLib for ERC20;\\n using FixedPointMathLib for uint256;\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /*//////////////////////////////////////////////////////////////\\n IMMUTABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n ERC20 public immutable asset;\\n\\n constructor(\\n ERC20 _asset,\\n string memory _name,\\n string memory _symbol\\n ) ERC20(_name, _symbol, _asset.decimals()) {\\n asset = _asset;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {\\n // Check for rounding error since we round down in previewDeposit.\\n require((shares = previewDeposit(assets)) != 0, \\\"ZERO_SHARES\\\");\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {\\n assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up.\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 shares) {\\n shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up.\\n\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 assets) {\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n // Check for rounding error since we round down in previewRedeem.\\n require((assets = previewRedeem(shares)) != 0, \\\"ZERO_ASSETS\\\");\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ACCOUNTING LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function totalAssets() public view virtual returns (uint256);\\n\\n function convertToShares(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets());\\n }\\n\\n function convertToAssets(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply);\\n }\\n\\n function previewDeposit(uint256 assets) public view virtual returns (uint256) {\\n return convertToShares(assets);\\n }\\n\\n function previewMint(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply);\\n }\\n\\n function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\\n }\\n\\n function previewRedeem(uint256 shares) public view virtual returns (uint256) {\\n return convertToAssets(shares);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LIMIT LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function maxDeposit(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxMint(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxWithdraw(address owner) public view virtual returns (uint256) {\\n return convertToAssets(balanceOf[owner]);\\n }\\n\\n function maxRedeem(address owner) public view virtual returns (uint256) {\\n return balanceOf[owner];\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL HOOKS LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {}\\n\\n function afterDeposit(uint256 assets, uint256 shares) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\"},\"solmate/src/tokens/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\\nabstract contract ERC20 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n uint8 public immutable decimals;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) public balanceOf;\\n\\n mapping(address => mapping(address => uint256)) public allowance;\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal immutable INITIAL_CHAIN_ID;\\n\\n bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\\n\\n mapping(address => uint256) public nonces;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint8 _decimals\\n ) {\\n name = _name;\\n symbol = _symbol;\\n decimals = _decimals;\\n\\n INITIAL_CHAIN_ID = block.chainid;\\n INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 amount) public virtual returns (bool) {\\n allowance[msg.sender][spender] = amount;\\n\\n emit Approval(msg.sender, spender, amount);\\n\\n return true;\\n }\\n\\n function transfer(address to, uint256 amount) public virtual returns (bool) {\\n balanceOf[msg.sender] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(msg.sender, to, amount);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual returns (bool) {\\n uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\\n\\n balanceOf[from] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n return true;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 LOGIC\\n //////////////////////////////////////////////////////////////*/\\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 ) public virtual {\\n require(deadline >= block.timestamp, \\\"PERMIT_DEADLINE_EXPIRED\\\");\\n\\n // Unchecked because the only math done is incrementing\\n // the owner's nonce which cannot realistically overflow.\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\n \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n ),\\n owner,\\n spender,\\n value,\\n nonces[owner]++,\\n deadline\\n )\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"INVALID_SIGNER\\\");\\n\\n allowance[recoveredAddress][spender] = value;\\n }\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\\n return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\\n }\\n\\n function computeDomainSeparator() internal view virtual returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 amount) internal virtual {\\n totalSupply += amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(address(0), to, amount);\\n }\\n\\n function _burn(address from, uint256 amount) internal virtual {\\n balanceOf[from] -= amount;\\n\\n // Cannot underflow because a user's balance\\n // will never be larger than the total supply.\\n unchecked {\\n totalSupply -= amount;\\n }\\n\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\"},\"solmate/src/utils/FixedPointMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Arithmetic library with operations for fixed-point numbers.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)\\nlibrary FixedPointMathLib {\\n /*//////////////////////////////////////////////////////////////\\n SIMPLIFIED FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.\\n\\n function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.\\n }\\n\\n function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.\\n }\\n\\n function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.\\n }\\n\\n function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.\\n }\\n\\n function powWad(int256 x, int256 y) internal pure returns (int256) {\\n // Equivalent to x to the power of y because x ** y = (e ** ln(x)) ** y = e ** (ln(x) * y)\\n return expWad((lnWad(x) * y) / int256(WAD)); // Using ln(x) means x must be greater than 0.\\n }\\n\\n function expWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n // When the result is < 0.5 we return zero. This happens when\\n // x <= floor(log(0.5e18) * 1e18) ~ -42e18\\n if (x <= -42139678854452767551) return 0;\\n\\n // When the result is > (2**255 - 1) / 1e18 we can not represent it as an\\n // int. This happens when x >= floor(log((2**255 - 1) / 1e18) * 1e18) ~ 135.\\n if (x >= 135305999368893231589) revert(\\\"EXP_OVERFLOW\\\");\\n\\n // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96\\n // for more intermediate precision and a binary basis. This base conversion\\n // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.\\n x = (x << 78) / 5**18;\\n\\n // Reduce range of x to (-\\u00bd ln 2, \\u00bd ln 2) * 2**96 by factoring out powers\\n // of two such that exp(x) = exp(x') * 2**k, where k is an integer.\\n // Solving this gives k = round(x / log(2)) and x' = x - k * log(2).\\n int256 k = ((x << 96) / 54916777467707473351141471128 + 2**95) >> 96;\\n x = x - k * 54916777467707473351141471128;\\n\\n // k is in the range [-61, 195].\\n\\n // Evaluate using a (6, 7)-term rational approximation.\\n // p is made monic, we'll multiply by a scale factor later.\\n int256 y = x + 1346386616545796478920950773328;\\n y = ((y * x) >> 96) + 57155421227552351082224309758442;\\n int256 p = y + x - 94201549194550492254356042504812;\\n p = ((p * y) >> 96) + 28719021644029726153956944680412240;\\n p = p * x + (4385272521454847904659076985693276 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n int256 q = x - 2855989394907223263936484059900;\\n q = ((q * x) >> 96) + 50020603652535783019961831881945;\\n q = ((q * x) >> 96) - 533845033583426703283633433725380;\\n q = ((q * x) >> 96) + 3604857256930695427073651918091429;\\n q = ((q * x) >> 96) - 14423608567350463180887372962807573;\\n q = ((q * x) >> 96) + 26449188498355588339934803723976023;\\n\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial won't have zeros in the domain as all its roots are complex.\\n // No scaling is necessary because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r should be in the range (0.09, 0.25) * 2**96.\\n\\n // We now need to multiply r by:\\n // * the scale factor s = ~6.031367120.\\n // * the 2**k factor from the range reduction.\\n // * the 1e18 / 2**96 factor for base conversion.\\n // We do this all at once, with an intermediate result in 2**213\\n // basis, so the final right shift is always by a positive amount.\\n r = int256((uint256(r) * 3822833074963236453042738258902158003155416615667) >> uint256(195 - k));\\n }\\n }\\n\\n function lnWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n // We want to convert x from 10**18 fixed point to 2**96 fixed point.\\n // We do this by multiplying by 2**96 / 10**18. But since\\n // ln(x * C) = ln(x) + ln(C), we can simply do nothing here\\n // and add ln(2**96 / 10**18) at the end.\\n\\n // Reduce range of x to (1, 2) * 2**96\\n // ln(2^k * x) = k * ln(2) + ln(x)\\n int256 k = int256(log2(uint256(x))) - 96;\\n x <<= uint256(159 - k);\\n x = int256(uint256(x) >> 159);\\n\\n // Evaluate using a (8, 8)-term rational approximation.\\n // p is made monic, we will multiply by a scale factor later.\\n int256 p = x + 3273285459638523848632254066296;\\n p = ((p * x) >> 96) + 24828157081833163892658089445524;\\n p = ((p * x) >> 96) + 43456485725739037958740375743393;\\n p = ((p * x) >> 96) - 11111509109440967052023855526967;\\n p = ((p * x) >> 96) - 45023709667254063763336534515857;\\n p = ((p * x) >> 96) - 14706773417378608786704636184526;\\n p = p * x - (795164235651350426258249787498 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n // q is monic by convention.\\n int256 q = x + 5573035233440673466300451813936;\\n q = ((q * x) >> 96) + 71694874799317883764090561454958;\\n q = ((q * x) >> 96) + 283447036172924575727196451306956;\\n q = ((q * x) >> 96) + 401686690394027663651624208769553;\\n q = ((q * x) >> 96) + 204048457590392012362485061816622;\\n q = ((q * x) >> 96) + 31853899698501571402653359427138;\\n q = ((q * x) >> 96) + 909429971244387300277376558375;\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial is known not to have zeros in the domain.\\n // No scaling required because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r is in the range (0, 0.125) * 2**96\\n\\n // Finalization, we need to:\\n // * multiply by the scale factor s = 5.549\\u2026\\n // * add ln(2**96 / 10**18)\\n // * add k * ln(2)\\n // * multiply by 10**18 / 2**96 = 5**18 >> 78\\n\\n // mul s * 5e18 * 2**96, base is now 5**18 * 2**192\\n r *= 1677202110996718588342820967067443963516166;\\n // add ln(2) * k * 5e18 * 2**192\\n r += 16597577552685614221487285958193947469193820559219878177908093499208371 * k;\\n // add ln(2**96 / 10**18) * 5e18 * 2**192\\n r += 600920179829731861736702779321621459595472258049074101567377883020018308;\\n // base conversion: mul 2**18 / 2**192\\n r >>= 174;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n LOW LEVEL FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function mulDivDown(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // Divide z by the denominator.\\n z := div(z, denominator)\\n }\\n }\\n\\n function mulDivUp(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // First, divide z - 1 by the denominator and add 1.\\n // We allow z - 1 to underflow if z is 0, because we multiply the\\n // end result by 0 if z is zero, ensuring we return 0 if z is zero.\\n z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1))\\n }\\n }\\n\\n function rpow(\\n uint256 x,\\n uint256 n,\\n uint256 scalar\\n ) internal pure returns (uint256 z) {\\n assembly {\\n switch x\\n case 0 {\\n switch n\\n case 0 {\\n // 0 ** 0 = 1\\n z := scalar\\n }\\n default {\\n // 0 ** n = 0\\n z := 0\\n }\\n }\\n default {\\n switch mod(n, 2)\\n case 0 {\\n // If n is even, store scalar in z for now.\\n z := scalar\\n }\\n default {\\n // If n is odd, store x in z for now.\\n z := x\\n }\\n\\n // Shifting right by 1 is like dividing by 2.\\n let half := shr(1, scalar)\\n\\n for {\\n // Shift n right by 1 before looping to halve it.\\n n := shr(1, n)\\n } n {\\n // Shift n right by 1 each iteration to halve it.\\n n := shr(1, n)\\n } {\\n // Revert immediately if x ** 2 would overflow.\\n // Equivalent to iszero(eq(div(xx, x), x)) here.\\n if shr(128, x) {\\n revert(0, 0)\\n }\\n\\n // Store x squared.\\n let xx := mul(x, x)\\n\\n // Round to the nearest number.\\n let xxRound := add(xx, half)\\n\\n // Revert if xx + half overflowed.\\n if lt(xxRound, xx) {\\n revert(0, 0)\\n }\\n\\n // Set x to scaled xxRound.\\n x := div(xxRound, scalar)\\n\\n // If n is even:\\n if mod(n, 2) {\\n // Compute z * x.\\n let zx := mul(z, x)\\n\\n // If z * x overflowed:\\n if iszero(eq(div(zx, x), z)) {\\n // Revert if x is non-zero.\\n if iszero(iszero(x)) {\\n revert(0, 0)\\n }\\n }\\n\\n // Round to the nearest number.\\n let zxRound := add(zx, half)\\n\\n // Revert if zx + half overflowed.\\n if lt(zxRound, zx) {\\n revert(0, 0)\\n }\\n\\n // Return properly scaled zxRound.\\n z := div(zxRound, scalar)\\n }\\n }\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n GENERAL NUMBER UTILITIES\\n //////////////////////////////////////////////////////////////*/\\n\\n function sqrt(uint256 x) internal pure returns (uint256 z) {\\n assembly {\\n let y := x // We start y at x, which will help us make our initial estimate.\\n\\n z := 181 // The \\\"correct\\\" value is 1, but this saves a multiplication later.\\n\\n // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad\\n // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.\\n\\n // We check y >= 2^(k + 8) but shift right by k bits\\n // each branch to ensure that if x >= 256, then y >= 256.\\n if iszero(lt(y, 0x10000000000000000000000000000000000)) {\\n y := shr(128, y)\\n z := shl(64, z)\\n }\\n if iszero(lt(y, 0x1000000000000000000)) {\\n y := shr(64, y)\\n z := shl(32, z)\\n }\\n if iszero(lt(y, 0x10000000000)) {\\n y := shr(32, y)\\n z := shl(16, z)\\n }\\n if iszero(lt(y, 0x1000000)) {\\n y := shr(16, y)\\n z := shl(8, z)\\n }\\n\\n // Goal was to get z*z*y within a small factor of x. More iterations could\\n // get y in a tighter range. Currently, we will have y in [256, 256*2^16).\\n // We ensured y >= 256 so that the relative difference between y and y+1 is small.\\n // That's not possible if x < 256 but we can just verify those cases exhaustively.\\n\\n // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.\\n // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.\\n // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.\\n\\n // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range\\n // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.\\n\\n // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate\\n // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.\\n\\n // There is no overflow risk here since y < 2^136 after the first branch above.\\n z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.\\n\\n // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n\\n // If x+1 is a perfect square, the Babylonian method cycles between\\n // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.\\n // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\\n // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.\\n // If you don't care whether the floor or ceil square root is returned, you can remove this statement.\\n z := sub(z, lt(div(x, z), z))\\n }\\n }\\n\\n function log2(uint256 x) internal pure returns (uint256 r) {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n assembly {\\n r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))\\n r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))\\n r := or(r, shl(5, lt(0xffffffff, shr(r, x))))\\n r := or(r, shl(4, lt(0xffff, shr(r, x))))\\n r := or(r, shl(3, lt(0xff, shr(r, x))))\\n r := or(r, shl(2, lt(0xf, shr(r, x))))\\n r := or(r, shl(1, lt(0x3, shr(r, x))))\\n r := or(r, lt(0x1, shr(r, x)))\\n }\\n }\\n\\n function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := mod(x, y)\\n }\\n }\\n\\n function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := div(x, y)\\n }\\n }\\n\\n /// @dev Will return 0 instead of reverting if y is zero.\\n function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // Add 1 to x * y if x % y > 0.\\n z := add(gt(mod(x, y), 0), div(x, y))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\"},\"solmate/src/utils/SafeTransferLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\n\\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)\\n/// @dev Caution! This library won't check that a token has code, responsibility is delegated to the caller.\\nlibrary SafeTransferLib {\\n /*//////////////////////////////////////////////////////////////\\n ETH OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n bool success;\\n\\n assembly {\\n // Transfer the ETH and store if it succeeded or not.\\n success := call(gas(), to, amount, 0, 0, 0, 0)\\n }\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferFrom(\\n ERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\\n mstore(4, from) // Append the \\\"from\\\" argument.\\n mstore(36, to) // Append the \\\"to\\\" argument.\\n mstore(68, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 100 because that's the total length of our calldata (4 + 32 * 3)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 100, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x095ea7b300000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"APPROVE_FAILED\\\");\\n }\\n}\\n\",\"keccak256\":\"0x5f2e1158c68c1f3d15b80e8a7dd92b6849f873066969562ad33c0abb80e536ff\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x610120604052348015610010575f80fd5b5060405161644938038061644983398101604081905261002f9161021c565b8160405180602001604052805f81525060405180602001604052805f8152508181846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100b09190610254565b60c96100bc8482610313565b5060ca6100c98382610313565b5060ff81166080524660a0526100dd610108565b60c0525050506001600160a01b0392831660e05250508116610100526101016101a1565b5050610444565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c960405161013991906103d2565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f54610100900460ff16156101b4575f80fd5b5f5460ff90811614610203575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610219575f80fd5b50565b5f806040838503121561022d575f80fd5b825161023881610205565b602084015190925061024981610205565b809150509250929050565b5f60208284031215610264575f80fd5b815160ff81168114610274575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102a357607f821691505b6020821081036102c157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561030e57805f5260205f20601f840160051c810160208510156102ec5750805b601f840160051c820191505b8181101561030b575f81556001016102f8565b50505b505050565b81516001600160401b0381111561032c5761032c61027b565b6103408161033a845461028f565b846102c7565b602080601f831160018114610373575f841561035c5750858301515b5f19600386901b1c1916600185901b1785556103ca565b5f85815260208120601f198616915b828110156103a157888601518255948401946001909101908401610382565b50858210156103be57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f8083546103df8161028f565b600182811680156103f7576001811461040c57610438565b60ff1984168752821515830287019450610438565b875f526020805f205f5b8581101561042f5781548a820152908401908201610416565b50505082870194505b50929695505050505050565b60805160a05160c05160e05161010051615f276105225f395f81816108070152818161161c015281816117c001528181611e3e015281816120910152818161220b0152818161257101528181612ed7015281816130800152818161316f015281816136990152614b0501525f81816107ac0152818161168001528181611c2201528181611d160152818161227d01528181612337015281816123fe0152818161286501528181612e59015281816136fd01528181614c92015281816151c001526152d501525f611c8f01525f611c5a01525f6107430152615f275ff3fe608060405234801561000f575f80fd5b5060043610610539575f3560e01c80636e76fc8f116102bf578063b2a02ff111610186578063d5164184116100ef578063e63ab1e9116100a9578063ef8b30f711610084578063ef8b30f714610d5e578063f3fdb15a14610d71578063fb0fc4c314610d84578063fea45d9414610d9b575f80fd5b8063e63ab1e914610d26578063e94b3c2114610d4d578063eee8c9e014610d56575f80fd5b8063d516418414610c92578063d547741f14610ca5578063d6b7494f14610cb8578063d905777e14610cc1578063dd62ed3e14610ce9578063e00b262514610d13575f80fd5b8063c63d75b611610140578063c63d75b614610831578063c6e6f59214610bf7578063ccfd8b1114610c0a578063ce96cb7714610c3b578063d2681a0b14610c4e578063d505accf14610c7f575f80fd5b8063b2a02ff114610b85578063b3d7f6b914610b98578063b460af9414610bab578063ba08765214610bbe578063bee36bb314610bd1578063bf722ca214610be4575f80fd5b806391d1485411610228578063a16a8850116101e2578063a16a885014610b27578063a1bab44714610b3c578063a1e8f02b14610b4f578063a217fddf14610b58578063a9059cbb14610b5f578063acb7081514610b72575f80fd5b806391d1485414610ac0578063926bb63314610ad357806394bf804d14610ae657806395d89b4114610af957806397bce8d014610b01578063a05a091a14610b14575f80fd5b80637ecebe00116102795780637ecebe0014610a6b5780638456cb5914610a8a5780638a1baa4614610a925780638bcd401614610a9b5780638c3cba5a14610aae5780638d0e5f0214610ab7575f80fd5b80636e76fc8f146109c05780636eb9ffeb146109e757806370a0823114610a1357806378007e2314610a325780637ad226dc14610a455780637e932d3214610a58575f80fd5b8063313ce567116104035780634322b7141161036c5780635cc2ef83116103265780635cc2ef83146109225780635e5c06e21461093557806361d027b31461097e57806366601032146109915780636bb65f531461099a5780636e553f65146109ad575f80fd5b80634322b7141461085857806347dffde01461088a5780634914c0081461089d5780634cdad506146108b05780634e7c5059146108c35780635c975abb14610917575f80fd5b80633aa18d6f116103bd5780633aa18d6f146107e65780633c6f317f146107ef5780633ec045a6146108025780633f4ba83a14610829578063402d267d1461083157806342da42bf14610845575f80fd5b8063313ce5671461073e57806333eeb1471461076557806334f7d1f2146107795780633644e5151461078c57806336568abe1461079457806338d52e0f146107a7575f80fd5b806313700101116104a5578063248a9ca31161045f578063248a9ca3146106bb57806325fc07a9146106dd57806328acf2cf146106fc5780632c5dcc771461070f5780632e0af008146107225780632f2ff15d1461072b575f80fd5b8063137001011461065d57806318160ddd146106705780631a5b9e62146106795780631a90f1861461068c5780631d43b30b1461069557806323b872dd146106a8575f80fd5b806307a2d13a116104f657806307a2d13a146105d6578063095ea7b3146105e95780630a28a477146105fc5780630ab69be81461060f5780630e52dbec146106365780630f2b75aa14610655575f80fd5b8063014a296f1461053d57806301e1d1141461056a57806301ffc9a714610580578063022d8af5146105a35780630539fa8c146105b857806306fdde03146105c1575b5f80fd5b61055061054b36600461566a565b610dae565b604080519283526020830191909152015b60405180910390f35b610572610de3565b604051908152602001610561565b61059361058e366004615685565b610e8f565b6040519015158152602001610561565b6105b66105b13660046156c7565b610ec5565b005b61057260d85481565b6105c9610f54565b60405161056191906156e0565b6105726105e4366004615715565b610fe0565b6105936105f736600461572c565b61100c565b61057261060a366004615715565b611077565b61055061061d366004615715565b5f90815260d16020526040902080546001909101549091565b60da546106439060ff1681565b60405160ff9091168152602001610561565b610572611096565b6105b661066b366004615794565b61113b565b61057260cb5481565b6105726106873660046157d3565b6111ac565b61057260d45481565b6105726106a336600461566a565b6116b5565b6105936106b6366004615825565b6117b5565b6105726106c9366004615715565b5f9081526065602052604090206001015490565b6105726106eb366004615715565b5f90815260d1602052604090205490565b6105b661070a366004615873565b611916565b6105b661071d36600461572c565b611962565b61057260dd5481565b6105b661073936600461588c565b6119d2565b6106437f000000000000000000000000000000000000000000000000000000000000000081565b60e35461059390600160a01b900460ff1681565b6105726107873660046158ba565b6119fb565b610572611c57565b6105b66107a236600461588c565b611cb1565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610561565b61057260d95481565b6105726107fd3660046158ba565b611cd3565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6105b6611d46565b61057261083f36600461566a565b505f1990565b6105b6610853366004615715565b611d7b565b60dc5461087290600160801b90046001600160801b031681565b6040516001600160801b039091168152602001610561565b610572610898366004615715565b611dba565b6105726108ab3660046158f8565b611dd8565b6105726108be366004615715565b6122af565b6108f76108d1366004615715565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610561565b60975460ff16610593565b6105b6610930366004615937565b6122b9565b61096361094336600461566a565b60d26020525f908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610561565b60e1546107ce906001600160a01b031681565b61057260e25481565b60e3546107ce906001600160a01b031681565b6105726109bb36600461588c565b612313565b6105727f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da546109fe90600160281b900463ffffffff1681565b60405163ffffffff9091168152602001610561565b610572610a2136600461566a565b60cc6020525f908152604090205481565b610572610a40366004615715565b6123b9565b610550610a5336600461588c565b6123d0565b6105b6610a66366004615957565b61242d565b610572610a7936600461566a565b60ce6020525f908152604090205481565b6105b66124aa565b61057260d55481565b6105b6610aa936600461566a565b6124bc565b61057260d35481565b61057260df5481565b610593610ace36600461588c565b61253c565b6105b6610ae136600461566a565b612566565b610572610af436600461588c565b61284c565b6105c96128e7565b6105b6610b0f366004615976565b6128f4565b610572610b223660046157d3565b612a55565b60da546109fe90610100900463ffffffff1681565b6105b6610b4a366004615715565b612e8d565b61057260d75481565b6105725f81565b610593610b6d36600461572c565b612ecc565b610550610b8036600461588c565b613021565b6105b6610b93366004615825565b61303d565b610572610ba6366004615715565b613051565b610572610bb9366004615a1f565b613067565b610572610bcc366004615a1f565b61316c565b6105b6610bdf36600461566a565b613266565b610572610bf2366004615715565b6132ba565b610572610c05366004615715565b6132d9565b610550610c1836600461588c565b60cf60209081525f92835260408084209091529082529020805460019091015482565b610572610c4936600461566a565b6132f0565b610550610c5c36600461588c565b60d060209081525f92835260408084209091529082529020805460019091015482565b6105b6610c8d366004615a53565b613311565b610572610ca0366004615a1f565b6134d6565b6105b6610cb336600461588c565b61372f565b61057260d65481565b610572610ccf36600461566a565b6001600160a01b03165f90815260cc602052604090205490565b610572610cf7366004615abc565b60cd60209081525f928352604080842090915290825290205481565b6105b6610d213660046156c7565b613753565b6105727f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61057260de5481565b6105726137ab565b610572610d6c366004615715565b61388c565b60db546107ce906001600160a01b031681565b60da546109fe90600160481b900463ffffffff1681565b60dc54610872906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610dd190610fe0565b610dda846116b5565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610e55575f81815260d160205260409020600381015480831115610e4957824210610e2f578160020154610e44565b6002820154610e449042839003838603613896565b860195505b50506224ea0001610dfd565b50610e7860e254670de0b6b3a76400000360d454610e716137ab565b03906138b4565b610e806138c8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610ebf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610ecf8161393e565b610ed7613948565b60dd5f828254610ee79190615b10565b90915550610ef590506139c1565b60dc80546fffffffffffffffffffffffffffffffff19166001600160801b0384169081179091556040519081527f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e906020015b60405180910390a15050565b60c98054610f6190615b23565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8d90615b23565b8015610fd85780601f10610faf57610100808354040283529160200191610fd8565b820191905f5260205f20905b815481529060010190602001808311610fbb57829003601f168201915b505050505081565b60cb545f90801561100357610ffe610ff6610de3565b849083613896565b611005565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110669086815260200190565b60405180910390a350600192915050565b60cb545f90801561100357610ffe8161108e610de3565b859190613a27565b60dd5460de545f9190828183106110af5760d8546110b3565b60d9545b60da549091505f906110ee906110d690600160481b900463ffffffff1642615b5b565b6110e09084615b6e565b6110e990615b85565b613a54565b61110090670de0b6b3a7640000615b9f565b905061110c81856138b4565b61112861112183670de0b6b3a7640000615b5b565b85906138b4565b6111329190615b10565b94505050505090565b5f6111458161393e565b8282604051602001611158929190615bbe565b60405160208183030381529060405260c990816111759190615c39565b508282604051602001611189929190615cf5565b60405160208183030381529060405260ca90816111a69190615c39565b50505050565b5f6111b5613bc7565b6111bd613bd6565b845f036111dd5760405163774257f760e01b815260040160405180910390fd5b60da546111f190879060ff1660035f613c01565b5f86815260d1602052604090206112088188613d9b565b60dd5f8282546112189190615b10565b909155505060e3546001600160a01b0316801561128657604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b15801561126f575f80fd5b505af1158015611281573d5f803e3d5ffd5b505050505b5f6112918389613e19565b90508015611324575f8160d3546112a89190615b10565b90506112ba6112b5613e55565b613f65565b60dc546112f5906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b60dd54906001600160801b03166138b4565b60d4546113029083615b10565b111561132057604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061132f611096565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff1661137d8a600101548b5f015489613fa2565b6113878888613fcf565b611394898960d354613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa1580156113ea573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140e9190615d33565b905061143361142c611420428f615b5b565b83906301e13380613896565b8c906138b4565b935050505080886114449190615b10565b93508684111561146757604051632c1b6b4160e21b815260040160405180910390fd5b6114718585614003565b5f89815260d0602090815260408083206001600160a01b0389168452909152812080549091036114c8576001600160a01b0386165f90815260d26020526040902060018101546114c1908c614079565b6001909101555b5f8061150b6114d685614164565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614190565b91509150815f1461152f5781866002015f8282546115299190615b10565b90915550505b611538816141dc565b60405180604001604052808c855f01546115529190615b10565b81526020018585600101546115679190615b10565b90525f8d815260d0602090815260408083206001600160a01b038d811680865291845293829020855181559483015160019095019490945580513381529182018f905281018790529194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139060600160405180910390a46115ee6139c1565b6115f789614208565b604051637b9d893160e01b81523060048201526001600160a01b0386811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b15801561165d575f80fd5b505af115801561166f573d5f803e3d5ffd5b506116a99250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614256565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b811561178a57600182161561176f575f81815260d0602090815260408083206001600160a01b038a16845290915281206001810154815491929161172a9190615b10565b90506117368188615b10565b96508242111561176c5761175f8561174e8542615b5b565b6117589190615b6e565b82906138b4565b6117699088615b10565b96505b50505b60019190911c906117836224ea0082615b10565b90506116e6565b600284015480156117ab5761179e81611dba565b6117a89087615b10565b95505b5050505050919050565b5f6117be613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530866117f8866122af565b6040518463ffffffff1660e01b815260040161181693929190615d4a565b5f6040518083038186803b15801561182c575f80fd5b505afa15801561183e573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561190257604051630149e46f60e01b81526001600160a01b038681166004830152821690630149e46f906024015f604051808303815f87803b158015611895575f80fd5b505af11580156118a7573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b1580156118eb575f80fd5b505af11580156118fd573d5f803e3d5ffd5b505050505b61190d858585614298565b95945050505050565b5f6119208161393e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610f48565b5f61196c8161393e565b6119776112b5613e55565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119ec8161393e565b6119f68383614372565b505050565b5f611a04613bc7565b611a0c613bd6565b835f03611a2c576040516356316e8760e01b815260040160405180910390fd5b60da54611a4090869060ff1660035f613c01565b5f85815260d16020526040812090611a588288613d9b565b90508060dd5f828254611a6b9190615b10565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f918291611ab0918a906143f7565b9092509050611abf8289615b10565b945086851015611ae257604051632c1b6b4160e21b815260040160405180910390fd5b611aec8489614448565b60d35f828254611afc9190615b5b565b90915550611b0c90508183615b10565b846002015f828254611b1e9190615b5b565b925050819055508060d55f828254611b369190615b10565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611b8b576001600160a01b0387165f90815260d2602052604090208054611b88908c614079565b90555b88815f015f828254611b9d9190615b10565b9250508190555082816001015f828254611bb79190615b10565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611c0c6139c1565b611c158a614208565b611c4a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614478565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611c8c57611c876144be565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611cc5575f80fd5b611ccf8282614557565b5050565b5f611cdc613bc7565b60da54611cf190869060ff1660036002613c01565b611cff8585858560016145bd565b9050611d096139c1565b611d3e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611d708161393e565b611d78614919565b50565b5f611d858161393e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610f48565b60df545f90801561100357610ffe611dd06137ab565b849083613a27565b5f611de1613bc7565b6001600160a01b0384163303611e0a576040516344511af160e01b815260040160405180910390fd5b60405163042dcf6b60e31b81523060048201526001600160a01b0383811660248301528581166044830152606482018590527f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890608401602060405180830381865afa158015611e83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea79190615d33565b9250825f03611ec95760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611f0357508515155b15612010576001821615611ff5575f81421015611f3a57611f278288898b5f6145bd565b9050611f338188615b5b565b9650611fe7565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611f6c9190615b10565b9150505f611f9360d6548542611f829190615b5b565b611f8c9190615b6e565b83906138b4565b611f9d9083615b10565b9050888111611fac5788611fb7565b611fb7898383613896565b9250825f03611fc8575f9850611fe4565b611fd584848b8d5f6145bd565b9250611fe1838a615b5b565b98505b50505b611ff18186615b10565b9450505b60019190911c906120096224ea0082615b10565b9050611ef5565b505083158015906120245750600281015415155b15612059575f612033856132ba565b90508015612057575f6120468288614966565b5090506120538185615b10565b9350505b505b604051636e1b003160e01b81523060048201526001600160a01b0384811660248301528681166044830152606482018490525f9182917f00000000000000000000000000000000000000000000000000000000000000001690636e1b0031906084016040805180830381865afa1580156120d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f99190615d6e565b915091508160d55f82825461210e9190615b10565b9091555050306001600160a01b038616036121345761212f30338984614ac0565b612199565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906121649033908b908690600401615d4a565b5f604051808303815f87803b15801561217b575f80fd5b505af115801561218d573d5f803e3d5ffd5b505050506121996139c1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b0388811660048301527f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906024015f604051808303815f87803b15801561224c575f80fd5b505af115801561225e573d5f803e3d5ffd5b505050506122a5333084876122739190615b10565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614478565b5050509392505050565b5f610ebf82610fe0565b5f6122c38161393e565b6122cb614cb9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61231d8361388c565b9050805f0361232a575f80fd5b61235f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614478565b6123698282614ce4565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8382614d57565b60df545f90801561100357610ffe8161108e6137ab565b5f806123da613bc7565b6123e48484614966565b90925090506123f16139c1565b6124266001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614478565b9250929050565b5f6124378161393e565b60e35460ff600160a01b90910416151582151514611ccf5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee6989061249e90851515815260200190565b60405180910390a25050565b6124b2614db6565b6124ba614e32565b565b5f6124c68161393e565b60db546001600160a01b0316156124e2576124e26112b5613e55565b60db80546001600160a01b0319166001600160a01b0384161790556125056139c1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146125af576040516317568c8f60e21b815260040160405180910390fd5b6125b7613948565b60dd5f8282546125c79190615b10565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b81156127a3576001821615612788575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916126439190615b10565b90508086106127855760e3546001600160a01b031680156126b557604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b15801561269e575f80fd5b505af11580156126b0573d5f803e3d5ffd5b505050505b6126bf8288615b5b565b96506126cb8287615b10565b83545f86815260d1602052604090209197506126e79190614e6f565b60d35f8282546126f79190615b5b565b90915550505f84815260d0602090815260408083206001600160a01b038d16845290915281208181556001908101919091558801546127369085614e92565b600189015560408051838152602081018490526001600160a01b038b1691339187917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a4505b50505b60019190911c9061279c6224ea0082615b10565b90506125ff565b6002850154158015906127c057506127ba846132ba565b93508315155b156127e1575f6127d08588614966565b5090506127dd8185615b10565b9350505b821561283c578260d55f8282546127f89190615b5b565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b6128446139c1565b505050505050565b5f61285683613051565b905061288d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b6128978284614ce4565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8184614d57565b60ca8054610f6190615b23565b5f54610100900460ff161580801561291257505f54600160ff909116105b8061292b5750303b15801561292b57505f5460ff166001145b612933575f80fd5b5f805460ff191660011790558015612954575f805461ff0019166101001790555b61295c614f52565b612964614f64565b60da805468ffffffffffffffff0019166101004263ffffffff1690810268ffffffff0000000000191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129b95f33614372565b6129c38b8b61113b565b6129cc89611916565b6129d588610ec5565b6129de876124bc565b6129e786612e8d565b6129f085611d7b565b6129f984613753565b612a0383836122b9565b8015612a48575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a5e613bc7565b845f03612a7e5760405163b8cb621960e01b815260040160405180910390fd5b60da54612a9390879060ff1660036002613c01565b5f86815260d160205260409020612aaa8188613d9b565b60dd5f828254612aba9190615b10565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612b049190615b10565b871115612b1f5760208101518151612b1c9190615b10565b96505b6040805180820190915281518152602080830151908201525f90612b4f90612b47908a614f7e565b518490614fc4565b60d354612b5c9190615b10565b905060dd5460d45482612b6f9190615b10565b1115612b8d57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612cba575f612ba1611096565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bf58a600101548b5f01548a613fa2565b612bff8989613fcf565b612c0a8a8a8a613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa158015612c60573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c849190615d33565b9050612caf612c96611420428f615b5b565b612ca890670de0b6b3a7640000615b10565b8c90615008565b965050505050612cbe565b8692505b85831015612cdf57604051632c1b6b4160e21b815260040160405180910390fd5b612ce98484614003565b5f80612d35612d00612cfb878c615b5b565b614164565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614190565b9150915081846002015f828254612d4c9190615b10565b90915550612d5b9050816141dc565b612d65838a61501c565b5060208301518351175f03612db8575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612db1908c614e92565b9055612de8565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b60408051338152602081018b90529081018690526001600160a01b0380881691908916908c907fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c9060600160405180910390a4612e436139c1565b612e4c8a614208565b612e806001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614256565b5050505095945050505050565b5f612e978161393e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610f48565b5f612ed5613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612f0f866122af565b6040518463ffffffff1660e01b8152600401612f2d93929190615d4a565b5f6040518083038186803b158015612f43575f80fd5b505afa158015612f55573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561301757604051630149e46f60e01b81523360048201526001600160a01b03821690630149e46f906024015f604051808303815f87803b158015612faa575f80fd5b505af1158015612fbc573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b158015613000575f80fd5b505af1158015613012573d5f803e3d5ffd5b505050505b611d3e848461507a565b5f8061302b613bc7565b6123e4613037856132ba565b84614966565b613045613bc7565b6119f633848484614ac0565b60cb545f90801561100357610ffe611dd0610de3565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db5906130b990309086908990600401615d4a565b5f6040518083038186803b1580156130cf575f80fd5b505afa1580156130e1573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561314f57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613138575f80fd5b505af115801561314a573d5f803e3d5ffd5b505050505b61315a8585856150dd565b91506131646139c1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530846131a7886122af565b6040518463ffffffff1660e01b81526004016131c593929190615d4a565b5f6040518083038186803b1580156131db575f80fd5b505afa1580156131ed573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561325b57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613244575f80fd5b505af1158015613256573d5f803e3d5ffd5b505050505b61315a8585856151e7565b5f6132708161393e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f90801561100357610ffe816132d16137ab565b859190613896565b60cb545f90801561100357610ffe816132d1610de3565b6001600160a01b0381165f90815260cc6020526040812054610ebf90610fe0565b4284101561331d575f80fd5b5f6001613328611c57565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613430573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134665750876001600160a01b0316816001600160a01b0316145b61346e575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134df613bc7565b6134e7613bd6565b6134f18285614003565b60e3546001600160a01b0316801561355a57604051636c912dad60e01b81526001600160a01b038481166004830152821690636c912dad906024015f604051808303815f87803b158015613543575f80fd5b505af1158015613555573d5f803e3d5ffd5b505050505b6135656112b5613e55565b61356e856123b9565b91505f8560d45461357f9190615b10565b60d481905560dc549091506135b0906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b8160d3546135be9190615b10565b11156135dc57604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135ed9190615b10565b90915550506001600160a01b0384165f90815260d260205260408120600201805485929061361c908490615b10565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136746139c1565b604051637b9d893160e01b81523060048201526001600160a01b0385811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b1580156136da575f80fd5b505af11580156136ec573d5f803e3d5ffd5b506137269250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614256565b50509392505050565b5f828152606560205260409020600101546137498161393e565b6119f68383614557565b5f61375d8161393e565b60dc80546001600160801b03908116600160801b918516918202179091556040519081527fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90602001610f48565b60d45460dd5460da545f929190839061387890613871906137d990600160281b900463ffffffff1642615b5b565b60db546301e13380906001600160a01b0316637c21fb1d6137fa888a613fcf565b613807898b60d354613fe7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613846573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061386a9190615d33565b9190613896565b84906138b4565b90506138848184615b10565b935050505090565b5f610ebf826132d9565b8282028115158415858304851417166138ad575f80fd5b0492915050565b5f6110058383670de0b6b3a7640000613896565b60da545f9081906138e490610100900463ffffffff1642615b5b565b9050805f036138f4575f91505090565b60da5461393890829061392490613912906224ea009060ff16615b6e565b60dc546001600160801b0316906138b4565b61392e9084615b10565b60d5549190613896565b91505090565b611d7881336152fc565b5f6139516138c8565b90508060d55f8282546139649190615b5b565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a3e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a6d57505f919050565b680755bf798b4a1bf1e58212613a81575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156124ba575f80fd5b60e354600160a01b900460ff16156124ba5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613c0f6224ea0086615d90565b15613c1c57506001613c6f565b428511613c2b57506002613c6f565b613c3b60ff85166224ea00615b6e565b613c486224ea0042615d90565b613c529042615b5b565b613c5c9190615b10565b851115613c6b57506004613c6f565b5060035b826004811115613c8157613c81615da3565b816004811115613c9357613c93615da3565b14158015613cc35750816004811115613cae57613cae615da3565b816004811115613cc057613cc0615da3565b14155b15613d94575f826004811115613cdb57613cdb615da3565b03613d2f57806004811115613cf257613cf2615da3565b836004811115613d0457613d04615da3565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d4157613d41615da3565b836004811115613d5357613d53615da3565b836004811115613d6557613d65615da3565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d26565b5050505050565b60038201545f9042831115613def5760028401544260038601819055613dd890613dc6908490615b5b565b613dd08487615b5b565b839190613896565b9250613de48382615b5b565b600286015550613e12565b828103613dfe575f9150613e12565b600384018390556002840180545f90915591505b5092915050565b81545f9081613e288483615b10565b9050613e41613e3b838760010154615342565b82615357565b613e4b9082615b5b565b9455509192915050565b60d45460dd545f919082613e698284613fcf565b60da549091505f90613ebb9061112190613e9090600160281b900463ffffffff1642615b5b565b60db5460d3546301e13380916001600160a01b031690637c21fb1d908890613807908b908d90613fe7565b9050613ec78185615b10565b9350613ede60e254826138b490919063ffffffff16565b945084613eeb8285615b10565b613ef59190615b5b565b60dd5560d484905560da805468ffffffff00000000001916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611d785760e154613f89906001600160a01b0316613f848361388c565b614ce4565b8060dd5f828254613f9a9190615b10565b909155505050565b5f8115801590613fb157508383115b613fbb575f611d3e565b611d3e82613fc98686615b5b565b90615365565b5f825f03613fdd575f611005565b6110058284615365565b5f835f03613ff5575f611d3e565b611d3e84613fc98486615b10565b336001600160a01b03831614611ccf576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146119f65761404782611077565b6140519082615b5b565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f0361408f57506401000000008117610ebf565b63ffffffff83168083101561410d575f6224ea006140ad8584615b5b565b6140b79190615db7565b90506140c581610100615b5b565b85901c156140e65760405163293cc41f60e21b815260040160405180910390fd5b6140f1816020615b10565b602086901c901b94508484176401000000001792505050610ebf565b5f6224ea0061411c8386615b5b565b6141269190615db7565b905060df81111561414a5760405163293cc41f60e21b815260040160405180910390fd5b614155816020615b10565b6001901b851792505050610ebf565b5f8061417b60e254846138b490919063ffffffff16565b905061418681613f65565b6110058184615b5b565b5f8082156141c4576141bf6141ad6141a787615379565b85615357565b6141b79085615b5b565b859085613896565b6141c6565b5f5b90506141d28185615b5b565b9150935093915050565b805f036141e65750565b60e254156141f757611d7881613f65565b8060d55f828254613f9a9190615b10565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806111a6575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142f1576142cd8382615b5b565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614318908490615b5b565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615ed28339815191529061435f9087815260200190565b60405180910390a3506001949350505050565b61437c828261253c565b611ccf575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143b33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f61440386615379565b9050801561443f576144246144188683615357565b60408801519083613896565b925061443083856138b4565b915061443c8284615b5b565b92505b50935093915050565b815460018301545f919061445c8482615b10565b600186015561190d61446e8383615357565b6141a79084615b5b565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d94575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144ef9190615dca565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614561828261253c565b15611ccf575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145de5760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906145f68289613d9b565b90508060dd5f8282546146099190615b10565b90915550505f88815260d0602090815260408083206001600160a01b038916845282528083208151808301909252805480835260019091015492820183905290929161465f918b9161465a91615b10565b615357565b6040805180820190915283518152602080850151908201529091505f906146869083614f7e565b5160e3549091506001600160a01b031680156146f357604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b1580156146dc575f80fd5b505af11580156146ee573d5f803e3d5ffd5b505050505b8b42101561479b5787156147935760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147419186906143f7565b90925090506147508183615b10565b886002015f8282546147629190615b5b565b925050819055508060d55f82825461477a9190615b10565b9091555061478a90508286615b5b565b985050506147e2565b8296506147e2565b60d6546147b6906147ac8e42615b5b565b6138719190615b6e565b6147c09084615b10565b96506147cc8388615b5b565b60d55f8282546147dc9190615b10565b90915550505b8987111561480357604051632c1b6b4160e21b815260040160405180910390fd5b61480d8683614e6f565b60d35f82825461481d9190615b5b565b9091555061482d9050848461501c565b5060208401518451175f03614889575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d29092529091209081015461487e908e614e92565b6001909101556148b9565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a461490a8c614208565b50505050505095945050505050565b614921615397565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001613a1d565b60e3545f9081906001600160a01b031680156149d357604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b1580156149bc575f80fd5b505af11580156149ce573d5f803e3d5ffd5b505050505b6149de6112b5613e55565b6001600160a01b0384165f90815260d2602052604090206002810154614a048782615357565b9350614a0f84611dba565b9450845f03614a315760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a429190615b5b565b90915550614a5290508482615b5b565b82600201819055508360df5f828254614a6b9190615b5b565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614ae05760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b0385811660048301523060248301527f0000000000000000000000000000000000000000000000000000000000000000169063e16ee720906044015f6040518083038186803b158015614b45575f80fd5b505afa158015614b57573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bc557604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614bae575f80fd5b505af1158015614bc0573d5f803e3d5ffd5b505050505b5f614bcf83611077565b9050614bdb83826153a5565b614be5848261541e565b60408051848152602081018390526001600160a01b03808716929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c7591815260200190565b60405180910390a3614c856139c1565b6128446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614256565b614cc1611096565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d4d57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614d36575f80fd5b505af1158015614d48573d5f803e3d5ffd5b505050505b6119f68383615485565b614d5f613bc7565b614d67613bd6565b614d6f614cb9565b5f614d78613e55565b90505f614d83613948565b9050614d8f8482615b10565b60dd5f828254614d9f9190615b10565b90915550614dae905082613f65565b6111a66139c1565b614de07f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361253c565b158015614e145750614e127f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361253c565b155b156124ba57604051631d006fdb60e31b815260040160405180910390fd5b614e3a613bc7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861494e3390565b815460018301545f9190614e838483615b5b565b855561190d61446e8383615357565b5f821580614ea65750816401000000001783145b15614eb257505f610ebf565b63ffffffff8316808303614f2057602184901c60015b60018216158015614ed857508115155b15614ee957600191821c9101614ec8565b6020614ef58282615b10565b9690961c90951b9485614f0b6224ea0083615b6e565b614f159087615b10565b179350505050610ebf565b6224ea00614f2e8285615b5b565b614f389190615db7565b614f43906020615b10565b6001901b198416915050610ebf565b5f54610100900460ff166124ba575f80fd5b5f54610100900460ff16614f76575f80fd5b6124ba6154d4565b604080518082019091525f8082526020820152825160208401515f91614fa8916132d19082615b10565b8085529050614fb78184615b5b565b6020850152509192915050565b815460018301545f919082614fd98583615b5b565b9050614fe58184615357565b614fef8385615357565b614ff99190615b5b565b60019096015550929392505050565b5f61100583670de0b6b3a764000084613896565b604080518082019091525f8082526020820152602083015183515f9161504191615b10565b90505f61504e8483615b5b565b855190915061505f90829084613896565b80865261506c9082615b5b565b602086015250929392505050565b335f90815260cc602052604081208054839190839061509a908490615b5b565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615ed2833981519152906110669086815260200190565b5f6150e784611077565b9050336001600160a01b03831614615154576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151525761512e8282615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61515e84826153a5565b615168828261541e565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614256565b5f336001600160a01b03831614615253576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146152515761522d8582615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61525c846122af565b9050805f03615269575f80fd5b61527381856153a5565b61527d828561541e565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614256565b615306828261253c565b611ccf57615313816154f2565b61531e836020615504565b60405160200161532f929190615e53565b6040516020818303038152906040525f80fd5b5f8183116153505781611005565b5090919050565b5f8183106153505781611005565b5f61100583670de0b6b3a764000084613a27565b805160208201515f919061538d8282615357565b611d3e9083615b5b565b60975460ff166124ba575f80fd5b6153ad613bc7565b6153b5614cb9565b6153c06112b5613e55565b5f6153c9613948565b90505f838260dd546153db9190615b10565b6153e59190615b5b565b90508060d45460d3546153f89190615b10565b111561541657604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc602052604081208054839290615445908490615b5b565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615ed2833981519152906020015b60405180910390a35050565b8060cb5f8282546154969190615b10565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615ed28339815191529101615479565b5f54610100900460ff166154e6575f80fd5b6097805460ff19169055565b6060610ebf6001600160a01b03831660145b60605f615512836002615b6e565b61551d906002615b10565b67ffffffffffffffff81111561553557615535615be1565b6040519080825280601f01601f19166020018201604052801561555f576020820181803683370190505b509050600360fc1b815f8151811061557957615579615ea8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106155a7576155a7615ea8565b60200101906001600160f81b03191690815f1a9053505f6155c9846002615b6e565b6155d4906001615b10565b90505b600181111561564b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061560857615608615ea8565b1a60f81b82828151811061561e5761561e615ea8565b60200101906001600160f81b03191690815f1a90535060049490941c9361564481615ebc565b90506155d7565b508315611005575f80fd5b6001600160a01b0381168114611d78575f80fd5b5f6020828403121561567a575f80fd5b813561100581615656565b5f60208284031215615695575f80fd5b81356001600160e01b031981168114611005575f80fd5b80356001600160801b03811681146156c2575f80fd5b919050565b5f602082840312156156d7575f80fd5b611005826156ac565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615725575f80fd5b5035919050565b5f806040838503121561573d575f80fd5b823561574881615656565b946020939093013593505050565b5f8083601f840112615766575f80fd5b50813567ffffffffffffffff81111561577d575f80fd5b602083019150836020828501011115612426575f80fd5b5f80602083850312156157a5575f80fd5b823567ffffffffffffffff8111156157bb575f80fd5b6157c785828601615756565b90969095509350505050565b5f805f805f60a086880312156157e7575f80fd5b853594506020860135935060408601359250606086013561580781615656565b9150608086013561581781615656565b809150509295509295909350565b5f805f60608486031215615837575f80fd5b833561584281615656565b9250602084013561585281615656565b929592945050506040919091013590565b803560ff811681146156c2575f80fd5b5f60208284031215615883575f80fd5b61100582615863565b5f806040838503121561589d575f80fd5b8235915060208301356158af81615656565b809150509250929050565b5f805f80608085870312156158cd575f80fd5b84359350602085013592506040850135915060608501356158ed81615656565b939692955090935050565b5f805f6060848603121561590a575f80fd5b833561591581615656565b925060208401359150604084013561592c81615656565b809150509250925092565b5f8060408385031215615948575f80fd5b50508035926020909101359150565b5f60208284031215615967575f80fd5b81358015158114611005575f80fd5b5f805f805f805f805f806101208b8d031215615990575f80fd5b8a3567ffffffffffffffff8111156159a6575f80fd5b6159b28d828e01615756565b909b5099506159c5905060208c01615863565b97506159d360408c016156ac565b965060608b01356159e381615656565b955060808b0135945060a08b013593506159ff60c08c016156ac565b925060e08b013591506101008b013590509295989b9194979a5092959850565b5f805f60608486031215615a31575f80fd5b833592506020840135615a4381615656565b9150604084013561592c81615656565b5f805f805f805f60e0888a031215615a69575f80fd5b8735615a7481615656565b96506020880135615a8481615656565b95506040880135945060608801359350615aa060808901615863565b925060a0880135915060c0880135905092959891949750929550565b5f8060408385031215615acd575f80fd5b8235615ad881615656565b915060208301356158af81615656565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ebf57610ebf615afc565b600181811c90821680615b3757607f821691505b602082108103615b5557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610ebf57610ebf615afc565b8082028115828204841417610ebf57610ebf615afc565b5f600160ff1b8201615b9957615b99615afc565b505f0390565b8181035f831280158383131683831282161715613e1257613e12615afc565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156119f657805f5260205f20601f840160051c81016020851015615c1a5750805b601f840160051c820191505b81811015613d94575f8155600101615c26565b815167ffffffffffffffff811115615c5357615c53615be1565b615c6781615c618454615b23565b84615bf5565b602080601f831160018114615c9a575f8415615c835750858301515b5f19600386901b1c1916600185901b178555612844565b5f85815260208120601f198616915b82811015615cc857888601518255948401946001909101908401615ca9565b5085821015615ce557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b03828116828216039080821115613e1257613e12615afc565b5f60208284031215615d43575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215615d7f575f80fd5b505080516020909101519092909150565b5f82615d9e57615d9e615ae8565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615dc557615dc5615ae8565b500490565b5f808354615dd781615b23565b60018281168015615def5760018114615e0457615e30565b60ff1984168752821515830287019450615e30565b875f526020805f205f5b85811015615e275781548a820152908401908201615e0e565b50505082870194505b50929695505050505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f615e846017830185615e3c565b7001034b99036b4b9b9b4b733903937b6329607d1b815261190d6011820185615e3c565b634e487b7160e01b5f52603260045260245ffd5b5f81615eca57615eca615afc565b505f19019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204485d3d9d92eeb57ec453d55009460985e73455784e22d97a9959ce3f189d91364736f6c63430008190033", - "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610539575f3560e01c80636e76fc8f116102bf578063b2a02ff111610186578063d5164184116100ef578063e63ab1e9116100a9578063ef8b30f711610084578063ef8b30f714610d5e578063f3fdb15a14610d71578063fb0fc4c314610d84578063fea45d9414610d9b575f80fd5b8063e63ab1e914610d26578063e94b3c2114610d4d578063eee8c9e014610d56575f80fd5b8063d516418414610c92578063d547741f14610ca5578063d6b7494f14610cb8578063d905777e14610cc1578063dd62ed3e14610ce9578063e00b262514610d13575f80fd5b8063c63d75b611610140578063c63d75b614610831578063c6e6f59214610bf7578063ccfd8b1114610c0a578063ce96cb7714610c3b578063d2681a0b14610c4e578063d505accf14610c7f575f80fd5b8063b2a02ff114610b85578063b3d7f6b914610b98578063b460af9414610bab578063ba08765214610bbe578063bee36bb314610bd1578063bf722ca214610be4575f80fd5b806391d1485411610228578063a16a8850116101e2578063a16a885014610b27578063a1bab44714610b3c578063a1e8f02b14610b4f578063a217fddf14610b58578063a9059cbb14610b5f578063acb7081514610b72575f80fd5b806391d1485414610ac0578063926bb63314610ad357806394bf804d14610ae657806395d89b4114610af957806397bce8d014610b01578063a05a091a14610b14575f80fd5b80637ecebe00116102795780637ecebe0014610a6b5780638456cb5914610a8a5780638a1baa4614610a925780638bcd401614610a9b5780638c3cba5a14610aae5780638d0e5f0214610ab7575f80fd5b80636e76fc8f146109c05780636eb9ffeb146109e757806370a0823114610a1357806378007e2314610a325780637ad226dc14610a455780637e932d3214610a58575f80fd5b8063313ce567116104035780634322b7141161036c5780635cc2ef83116103265780635cc2ef83146109225780635e5c06e21461093557806361d027b31461097e57806366601032146109915780636bb65f531461099a5780636e553f65146109ad575f80fd5b80634322b7141461085857806347dffde01461088a5780634914c0081461089d5780634cdad506146108b05780634e7c5059146108c35780635c975abb14610917575f80fd5b80633aa18d6f116103bd5780633aa18d6f146107e65780633c6f317f146107ef5780633ec045a6146108025780633f4ba83a14610829578063402d267d1461083157806342da42bf14610845575f80fd5b8063313ce5671461073e57806333eeb1471461076557806334f7d1f2146107795780633644e5151461078c57806336568abe1461079457806338d52e0f146107a7575f80fd5b806313700101116104a5578063248a9ca31161045f578063248a9ca3146106bb57806325fc07a9146106dd57806328acf2cf146106fc5780632c5dcc771461070f5780632e0af008146107225780632f2ff15d1461072b575f80fd5b8063137001011461065d57806318160ddd146106705780631a5b9e62146106795780631a90f1861461068c5780631d43b30b1461069557806323b872dd146106a8575f80fd5b806307a2d13a116104f657806307a2d13a146105d6578063095ea7b3146105e95780630a28a477146105fc5780630ab69be81461060f5780630e52dbec146106365780630f2b75aa14610655575f80fd5b8063014a296f1461053d57806301e1d1141461056a57806301ffc9a714610580578063022d8af5146105a35780630539fa8c146105b857806306fdde03146105c1575b5f80fd5b61055061054b36600461566a565b610dae565b604080519283526020830191909152015b60405180910390f35b610572610de3565b604051908152602001610561565b61059361058e366004615685565b610e8f565b6040519015158152602001610561565b6105b66105b13660046156c7565b610ec5565b005b61057260d85481565b6105c9610f54565b60405161056191906156e0565b6105726105e4366004615715565b610fe0565b6105936105f736600461572c565b61100c565b61057261060a366004615715565b611077565b61055061061d366004615715565b5f90815260d16020526040902080546001909101549091565b60da546106439060ff1681565b60405160ff9091168152602001610561565b610572611096565b6105b661066b366004615794565b61113b565b61057260cb5481565b6105726106873660046157d3565b6111ac565b61057260d45481565b6105726106a336600461566a565b6116b5565b6105936106b6366004615825565b6117b5565b6105726106c9366004615715565b5f9081526065602052604090206001015490565b6105726106eb366004615715565b5f90815260d1602052604090205490565b6105b661070a366004615873565b611916565b6105b661071d36600461572c565b611962565b61057260dd5481565b6105b661073936600461588c565b6119d2565b6106437f000000000000000000000000000000000000000000000000000000000000000081565b60e35461059390600160a01b900460ff1681565b6105726107873660046158ba565b6119fb565b610572611c57565b6105b66107a236600461588c565b611cb1565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610561565b61057260d95481565b6105726107fd3660046158ba565b611cd3565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6105b6611d46565b61057261083f36600461566a565b505f1990565b6105b6610853366004615715565b611d7b565b60dc5461087290600160801b90046001600160801b031681565b6040516001600160801b039091168152602001610561565b610572610898366004615715565b611dba565b6105726108ab3660046158f8565b611dd8565b6105726108be366004615715565b6122af565b6108f76108d1366004615715565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610561565b60975460ff16610593565b6105b6610930366004615937565b6122b9565b61096361094336600461566a565b60d26020525f908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610561565b60e1546107ce906001600160a01b031681565b61057260e25481565b60e3546107ce906001600160a01b031681565b6105726109bb36600461588c565b612313565b6105727f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da546109fe90600160281b900463ffffffff1681565b60405163ffffffff9091168152602001610561565b610572610a2136600461566a565b60cc6020525f908152604090205481565b610572610a40366004615715565b6123b9565b610550610a5336600461588c565b6123d0565b6105b6610a66366004615957565b61242d565b610572610a7936600461566a565b60ce6020525f908152604090205481565b6105b66124aa565b61057260d55481565b6105b6610aa936600461566a565b6124bc565b61057260d35481565b61057260df5481565b610593610ace36600461588c565b61253c565b6105b6610ae136600461566a565b612566565b610572610af436600461588c565b61284c565b6105c96128e7565b6105b6610b0f366004615976565b6128f4565b610572610b223660046157d3565b612a55565b60da546109fe90610100900463ffffffff1681565b6105b6610b4a366004615715565b612e8d565b61057260d75481565b6105725f81565b610593610b6d36600461572c565b612ecc565b610550610b8036600461588c565b613021565b6105b6610b93366004615825565b61303d565b610572610ba6366004615715565b613051565b610572610bb9366004615a1f565b613067565b610572610bcc366004615a1f565b61316c565b6105b6610bdf36600461566a565b613266565b610572610bf2366004615715565b6132ba565b610572610c05366004615715565b6132d9565b610550610c1836600461588c565b60cf60209081525f92835260408084209091529082529020805460019091015482565b610572610c4936600461566a565b6132f0565b610550610c5c36600461588c565b60d060209081525f92835260408084209091529082529020805460019091015482565b6105b6610c8d366004615a53565b613311565b610572610ca0366004615a1f565b6134d6565b6105b6610cb336600461588c565b61372f565b61057260d65481565b610572610ccf36600461566a565b6001600160a01b03165f90815260cc602052604090205490565b610572610cf7366004615abc565b60cd60209081525f928352604080842090915290825290205481565b6105b6610d213660046156c7565b613753565b6105727f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61057260de5481565b6105726137ab565b610572610d6c366004615715565b61388c565b60db546107ce906001600160a01b031681565b60da546109fe90600160481b900463ffffffff1681565b60dc54610872906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610dd190610fe0565b610dda846116b5565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610e55575f81815260d160205260409020600381015480831115610e4957824210610e2f578160020154610e44565b6002820154610e449042839003838603613896565b860195505b50506224ea0001610dfd565b50610e7860e254670de0b6b3a76400000360d454610e716137ab565b03906138b4565b610e806138c8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610ebf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610ecf8161393e565b610ed7613948565b60dd5f828254610ee79190615b10565b90915550610ef590506139c1565b60dc80546fffffffffffffffffffffffffffffffff19166001600160801b0384169081179091556040519081527f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e906020015b60405180910390a15050565b60c98054610f6190615b23565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8d90615b23565b8015610fd85780601f10610faf57610100808354040283529160200191610fd8565b820191905f5260205f20905b815481529060010190602001808311610fbb57829003601f168201915b505050505081565b60cb545f90801561100357610ffe610ff6610de3565b849083613896565b611005565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110669086815260200190565b60405180910390a350600192915050565b60cb545f90801561100357610ffe8161108e610de3565b859190613a27565b60dd5460de545f9190828183106110af5760d8546110b3565b60d9545b60da549091505f906110ee906110d690600160481b900463ffffffff1642615b5b565b6110e09084615b6e565b6110e990615b85565b613a54565b61110090670de0b6b3a7640000615b9f565b905061110c81856138b4565b61112861112183670de0b6b3a7640000615b5b565b85906138b4565b6111329190615b10565b94505050505090565b5f6111458161393e565b8282604051602001611158929190615bbe565b60405160208183030381529060405260c990816111759190615c39565b508282604051602001611189929190615cf5565b60405160208183030381529060405260ca90816111a69190615c39565b50505050565b5f6111b5613bc7565b6111bd613bd6565b845f036111dd5760405163774257f760e01b815260040160405180910390fd5b60da546111f190879060ff1660035f613c01565b5f86815260d1602052604090206112088188613d9b565b60dd5f8282546112189190615b10565b909155505060e3546001600160a01b0316801561128657604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b15801561126f575f80fd5b505af1158015611281573d5f803e3d5ffd5b505050505b5f6112918389613e19565b90508015611324575f8160d3546112a89190615b10565b90506112ba6112b5613e55565b613f65565b60dc546112f5906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b60dd54906001600160801b03166138b4565b60d4546113029083615b10565b111561132057604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061132f611096565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff1661137d8a600101548b5f015489613fa2565b6113878888613fcf565b611394898960d354613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa1580156113ea573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140e9190615d33565b905061143361142c611420428f615b5b565b83906301e13380613896565b8c906138b4565b935050505080886114449190615b10565b93508684111561146757604051632c1b6b4160e21b815260040160405180910390fd5b6114718585614003565b5f89815260d0602090815260408083206001600160a01b0389168452909152812080549091036114c8576001600160a01b0386165f90815260d26020526040902060018101546114c1908c614079565b6001909101555b5f8061150b6114d685614164565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614190565b91509150815f1461152f5781866002015f8282546115299190615b10565b90915550505b611538816141dc565b60405180604001604052808c855f01546115529190615b10565b81526020018585600101546115679190615b10565b90525f8d815260d0602090815260408083206001600160a01b038d811680865291845293829020855181559483015160019095019490945580513381529182018f905281018790529194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139060600160405180910390a46115ee6139c1565b6115f789614208565b604051637b9d893160e01b81523060048201526001600160a01b0386811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b15801561165d575f80fd5b505af115801561166f573d5f803e3d5ffd5b506116a99250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614256565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b811561178a57600182161561176f575f81815260d0602090815260408083206001600160a01b038a16845290915281206001810154815491929161172a9190615b10565b90506117368188615b10565b96508242111561176c5761175f8561174e8542615b5b565b6117589190615b6e565b82906138b4565b6117699088615b10565b96505b50505b60019190911c906117836224ea0082615b10565b90506116e6565b600284015480156117ab5761179e81611dba565b6117a89087615b10565b95505b5050505050919050565b5f6117be613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530866117f8866122af565b6040518463ffffffff1660e01b815260040161181693929190615d4a565b5f6040518083038186803b15801561182c575f80fd5b505afa15801561183e573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561190257604051630149e46f60e01b81526001600160a01b038681166004830152821690630149e46f906024015f604051808303815f87803b158015611895575f80fd5b505af11580156118a7573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b1580156118eb575f80fd5b505af11580156118fd573d5f803e3d5ffd5b505050505b61190d858585614298565b95945050505050565b5f6119208161393e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610f48565b5f61196c8161393e565b6119776112b5613e55565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119ec8161393e565b6119f68383614372565b505050565b5f611a04613bc7565b611a0c613bd6565b835f03611a2c576040516356316e8760e01b815260040160405180910390fd5b60da54611a4090869060ff1660035f613c01565b5f85815260d16020526040812090611a588288613d9b565b90508060dd5f828254611a6b9190615b10565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f918291611ab0918a906143f7565b9092509050611abf8289615b10565b945086851015611ae257604051632c1b6b4160e21b815260040160405180910390fd5b611aec8489614448565b60d35f828254611afc9190615b5b565b90915550611b0c90508183615b10565b846002015f828254611b1e9190615b5b565b925050819055508060d55f828254611b369190615b10565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611b8b576001600160a01b0387165f90815260d2602052604090208054611b88908c614079565b90555b88815f015f828254611b9d9190615b10565b9250508190555082816001015f828254611bb79190615b10565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611c0c6139c1565b611c158a614208565b611c4a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614478565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611c8c57611c876144be565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611cc5575f80fd5b611ccf8282614557565b5050565b5f611cdc613bc7565b60da54611cf190869060ff1660036002613c01565b611cff8585858560016145bd565b9050611d096139c1565b611d3e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611d708161393e565b611d78614919565b50565b5f611d858161393e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610f48565b60df545f90801561100357610ffe611dd06137ab565b849083613a27565b5f611de1613bc7565b6001600160a01b0384163303611e0a576040516344511af160e01b815260040160405180910390fd5b60405163042dcf6b60e31b81523060048201526001600160a01b0383811660248301528581166044830152606482018590527f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890608401602060405180830381865afa158015611e83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea79190615d33565b9250825f03611ec95760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611f0357508515155b15612010576001821615611ff5575f81421015611f3a57611f278288898b5f6145bd565b9050611f338188615b5b565b9650611fe7565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611f6c9190615b10565b9150505f611f9360d6548542611f829190615b5b565b611f8c9190615b6e565b83906138b4565b611f9d9083615b10565b9050888111611fac5788611fb7565b611fb7898383613896565b9250825f03611fc8575f9850611fe4565b611fd584848b8d5f6145bd565b9250611fe1838a615b5b565b98505b50505b611ff18186615b10565b9450505b60019190911c906120096224ea0082615b10565b9050611ef5565b505083158015906120245750600281015415155b15612059575f612033856132ba565b90508015612057575f6120468288614966565b5090506120538185615b10565b9350505b505b604051636e1b003160e01b81523060048201526001600160a01b0384811660248301528681166044830152606482018490525f9182917f00000000000000000000000000000000000000000000000000000000000000001690636e1b0031906084016040805180830381865afa1580156120d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f99190615d6e565b915091508160d55f82825461210e9190615b10565b9091555050306001600160a01b038616036121345761212f30338984614ac0565b612199565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906121649033908b908690600401615d4a565b5f604051808303815f87803b15801561217b575f80fd5b505af115801561218d573d5f803e3d5ffd5b505050506121996139c1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b0388811660048301527f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906024015f604051808303815f87803b15801561224c575f80fd5b505af115801561225e573d5f803e3d5ffd5b505050506122a5333084876122739190615b10565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614478565b5050509392505050565b5f610ebf82610fe0565b5f6122c38161393e565b6122cb614cb9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61231d8361388c565b9050805f0361232a575f80fd5b61235f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614478565b6123698282614ce4565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8382614d57565b60df545f90801561100357610ffe8161108e6137ab565b5f806123da613bc7565b6123e48484614966565b90925090506123f16139c1565b6124266001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614478565b9250929050565b5f6124378161393e565b60e35460ff600160a01b90910416151582151514611ccf5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee6989061249e90851515815260200190565b60405180910390a25050565b6124b2614db6565b6124ba614e32565b565b5f6124c68161393e565b60db546001600160a01b0316156124e2576124e26112b5613e55565b60db80546001600160a01b0319166001600160a01b0384161790556125056139c1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146125af576040516317568c8f60e21b815260040160405180910390fd5b6125b7613948565b60dd5f8282546125c79190615b10565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b81156127a3576001821615612788575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916126439190615b10565b90508086106127855760e3546001600160a01b031680156126b557604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b15801561269e575f80fd5b505af11580156126b0573d5f803e3d5ffd5b505050505b6126bf8288615b5b565b96506126cb8287615b10565b83545f86815260d1602052604090209197506126e79190614e6f565b60d35f8282546126f79190615b5b565b90915550505f84815260d0602090815260408083206001600160a01b038d16845290915281208181556001908101919091558801546127369085614e92565b600189015560408051838152602081018490526001600160a01b038b1691339187917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a4505b50505b60019190911c9061279c6224ea0082615b10565b90506125ff565b6002850154158015906127c057506127ba846132ba565b93508315155b156127e1575f6127d08588614966565b5090506127dd8185615b10565b9350505b821561283c578260d55f8282546127f89190615b5b565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b6128446139c1565b505050505050565b5f61285683613051565b905061288d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b6128978284614ce4565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8184614d57565b60ca8054610f6190615b23565b5f54610100900460ff161580801561291257505f54600160ff909116105b8061292b5750303b15801561292b57505f5460ff166001145b612933575f80fd5b5f805460ff191660011790558015612954575f805461ff0019166101001790555b61295c614f52565b612964614f64565b60da805468ffffffffffffffff0019166101004263ffffffff1690810268ffffffff0000000000191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129b95f33614372565b6129c38b8b61113b565b6129cc89611916565b6129d588610ec5565b6129de876124bc565b6129e786612e8d565b6129f085611d7b565b6129f984613753565b612a0383836122b9565b8015612a48575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a5e613bc7565b845f03612a7e5760405163b8cb621960e01b815260040160405180910390fd5b60da54612a9390879060ff1660036002613c01565b5f86815260d160205260409020612aaa8188613d9b565b60dd5f828254612aba9190615b10565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612b049190615b10565b871115612b1f5760208101518151612b1c9190615b10565b96505b6040805180820190915281518152602080830151908201525f90612b4f90612b47908a614f7e565b518490614fc4565b60d354612b5c9190615b10565b905060dd5460d45482612b6f9190615b10565b1115612b8d57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612cba575f612ba1611096565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bf58a600101548b5f01548a613fa2565b612bff8989613fcf565b612c0a8a8a8a613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa158015612c60573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c849190615d33565b9050612caf612c96611420428f615b5b565b612ca890670de0b6b3a7640000615b10565b8c90615008565b965050505050612cbe565b8692505b85831015612cdf57604051632c1b6b4160e21b815260040160405180910390fd5b612ce98484614003565b5f80612d35612d00612cfb878c615b5b565b614164565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614190565b9150915081846002015f828254612d4c9190615b10565b90915550612d5b9050816141dc565b612d65838a61501c565b5060208301518351175f03612db8575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612db1908c614e92565b9055612de8565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b60408051338152602081018b90529081018690526001600160a01b0380881691908916908c907fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c9060600160405180910390a4612e436139c1565b612e4c8a614208565b612e806001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614256565b5050505095945050505050565b5f612e978161393e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610f48565b5f612ed5613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612f0f866122af565b6040518463ffffffff1660e01b8152600401612f2d93929190615d4a565b5f6040518083038186803b158015612f43575f80fd5b505afa158015612f55573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561301757604051630149e46f60e01b81523360048201526001600160a01b03821690630149e46f906024015f604051808303815f87803b158015612faa575f80fd5b505af1158015612fbc573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b158015613000575f80fd5b505af1158015613012573d5f803e3d5ffd5b505050505b611d3e848461507a565b5f8061302b613bc7565b6123e4613037856132ba565b84614966565b613045613bc7565b6119f633848484614ac0565b60cb545f90801561100357610ffe611dd0610de3565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db5906130b990309086908990600401615d4a565b5f6040518083038186803b1580156130cf575f80fd5b505afa1580156130e1573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561314f57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613138575f80fd5b505af115801561314a573d5f803e3d5ffd5b505050505b61315a8585856150dd565b91506131646139c1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530846131a7886122af565b6040518463ffffffff1660e01b81526004016131c593929190615d4a565b5f6040518083038186803b1580156131db575f80fd5b505afa1580156131ed573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561325b57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613244575f80fd5b505af1158015613256573d5f803e3d5ffd5b505050505b61315a8585856151e7565b5f6132708161393e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f90801561100357610ffe816132d16137ab565b859190613896565b60cb545f90801561100357610ffe816132d1610de3565b6001600160a01b0381165f90815260cc6020526040812054610ebf90610fe0565b4284101561331d575f80fd5b5f6001613328611c57565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613430573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134665750876001600160a01b0316816001600160a01b0316145b61346e575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134df613bc7565b6134e7613bd6565b6134f18285614003565b60e3546001600160a01b0316801561355a57604051636c912dad60e01b81526001600160a01b038481166004830152821690636c912dad906024015f604051808303815f87803b158015613543575f80fd5b505af1158015613555573d5f803e3d5ffd5b505050505b6135656112b5613e55565b61356e856123b9565b91505f8560d45461357f9190615b10565b60d481905560dc549091506135b0906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b8160d3546135be9190615b10565b11156135dc57604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135ed9190615b10565b90915550506001600160a01b0384165f90815260d260205260408120600201805485929061361c908490615b10565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136746139c1565b604051637b9d893160e01b81523060048201526001600160a01b0385811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b1580156136da575f80fd5b505af11580156136ec573d5f803e3d5ffd5b506137269250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614256565b50509392505050565b5f828152606560205260409020600101546137498161393e565b6119f68383614557565b5f61375d8161393e565b60dc80546001600160801b03908116600160801b918516918202179091556040519081527fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90602001610f48565b60d45460dd5460da545f929190839061387890613871906137d990600160281b900463ffffffff1642615b5b565b60db546301e13380906001600160a01b0316637c21fb1d6137fa888a613fcf565b613807898b60d354613fe7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613846573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061386a9190615d33565b9190613896565b84906138b4565b90506138848184615b10565b935050505090565b5f610ebf826132d9565b8282028115158415858304851417166138ad575f80fd5b0492915050565b5f6110058383670de0b6b3a7640000613896565b60da545f9081906138e490610100900463ffffffff1642615b5b565b9050805f036138f4575f91505090565b60da5461393890829061392490613912906224ea009060ff16615b6e565b60dc546001600160801b0316906138b4565b61392e9084615b10565b60d5549190613896565b91505090565b611d7881336152fc565b5f6139516138c8565b90508060d55f8282546139649190615b5b565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a3e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a6d57505f919050565b680755bf798b4a1bf1e58212613a81575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156124ba575f80fd5b60e354600160a01b900460ff16156124ba5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613c0f6224ea0086615d90565b15613c1c57506001613c6f565b428511613c2b57506002613c6f565b613c3b60ff85166224ea00615b6e565b613c486224ea0042615d90565b613c529042615b5b565b613c5c9190615b10565b851115613c6b57506004613c6f565b5060035b826004811115613c8157613c81615da3565b816004811115613c9357613c93615da3565b14158015613cc35750816004811115613cae57613cae615da3565b816004811115613cc057613cc0615da3565b14155b15613d94575f826004811115613cdb57613cdb615da3565b03613d2f57806004811115613cf257613cf2615da3565b836004811115613d0457613d04615da3565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d4157613d41615da3565b836004811115613d5357613d53615da3565b836004811115613d6557613d65615da3565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d26565b5050505050565b60038201545f9042831115613def5760028401544260038601819055613dd890613dc6908490615b5b565b613dd08487615b5b565b839190613896565b9250613de48382615b5b565b600286015550613e12565b828103613dfe575f9150613e12565b600384018390556002840180545f90915591505b5092915050565b81545f9081613e288483615b10565b9050613e41613e3b838760010154615342565b82615357565b613e4b9082615b5b565b9455509192915050565b60d45460dd545f919082613e698284613fcf565b60da549091505f90613ebb9061112190613e9090600160281b900463ffffffff1642615b5b565b60db5460d3546301e13380916001600160a01b031690637c21fb1d908890613807908b908d90613fe7565b9050613ec78185615b10565b9350613ede60e254826138b490919063ffffffff16565b945084613eeb8285615b10565b613ef59190615b5b565b60dd5560d484905560da805468ffffffff00000000001916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611d785760e154613f89906001600160a01b0316613f848361388c565b614ce4565b8060dd5f828254613f9a9190615b10565b909155505050565b5f8115801590613fb157508383115b613fbb575f611d3e565b611d3e82613fc98686615b5b565b90615365565b5f825f03613fdd575f611005565b6110058284615365565b5f835f03613ff5575f611d3e565b611d3e84613fc98486615b10565b336001600160a01b03831614611ccf576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146119f65761404782611077565b6140519082615b5b565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f0361408f57506401000000008117610ebf565b63ffffffff83168083101561410d575f6224ea006140ad8584615b5b565b6140b79190615db7565b90506140c581610100615b5b565b85901c156140e65760405163293cc41f60e21b815260040160405180910390fd5b6140f1816020615b10565b602086901c901b94508484176401000000001792505050610ebf565b5f6224ea0061411c8386615b5b565b6141269190615db7565b905060df81111561414a5760405163293cc41f60e21b815260040160405180910390fd5b614155816020615b10565b6001901b851792505050610ebf565b5f8061417b60e254846138b490919063ffffffff16565b905061418681613f65565b6110058184615b5b565b5f8082156141c4576141bf6141ad6141a787615379565b85615357565b6141b79085615b5b565b859085613896565b6141c6565b5f5b90506141d28185615b5b565b9150935093915050565b805f036141e65750565b60e254156141f757611d7881613f65565b8060d55f828254613f9a9190615b10565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806111a6575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142f1576142cd8382615b5b565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614318908490615b5b565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615ed28339815191529061435f9087815260200190565b60405180910390a3506001949350505050565b61437c828261253c565b611ccf575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143b33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f61440386615379565b9050801561443f576144246144188683615357565b60408801519083613896565b925061443083856138b4565b915061443c8284615b5b565b92505b50935093915050565b815460018301545f919061445c8482615b10565b600186015561190d61446e8383615357565b6141a79084615b5b565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d94575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144ef9190615dca565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614561828261253c565b15611ccf575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145de5760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906145f68289613d9b565b90508060dd5f8282546146099190615b10565b90915550505f88815260d0602090815260408083206001600160a01b038916845282528083208151808301909252805480835260019091015492820183905290929161465f918b9161465a91615b10565b615357565b6040805180820190915283518152602080850151908201529091505f906146869083614f7e565b5160e3549091506001600160a01b031680156146f357604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b1580156146dc575f80fd5b505af11580156146ee573d5f803e3d5ffd5b505050505b8b42101561479b5787156147935760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147419186906143f7565b90925090506147508183615b10565b886002015f8282546147629190615b5b565b925050819055508060d55f82825461477a9190615b10565b9091555061478a90508286615b5b565b985050506147e2565b8296506147e2565b60d6546147b6906147ac8e42615b5b565b6138719190615b6e565b6147c09084615b10565b96506147cc8388615b5b565b60d55f8282546147dc9190615b10565b90915550505b8987111561480357604051632c1b6b4160e21b815260040160405180910390fd5b61480d8683614e6f565b60d35f82825461481d9190615b5b565b9091555061482d9050848461501c565b5060208401518451175f03614889575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d29092529091209081015461487e908e614e92565b6001909101556148b9565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a461490a8c614208565b50505050505095945050505050565b614921615397565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001613a1d565b60e3545f9081906001600160a01b031680156149d357604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b1580156149bc575f80fd5b505af11580156149ce573d5f803e3d5ffd5b505050505b6149de6112b5613e55565b6001600160a01b0384165f90815260d2602052604090206002810154614a048782615357565b9350614a0f84611dba565b9450845f03614a315760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a429190615b5b565b90915550614a5290508482615b5b565b82600201819055508360df5f828254614a6b9190615b5b565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614ae05760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b0385811660048301523060248301527f0000000000000000000000000000000000000000000000000000000000000000169063e16ee720906044015f6040518083038186803b158015614b45575f80fd5b505afa158015614b57573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bc557604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614bae575f80fd5b505af1158015614bc0573d5f803e3d5ffd5b505050505b5f614bcf83611077565b9050614bdb83826153a5565b614be5848261541e565b60408051848152602081018390526001600160a01b03808716929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c7591815260200190565b60405180910390a3614c856139c1565b6128446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614256565b614cc1611096565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d4d57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614d36575f80fd5b505af1158015614d48573d5f803e3d5ffd5b505050505b6119f68383615485565b614d5f613bc7565b614d67613bd6565b614d6f614cb9565b5f614d78613e55565b90505f614d83613948565b9050614d8f8482615b10565b60dd5f828254614d9f9190615b10565b90915550614dae905082613f65565b6111a66139c1565b614de07f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361253c565b158015614e145750614e127f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361253c565b155b156124ba57604051631d006fdb60e31b815260040160405180910390fd5b614e3a613bc7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861494e3390565b815460018301545f9190614e838483615b5b565b855561190d61446e8383615357565b5f821580614ea65750816401000000001783145b15614eb257505f610ebf565b63ffffffff8316808303614f2057602184901c60015b60018216158015614ed857508115155b15614ee957600191821c9101614ec8565b6020614ef58282615b10565b9690961c90951b9485614f0b6224ea0083615b6e565b614f159087615b10565b179350505050610ebf565b6224ea00614f2e8285615b5b565b614f389190615db7565b614f43906020615b10565b6001901b198416915050610ebf565b5f54610100900460ff166124ba575f80fd5b5f54610100900460ff16614f76575f80fd5b6124ba6154d4565b604080518082019091525f8082526020820152825160208401515f91614fa8916132d19082615b10565b8085529050614fb78184615b5b565b6020850152509192915050565b815460018301545f919082614fd98583615b5b565b9050614fe58184615357565b614fef8385615357565b614ff99190615b5b565b60019096015550929392505050565b5f61100583670de0b6b3a764000084613896565b604080518082019091525f8082526020820152602083015183515f9161504191615b10565b90505f61504e8483615b5b565b855190915061505f90829084613896565b80865261506c9082615b5b565b602086015250929392505050565b335f90815260cc602052604081208054839190839061509a908490615b5b565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615ed2833981519152906110669086815260200190565b5f6150e784611077565b9050336001600160a01b03831614615154576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151525761512e8282615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61515e84826153a5565b615168828261541e565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614256565b5f336001600160a01b03831614615253576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146152515761522d8582615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61525c846122af565b9050805f03615269575f80fd5b61527381856153a5565b61527d828561541e565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614256565b615306828261253c565b611ccf57615313816154f2565b61531e836020615504565b60405160200161532f929190615e53565b6040516020818303038152906040525f80fd5b5f8183116153505781611005565b5090919050565b5f8183106153505781611005565b5f61100583670de0b6b3a764000084613a27565b805160208201515f919061538d8282615357565b611d3e9083615b5b565b60975460ff166124ba575f80fd5b6153ad613bc7565b6153b5614cb9565b6153c06112b5613e55565b5f6153c9613948565b90505f838260dd546153db9190615b10565b6153e59190615b5b565b90508060d45460d3546153f89190615b10565b111561541657604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc602052604081208054839290615445908490615b5b565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615ed2833981519152906020015b60405180910390a35050565b8060cb5f8282546154969190615b10565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615ed28339815191529101615479565b5f54610100900460ff166154e6575f80fd5b6097805460ff19169055565b6060610ebf6001600160a01b03831660145b60605f615512836002615b6e565b61551d906002615b10565b67ffffffffffffffff81111561553557615535615be1565b6040519080825280601f01601f19166020018201604052801561555f576020820181803683370190505b509050600360fc1b815f8151811061557957615579615ea8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106155a7576155a7615ea8565b60200101906001600160f81b03191690815f1a9053505f6155c9846002615b6e565b6155d4906001615b10565b90505b600181111561564b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061560857615608615ea8565b1a60f81b82828151811061561e5761561e615ea8565b60200101906001600160f81b03191690815f1a90535060049490941c9361564481615ebc565b90506155d7565b508315611005575f80fd5b6001600160a01b0381168114611d78575f80fd5b5f6020828403121561567a575f80fd5b813561100581615656565b5f60208284031215615695575f80fd5b81356001600160e01b031981168114611005575f80fd5b80356001600160801b03811681146156c2575f80fd5b919050565b5f602082840312156156d7575f80fd5b611005826156ac565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615725575f80fd5b5035919050565b5f806040838503121561573d575f80fd5b823561574881615656565b946020939093013593505050565b5f8083601f840112615766575f80fd5b50813567ffffffffffffffff81111561577d575f80fd5b602083019150836020828501011115612426575f80fd5b5f80602083850312156157a5575f80fd5b823567ffffffffffffffff8111156157bb575f80fd5b6157c785828601615756565b90969095509350505050565b5f805f805f60a086880312156157e7575f80fd5b853594506020860135935060408601359250606086013561580781615656565b9150608086013561581781615656565b809150509295509295909350565b5f805f60608486031215615837575f80fd5b833561584281615656565b9250602084013561585281615656565b929592945050506040919091013590565b803560ff811681146156c2575f80fd5b5f60208284031215615883575f80fd5b61100582615863565b5f806040838503121561589d575f80fd5b8235915060208301356158af81615656565b809150509250929050565b5f805f80608085870312156158cd575f80fd5b84359350602085013592506040850135915060608501356158ed81615656565b939692955090935050565b5f805f6060848603121561590a575f80fd5b833561591581615656565b925060208401359150604084013561592c81615656565b809150509250925092565b5f8060408385031215615948575f80fd5b50508035926020909101359150565b5f60208284031215615967575f80fd5b81358015158114611005575f80fd5b5f805f805f805f805f806101208b8d031215615990575f80fd5b8a3567ffffffffffffffff8111156159a6575f80fd5b6159b28d828e01615756565b909b5099506159c5905060208c01615863565b97506159d360408c016156ac565b965060608b01356159e381615656565b955060808b0135945060a08b013593506159ff60c08c016156ac565b925060e08b013591506101008b013590509295989b9194979a5092959850565b5f805f60608486031215615a31575f80fd5b833592506020840135615a4381615656565b9150604084013561592c81615656565b5f805f805f805f60e0888a031215615a69575f80fd5b8735615a7481615656565b96506020880135615a8481615656565b95506040880135945060608801359350615aa060808901615863565b925060a0880135915060c0880135905092959891949750929550565b5f8060408385031215615acd575f80fd5b8235615ad881615656565b915060208301356158af81615656565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ebf57610ebf615afc565b600181811c90821680615b3757607f821691505b602082108103615b5557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610ebf57610ebf615afc565b8082028115828204841417610ebf57610ebf615afc565b5f600160ff1b8201615b9957615b99615afc565b505f0390565b8181035f831280158383131683831282161715613e1257613e12615afc565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156119f657805f5260205f20601f840160051c81016020851015615c1a5750805b601f840160051c820191505b81811015613d94575f8155600101615c26565b815167ffffffffffffffff811115615c5357615c53615be1565b615c6781615c618454615b23565b84615bf5565b602080601f831160018114615c9a575f8415615c835750858301515b5f19600386901b1c1916600185901b178555612844565b5f85815260208120601f198616915b82811015615cc857888601518255948401946001909101908401615ca9565b5085821015615ce557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b03828116828216039080821115613e1257613e12615afc565b5f60208284031215615d43575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215615d7f575f80fd5b505080516020909101519092909150565b5f82615d9e57615d9e615ae8565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615dc557615dc5615ae8565b500490565b5f808354615dd781615b23565b60018281168015615def5760018114615e0457615e30565b60ff1984168752821515830287019450615e30565b875f526020805f205f5b85811015615e275781548a820152908401908201615e0e565b50505082870194505b50929695505050505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f615e846017830185615e3c565b7001034b99036b4b9b9b4b733903937b6329607d1b815261190d6011820185615e3c565b634e487b7160e01b5f52603260045260245ffd5b5f81615eca57615eca615afc565b505f19019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204485d3d9d92eeb57ec453d55009460985e73455784e22d97a9959ce3f189d91364736f6c63430008190033", - "devdoc": { - "events": { - "AccumulatorAccrual(uint256)": { - "params": { - "timestamp": "current timestamp." - } - }, - "BackupFeeRateSet(uint256)": { - "params": { - "backupFeeRate": "rate charged to the fixed pools to be accrued by the floating depositors." - } - }, - "Borrow(address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets that were borrowed.", - "borrower": "address which will be repaying the borrowed assets.", - "caller": "address which borrowed the asset.", - "receiver": "address that received the borrowed assets.", - "shares": "amount of borrow shares assigned to the account." - } - }, - "BorrowAtMaturity(uint256,address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of the asset that were borrowed.", - "borrower": "address which will be repaying the borrowed assets.", - "caller": "address which borrowed the asset.", - "fee": "extra amount that will need to be paid at maturity.", - "maturity": "maturity in which the account will have to repay the loan.", - "receiver": "address that received the borrowed assets." - } - }, - "DampSpeedSet(uint256,uint256)": { - "params": { - "dampSpeedDown": "represented with 18 decimals.", - "dampSpeedUp": "represented with 18 decimals." - } - }, - "DepositAtMaturity(uint256,address,address,uint256,uint256)": { - "params": { - "assets": "amount of the asset that were deposited.", - "caller": "address which deposited the assets.", - "fee": "is the extra amount that it will be collected at maturity.", - "maturity": "maturity at which the account will be able to collect his deposit + his fee.", - "owner": "address that will be able to withdraw the deposited assets." - } - }, - "EarningsAccumulatorSmoothFactorSet(uint256)": { - "params": { - "earningsAccumulatorSmoothFactor": "factor represented with 18 decimals." - } - }, - "FixedEarningsUpdate(uint256,uint256,uint256)": { - "params": { - "maturity": "maturity date where the earnings were updated.", - "timestamp": "current timestamp.", - "unassignedEarnings": "pending unassigned earnings." - } - }, - "FloatingDebtUpdate(uint256,uint256)": { - "params": { - "timestamp": "current timestamp.", - "utilization": "new floating utilization." - } - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "InterestRateModelSet(address)": { - "params": { - "interestRateModel": "new interest rate model to be used to calculate rates." - } - }, - "Liquidate(address,address,uint256,uint256,address,uint256)": { - "params": { - "assets": "amount of the asset that were repaid.", - "borrower": "address which had the original debt.", - "lendersAssets": "incentive paid to lenders.", - "receiver": "address which repaid the previously borrowed amount.", - "seizeMarket": "address of the asset that were seized by the liquidator.", - "seizedAssets": "amount seized of the collateral." - } - }, - "MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)": { - "params": { - "earningsAccumulator": "earnings accumulator.", - "floatingAssets": "total floating supply assets.", - "floatingBorrowShares": "total floating borrow shares.", - "floatingDebt": "total floating borrow assets.", - "floatingDepositShares": "total floating supply shares.", - "timestamp": "current timestamp." - } - }, - "MaxFuturePoolsSet(uint256)": { - "params": { - "maxFuturePools": "represented with 0 decimals." - } - }, - "Paused(address)": { - "details": "Emitted when the pause is triggered by `account`." - }, - "PenaltyRateSet(uint256)": { - "params": { - "penaltyRate": "penaltyRate percentage per second represented with 18 decimals." - } - }, - "Repay(address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets that was repaid.", - "borrower": "address which had the original debt.", - "caller": "address which repaid the previously borrowed amount.", - "shares": "amount of borrow shares that were subtracted from the account's accountability." - } - }, - "RepayAtMaturity(uint256,address,address,uint256,uint256)": { - "params": { - "assets": "amount that was repaid.", - "borrower": "address which had the original debt.", - "caller": "address which repaid the previously borrowed amount.", - "maturity": "maturity where the account repaid its borrowed amounts.", - "positionAssets": "amount of the debt that was covered in this repayment (penalties could have been repaid)." - } - }, - "ReserveFactorSet(uint256)": { - "params": { - "reserveFactor": "reserveFactor percentage." - } - }, - "RewardsControllerSet(address)": { - "params": { - "rewardsController": "new rewards controller to update account rewards when operating with the Market." - } - }, - "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`)" - }, - "Seize(address,address,uint256)": { - "params": { - "assets": "amount seized of the collateral.", - "borrower": "address which had the original debt.", - "liquidator": "address which seized this collateral." - } - }, - "SpreadBadDebt(address,uint256)": { - "params": { - "assets": "amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.", - "borrower": "address which was cleared from bad debt." - } - }, - "TreasurySet(address,uint256)": { - "params": { - "treasury": "address of the treasury that will receive the minted eTokens.", - "treasuryFeeRate": "represented with 18 decimals." - } - }, - "Unpaused(address)": { - "details": "Emitted when the pause is lifted by `account`." - }, - "WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets withdrawn (can include a discount for early withdraw).", - "caller": "address which withdraw the asset.", - "maturity": "maturity where the account withdraw its deposits.", - "owner": "address which had the assets withdrawn.", - "positionAssets": "position size reduced.", - "receiver": "address which will be collecting the assets." - } - } - }, - "kind": "dev", - "methods": { - "accountSnapshot(address)": { - "params": { - "account": "account to return status snapshot in the specified maturity date." - }, - "returns": { - "_0": "the amount deposited to the floating pool and the amount owed to floating and fixed pools." - } - }, - "borrow(uint256,address,address)": { - "params": { - "assets": "amount to be sent to receiver and repaid by borrower.", - "borrower": "address that will repay the borrowed assets.", - "receiver": "address that will receive the borrowed assets." - }, - "returns": { - "borrowShares": "shares corresponding to the borrowed assets." - } - }, - "borrowAtMaturity(uint256,uint256,uint256,address,address)": { - "params": { - "assets": "amount to be sent to receiver and repaid by borrower.", - "borrower": "address that will repay the borrowed assets.", - "maturity": "maturity date for repayment.", - "maxAssets": "maximum amount of debt that the account is willing to accept.", - "receiver": "address that will receive the borrowed assets." - }, - "returns": { - "assetsOwed": "total amount of assets (principal + fee) to be repaid at maturity." - } - }, - "clearBadDebt(address)": { - "details": "Can only be called from the auditor.", - "params": { - "borrower": "account with insufficient collateral to be cleared the debt." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "depositAtMaturity(uint256,uint256,uint256,address)": { - "params": { - "assets": "amount to receive from the msg.sender.", - "maturity": "maturity date where the assets will be deposited.", - "minAssetsRequired": "minimum amount of assets required by the depositor for the transaction to be accepted.", - "receiver": "address that will be able to withdraw the deposited assets." - }, - "returns": { - "positionAssets": "total amount of assets (principal + fee) to be withdrawn at maturity." - } - }, - "fixedPoolBalance(uint256)": { - "params": { - "maturity": "maturity date of the fixed pool." - }, - "returns": { - "_0": "borrowed and supplied amount of the fixed pool." - } - }, - "fixedPoolBorrowed(uint256)": { - "params": { - "maturity": "maturity date of the fixed pool." - }, - "returns": { - "_0": "borrowed amount of the fixed pool." - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)": { - "details": "can only be called once." - }, - "liquidate(address,uint256,address)": { - "details": "Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.", - "params": { - "borrower": "account that has an outstanding debt across floating or fixed pools.", - "maxAssets": "maximum amount of debt that the liquidator is willing to accept. (it can be less)", - "seizeMarket": "market from which the collateral will be seized to give to the liquidator." - }, - "returns": { - "repaidAssets": "actual amount repaid." - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "previewBorrow(uint256)": { - "params": { - "assets": "amount of assets to borrow." - }, - "returns": { - "_0": "amount of shares that will be asigned to the account after the borrow." - } - }, - "previewDebt(address)": { - "params": { - "borrower": "account to return status snapshot for fixed and floating borrows." - }, - "returns": { - "debt": "the total debt, denominated in number of assets." - } - }, - "previewFloatingAssetsAverage()": { - "returns": { - "_0": "projected `floatingAssetsAverage`." - } - }, - "previewRefund(uint256)": { - "params": { - "shares": "amount of shares to subtract from caller's accountability." - }, - "returns": { - "_0": "amount of assets that will be repaid." - } - }, - "previewRepay(uint256)": { - "params": { - "assets": "amount of assets to repay." - }, - "returns": { - "_0": "amount of shares that will be subtracted from the account after the repay." - } - }, - "redeem(uint256,address,address)": { - "details": "Makes sure that the owner doesn't have shortfall after withdrawing.", - "params": { - "owner": "address which owns the floating pool assets.", - "receiver": "address to which the assets will be transferred.", - "shares": "amount of shares to be redeemed for underlying asset." - }, - "returns": { - "assets": "amount of underlying asset that was withdrawn." - } - }, - "refund(uint256,address)": { - "params": { - "borrowShares": "shares to be subtracted from the borrower's accountability.", - "borrower": "address of the account that has the debt." - }, - "returns": { - "actualShares": "actual subtracted shares from the borrower's accountability.", - "assets": "subtracted assets from the borrower's accountability." - } - }, - "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." - }, - "repay(uint256,address)": { - "params": { - "assets": "assets to be subtracted from the borrower's accountability.", - "borrower": "address of the account that has the debt." - }, - "returns": { - "actualRepay": "the actual amount that should be transferred into the protocol.", - "borrowShares": "subtracted shares from the borrower's accountability." - } - }, - "repayAtMaturity(uint256,uint256,uint256,address)": { - "params": { - "borrower": "address of the account that has the debt.", - "maturity": "maturity date where the assets will be repaid.", - "maxAssets": "maximum amount of debt that the account is willing to accept to be repaid.", - "positionAssets": "amount to be paid for the borrower's debt." - }, - "returns": { - "actualRepayAssets": "the actual amount that was transferred into the protocol." - } - }, - "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." - }, - "seize(address,address,uint256)": { - "details": "Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).", - "params": { - "assets": "amount to be removed from borrower's possession.", - "borrower": "address from which the assets will be seized.", - "liquidator": "address which will receive the seized assets." - } - }, - "setAssetSymbol(string)": { - "params": { - "assetSymbol": "the symbol for the underlying asset." - } - }, - "setBackupFeeRate(uint256)": { - "params": { - "backupFeeRate_": "percentage amount represented with 18 decimals." - } - }, - "setDampSpeed(uint256,uint256)": { - "params": { - "down": "damp speed down, represented with 18 decimals.", - "up": "damp speed up, represented with 18 decimals." - } - }, - "setEarningsAccumulatorSmoothFactor(uint128)": { - "params": { - "earningsAccumulatorSmoothFactor_": "represented with 18 decimals." - } - }, - "setInterestRateModel(address)": { - "params": { - "interestRateModel_": "new interest rate model." - } - }, - "setMaxFuturePools(uint8)": { - "details": "If value is decreased, VALID maturities will become NOT_READY.", - "params": { - "futurePools": "number of pools to be active at the same time." - } - }, - "setPenaltyRate(uint256)": { - "params": { - "penaltyRate_": "percentage represented with 18 decimals." - } - }, - "setReserveFactor(uint128)": { - "params": { - "reserveFactor_": "parameter represented with 18 decimals." - } - }, - "setRewardsController(address)": { - "params": { - "rewardsController_": "new rewards controller." - } - }, - "setTreasury(address,uint256)": { - "params": { - "treasuryFeeRate_": "represented with 18 decimals.", - "treasury_": "address of the treasury that will receive the minted eTokens." - } - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "totalAssets()": { - "returns": { - "_0": "actual floatingAssets plus earnings to be accrued at current timestamp." - } - }, - "totalFloatingBorrowAssets()": { - "returns": { - "_0": "actual floating debt plus projected interest." - } - }, - "transfer(address,uint256)": { - "details": "Makes sure that the caller doesn't have shortfall after transferring.", - "params": { - "shares": "amount of shares to be transferred.", - "to": "address to which the assets will be transferred." - } - }, - "transferFrom(address,address,uint256)": { - "details": "Makes sure that `from` address doesn't have shortfall after transferring.", - "params": { - "from": "address from which the assets will be transferred.", - "shares": "amount of shares to be transferred.", - "to": "address to which the assets will be transferred." - } - }, - "withdraw(uint256,address,address)": { - "details": "Makes sure that the owner doesn't have shortfall after withdrawing.", - "params": { - "assets": "amount of underlying to be withdrawn.", - "owner": "address which owns the floating pool assets.", - "receiver": "address to which the assets will be transferred." - }, - "returns": { - "shares": "amount of shares redeemed for underlying asset." - } - }, - "withdrawAtMaturity(uint256,uint256,uint256,address,address)": { - "params": { - "maturity": "maturity date where the assets will be withdrawn.", - "minAssetsRequired": "minimum amount required by the account (if discount included for early withdrawal).", - "owner": "address that previously deposited the assets.", - "positionAssets": "position size to be reduced.", - "receiver": "address that will receive the withdrawn assets." - }, - "returns": { - "assetsDiscounted": "amount of assets withdrawn (can include a discount for early withdraw)." - } - } - }, - "stateVariables": { - "__gap": { - "custom:oz-renamed-from": "floatingUtilization", - "details": "gap from deprecated state." - }, - "auditor": { - "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" - } - }, - "version": 1 - }, - "userdoc": { - "events": { - "AccumulatorAccrual(uint256)": { - "notice": "Emitted when accumulator distributes earnings." - }, - "BackupFeeRateSet(uint256)": { - "notice": "Emitted when the backupFeeRate parameter is changed by admin." - }, - "Borrow(address,address,address,uint256,uint256)": { - "notice": "Event emitted when an account borrows amount of assets from a floating pool." - }, - "BorrowAtMaturity(uint256,address,address,address,uint256,uint256)": { - "notice": "Emitted when an account borrows amount of an asset from a certain maturity date." - }, - "DampSpeedSet(uint256,uint256)": { - "notice": "Emitted when the damp speeds are changed by admin." - }, - "DepositAtMaturity(uint256,address,address,uint256,uint256)": { - "notice": "Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period." - }, - "EarningsAccumulatorSmoothFactorSet(uint256)": { - "notice": "Emitted when the earningsAccumulatorSmoothFactor is changed by admin." - }, - "FixedEarningsUpdate(uint256,uint256,uint256)": { - "notice": "Emitted when the earnings of a maturity are updated." - }, - "FloatingDebtUpdate(uint256,uint256)": { - "notice": "Emitted when the floating debt is updated." - }, - "Frozen(address,bool)": { - "notice": "Emitted when `account` sets the `isFrozen` flag." - }, - "InterestRateModelSet(address)": { - "notice": "Emitted when the interestRateModel is changed by admin." - }, - "Liquidate(address,address,uint256,uint256,address,uint256)": { - "notice": "Emitted when an account's position had a liquidation." - }, - "MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)": { - "notice": "Emitted when market state is updated." - }, - "MaxFuturePoolsSet(uint256)": { - "notice": "Emitted when the maxFuturePools is changed by admin." - }, - "PenaltyRateSet(uint256)": { - "notice": "Emitted when the penaltyRate is changed by admin." - }, - "Repay(address,address,uint256,uint256)": { - "notice": "Emitted when an account repays amount of assets to a floating pool." - }, - "RepayAtMaturity(uint256,address,address,uint256,uint256)": { - "notice": "Emitted when an account repays its borrows after maturity." - }, - "ReserveFactorSet(uint256)": { - "notice": "Emitted when the reserveFactor is changed by admin." - }, - "RewardsControllerSet(address)": { - "notice": "Emitted when the rewardsController is changed by admin." - }, - "Seize(address,address,uint256)": { - "notice": "Emitted when an account's collateral has been seized." - }, - "SpreadBadDebt(address,uint256)": { - "notice": "Emitted when an account is cleared from bad debt." - }, - "TreasurySet(address,uint256)": { - "notice": "Emitted when the treasury variables are changed by admin." - }, - "WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)": { - "notice": "Emitted when an account withdraws from a fixed rate pool." - } - }, - "kind": "user", - "methods": { - "accountSnapshot(address)": { - "notice": "Gets current snapshot for an account across all maturities." - }, - "accounts(address)": { - "notice": "Tracks fixed deposit and borrow map and floating borrow shares of an account." - }, - "backupFeeRate()": { - "notice": "Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity." - }, - "borrow(uint256,address,address)": { - "notice": "Borrows a certain amount from the floating pool." - }, - "borrowAtMaturity(uint256,uint256,uint256,address,address)": { - "notice": "Borrows a certain amount from a maturity." - }, - "clearBadDebt(address)": { - "notice": "Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`." - }, - "dampSpeedDown()": { - "notice": "Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower." - }, - "dampSpeedUp()": { - "notice": "Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher." - }, - "depositAtMaturity(uint256,uint256,uint256,address)": { - "notice": "Deposits a certain amount to a maturity." - }, - "earningsAccumulator()": { - "notice": "Accumulated earnings from extraordinary sources to be gradually distributed." - }, - "earningsAccumulatorSmoothFactor()": { - "notice": "Factor used for gradual accrual of earnings to the floating pool." - }, - "fixedBorrowPositions(uint256,address)": { - "notice": "Tracks account's fixed borrow positions by maturity, account and position." - }, - "fixedDepositPositions(uint256,address)": { - "notice": "Tracks account's fixed deposit positions by maturity, account and position." - }, - "fixedPoolBalance(uint256)": { - "notice": "Retrieves a fixed pool's borrowed and supplied amount." - }, - "fixedPoolBorrowed(uint256)": { - "notice": "Retrieves a fixed pool's borrowed amount." - }, - "fixedPools(uint256)": { - "notice": "Tracks fixed pools state by maturity." - }, - "floatingAssets()": { - "notice": "Amount of floating assets deposited to the pool." - }, - "floatingAssetsAverage()": { - "notice": "Average of the floating assets to get fixed borrow rates and prevent rate manipulation." - }, - "floatingBackupBorrowed()": { - "notice": "Amount of assets lent by the floating pool to the fixed pools." - }, - "floatingDebt()": { - "notice": "Amount of assets lent by the floating pool to accounts." - }, - "initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)": { - "notice": "Initializes the contract." - }, - "interestRateModel()": { - "notice": "Interest rate model contract used to get the borrow rates." - }, - "isFrozen()": { - "notice": "Flag to prevent new borrows and deposits." - }, - "lastAccumulatorAccrual()": { - "notice": "Last time the accumulator distributed earnings." - }, - "lastAverageUpdate()": { - "notice": "Last time the floating assets average was updated." - }, - "lastFloatingDebtUpdate()": { - "notice": "Last time the floating debt was updated." - }, - "liquidate(address,uint256,address)": { - "notice": "Liquidates undercollateralized fixed/floating (or both) position(s)." - }, - "maxFuturePools()": { - "notice": "Number of fixed pools to be active at the same time." - }, - "pause()": { - "notice": "Sets the pause state to true in case of emergency, triggered by an authorized account." - }, - "penaltyRate()": { - "notice": "Rate per second to be charged to delayed fixed pools borrowers after maturity." - }, - "previewBorrow(uint256)": { - "notice": "Simulates the effects of a borrow at the current time, given current contract conditions." - }, - "previewDebt(address)": { - "notice": "Gets all borrows and penalties for an account." - }, - "previewFloatingAssetsAverage()": { - "notice": "Returns the current `floatingAssetsAverage` without updating the storage variable." - }, - "previewRefund(uint256)": { - "notice": "Simulates the effects of a refund at the current time, given current contract conditions." - }, - "previewRepay(uint256)": { - "notice": "Simulates the effects of a repay at the current time, given current contract conditions." - }, - "redeem(uint256,address,address)": { - "notice": "Redeems the owner's floating pool assets to the receiver address." - }, - "refund(uint256,address)": { - "notice": "Repays a certain amount of shares to the floating pool." - }, - "repay(uint256,address)": { - "notice": "Repays a certain amount of assets to the floating pool." - }, - "repayAtMaturity(uint256,uint256,uint256,address)": { - "notice": "Repays a certain amount to a maturity." - }, - "reserveFactor()": { - "notice": "Percentage factor that represents the liquidity reserves that can't be borrowed." - }, - "rewardsController()": { - "notice": "Address of the rewards controller that will accrue rewards for accounts operating with the Market." - }, - "seize(address,address,uint256)": { - "notice": "Public function to seize a certain amount of assets." - }, - "setAssetSymbol(string)": { - "notice": "Sets name and symbol for the Market." - }, - "setBackupFeeRate(uint256)": { - "notice": "Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity." - }, - "setDampSpeed(uint256,uint256)": { - "notice": "Sets the damp speed used to update the floatingAssetsAverage." - }, - "setEarningsAccumulatorSmoothFactor(uint128)": { - "notice": "Sets the factor used when smoothly accruing earnings to the floating pool." - }, - "setFrozen(bool)": { - "notice": "Sets `isFrozen` state, triggered by an authorized account." - }, - "setInterestRateModel(address)": { - "notice": "Sets the interest rate model to be used to calculate rates." - }, - "setMaxFuturePools(uint8)": { - "notice": "Sets the protocol's max future pools for fixed borrowing and lending." - }, - "setPenaltyRate(uint256)": { - "notice": "Sets the penalty rate per second." - }, - "setReserveFactor(uint128)": { - "notice": "Sets the percentage that represents the liquidity reserves that can't be borrowed." - }, - "setRewardsController(address)": { - "notice": "Sets the rewards controller to update account rewards when operating with the Market." - }, - "setTreasury(address,uint256)": { - "notice": "Sets the treasury variables." - }, - "totalAssets()": { - "notice": "Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator." - }, - "totalFloatingBorrowAssets()": { - "notice": "Calculates the total floating debt, considering elapsed time since last update and current interest rate." - }, - "totalFloatingBorrowShares()": { - "notice": "Total amount of floating borrow shares assigned to floating borrow accounts." - }, - "transfer(address,uint256)": { - "notice": "Moves amount of shares from the caller's account to `to`." - }, - "transferFrom(address,address,uint256)": { - "notice": "Moves amount of shares from `from` to `to` using the allowance mechanism." - }, - "treasury()": { - "notice": "Address of the treasury that will receive the allocated earnings." - }, - "treasuryFeeRate()": { - "notice": "Rate to be charged by the treasury to floating and fixed borrows." - }, - "unpause()": { - "notice": "Sets the pause state to false when threat is gone, triggered by an authorized account." - }, - "withdraw(uint256,address,address)": { - "notice": "Withdraws the owner's floating pool assets to the receiver address." - }, - "withdrawAtMaturity(uint256,uint256,uint256,address,address)": { - "notice": "Withdraws a certain amount from a maturity." - } - }, - "version": 1 - }, + "numDeployments": 8, + "solcInputHash": "6e57950826dfd6055f8dc377807ae48e", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"contract Auditor\",\"name\":\"auditor_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Disagreement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientProtocolLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketFrozen\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaturityOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAuditor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPausingRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SelfLiquidation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolState\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"alternativeState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolStates\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBorrow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRepay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWithdraw\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AccumulatorAccrual\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"backupFeeRate\",\"type\":\"uint256\"}],\"name\":\"BackupFeeRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"BorrowAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedUp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedDown\",\"type\":\"uint256\"}],\"name\":\"DampSpeedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"DepositAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulatorSmoothFactor\",\"type\":\"uint256\"}],\"name\":\"EarningsAccumulatorSmoothFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"}],\"name\":\"FixedEarningsUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilization\",\"type\":\"uint256\"}],\"name\":\"FloatingDebtUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isFrozen\",\"type\":\"bool\"}],\"name\":\"Frozen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel\",\"type\":\"address\"}],\"name\":\"InterestRateModelSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lendersAssets\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizedAssets\",\"type\":\"uint256\"}],\"name\":\"Liquidate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDepositShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDebt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulator\",\"type\":\"uint256\"}],\"name\":\"MarketUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxFuturePools\",\"type\":\"uint256\"}],\"name\":\"MaxFuturePoolsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyRate\",\"type\":\"uint256\"}],\"name\":\"PenaltyRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Repay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"name\":\"RepayAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveFactor\",\"type\":\"uint256\"}],\"name\":\"ReserveFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController\",\"type\":\"address\"}],\"name\":\"RewardsControllerSet\",\"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\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"SpreadBadDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate\",\"type\":\"uint256\"}],\"name\":\"TreasurySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"WithdrawAtMaturity\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EMERGENCY_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"accountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fixedDeposits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fixedBorrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auditor\",\"outputs\":[{\"internalType\":\"contract Auditor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"backupFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrowAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsOwed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"clearBadDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"depositAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulatorSmoothFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedBorrowPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedDepositPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"fixedPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplied\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastAccrual\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingBackupBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"maxFuturePools_\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedUp_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedDown_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAccumulatorAccrual\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAverageUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFloatingDebtUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxFuturePools\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"previewDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"debt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewFloatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRefund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewRepay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repayAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepayAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsController\",\"outputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"}],\"name\":\"setAssetSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setBackupFeeRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"up\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"down\",\"type\":\"uint256\"}],\"name\":\"setDampSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"}],\"name\":\"setEarningsAccumulatorSmoothFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isFrozen_\",\"type\":\"bool\"}],\"name\":\"setFrozen\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"futurePools\",\"type\":\"uint8\"}],\"name\":\"setMaxFuturePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"}],\"name\":\"setReserveFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController_\",\"type\":\"address\"}],\"name\":\"setRewardsController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setTreasury\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasuryFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsDiscounted\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\"}},\"BackupFeeRateSet(uint256)\":{\"params\":{\"backupFeeRate\":\"rate charged to the fixed pools to be accrued by the floating depositors.\"}},\"Borrow(address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"receiver\":\"address that received the borrowed assets.\",\"shares\":\"amount of borrow shares assigned to the account.\"}},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"fee\":\"extra amount that will need to be paid at maturity.\",\"maturity\":\"maturity in which the account will have to repay the loan.\",\"receiver\":\"address that received the borrowed assets.\"}},\"DampSpeedSet(uint256,uint256)\":{\"params\":{\"dampSpeedDown\":\"represented with 18 decimals.\",\"dampSpeedUp\":\"represented with 18 decimals.\"}},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were deposited.\",\"caller\":\"address which deposited the assets.\",\"fee\":\"is the extra amount that it will be collected at maturity.\",\"maturity\":\"maturity at which the account will be able to collect his deposit + his fee.\",\"owner\":\"address that will be able to withdraw the deposited assets.\"}},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"params\":{\"earningsAccumulatorSmoothFactor\":\"factor represented with 18 decimals.\"}},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"params\":{\"maturity\":\"maturity date where the earnings were updated.\",\"timestamp\":\"current timestamp.\",\"unassignedEarnings\":\"pending unassigned earnings.\"}},\"FloatingDebtUpdate(uint256,uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\",\"utilization\":\"new floating utilization.\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InterestRateModelSet(address)\":{\"params\":{\"interestRateModel\":\"new interest rate model to be used to calculate rates.\"}},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were repaid.\",\"borrower\":\"address which had the original debt.\",\"lendersAssets\":\"incentive paid to lenders.\",\"receiver\":\"address which repaid the previously borrowed amount.\",\"seizeMarket\":\"address of the asset that were seized by the liquidator.\",\"seizedAssets\":\"amount seized of the collateral.\"}},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"earningsAccumulator\":\"earnings accumulator.\",\"floatingAssets\":\"total floating supply assets.\",\"floatingBorrowShares\":\"total floating borrow shares.\",\"floatingDebt\":\"total floating borrow assets.\",\"floatingDepositShares\":\"total floating supply shares.\",\"timestamp\":\"current timestamp.\"}},\"MaxFuturePoolsSet(uint256)\":{\"params\":{\"maxFuturePools\":\"represented with 0 decimals.\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PenaltyRateSet(uint256)\":{\"params\":{\"penaltyRate\":\"penaltyRate percentage per second represented with 18 decimals.\"}},\"Repay(address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"shares\":\"amount of borrow shares that were subtracted from the account's accountability.\"}},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"maturity\":\"maturity where the account repaid its borrowed amounts.\",\"positionAssets\":\"amount of the debt that was covered in this repayment (penalties could have been repaid).\"}},\"ReserveFactorSet(uint256)\":{\"params\":{\"reserveFactor\":\"reserveFactor percentage.\"}},\"RewardsControllerSet(address)\":{\"params\":{\"rewardsController\":\"new rewards controller to update account rewards when operating with the Market.\"}},\"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`)\"},\"Seize(address,address,uint256)\":{\"params\":{\"assets\":\"amount seized of the collateral.\",\"borrower\":\"address which had the original debt.\",\"liquidator\":\"address which seized this collateral.\"}},\"SpreadBadDebt(address,uint256)\":{\"params\":{\"assets\":\"amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\",\"borrower\":\"address which was cleared from bad debt.\"}},\"TreasurySet(address,uint256)\":{\"params\":{\"treasury\":\"address of the treasury that will receive the minted eTokens.\",\"treasuryFeeRate\":\"represented with 18 decimals.\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets withdrawn (can include a discount for early withdraw).\",\"caller\":\"address which withdraw the asset.\",\"maturity\":\"maturity where the account withdraw its deposits.\",\"owner\":\"address which had the assets withdrawn.\",\"positionAssets\":\"position size reduced.\",\"receiver\":\"address which will be collecting the assets.\"}}},\"kind\":\"dev\",\"methods\":{\"accountSnapshot(address)\":{\"params\":{\"account\":\"account to return status snapshot in the specified maturity date.\"},\"returns\":{\"_0\":\"the amount deposited to the floating pool and the amount owed to floating and fixed pools.\"}},\"borrow(uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"borrowShares\":\"shares corresponding to the borrowed assets.\"}},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"maturity\":\"maturity date for repayment.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"assetsOwed\":\"total amount of assets (principal + fee) to be repaid at maturity.\"}},\"clearBadDebt(address)\":{\"details\":\"Can only be called from the auditor.\",\"params\":{\"borrower\":\"account with insufficient collateral to be cleared the debt.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"assets\":\"amount to receive from the msg.sender.\",\"maturity\":\"maturity date where the assets will be deposited.\",\"minAssetsRequired\":\"minimum amount of assets required by the depositor for the transaction to be accepted.\",\"receiver\":\"address that will be able to withdraw the deposited assets.\"},\"returns\":{\"positionAssets\":\"total amount of assets (principal + fee) to be withdrawn at maturity.\"}},\"fixedPoolBalance(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed and supplied amount of the fixed pool.\"}},\"fixedPoolBorrowed(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed amount of the fixed pool.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"details\":\"can only be called once.\"},\"liquidate(address,uint256,address)\":{\"details\":\"Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.\",\"params\":{\"borrower\":\"account that has an outstanding debt across floating or fixed pools.\",\"maxAssets\":\"maximum amount of debt that the liquidator is willing to accept. (it can be less)\",\"seizeMarket\":\"market from which the collateral will be seized to give to the liquidator.\"},\"returns\":{\"repaidAssets\":\"actual amount repaid.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"previewBorrow(uint256)\":{\"params\":{\"assets\":\"amount of assets to borrow.\"},\"returns\":{\"_0\":\"amount of shares that will be asigned to the account after the borrow.\"}},\"previewDebt(address)\":{\"params\":{\"borrower\":\"account to return status snapshot for fixed and floating borrows.\"},\"returns\":{\"debt\":\"the total debt, denominated in number of assets.\"}},\"previewFloatingAssetsAverage()\":{\"returns\":{\"_0\":\"projected `floatingAssetsAverage`.\"}},\"previewRefund(uint256)\":{\"params\":{\"shares\":\"amount of shares to subtract from caller's accountability.\"},\"returns\":{\"_0\":\"amount of assets that will be repaid.\"}},\"previewRepay(uint256)\":{\"params\":{\"assets\":\"amount of assets to repay.\"},\"returns\":{\"_0\":\"amount of shares that will be subtracted from the account after the repay.\"}},\"redeem(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\",\"shares\":\"amount of shares to be redeemed for underlying asset.\"},\"returns\":{\"assets\":\"amount of underlying asset that was withdrawn.\"}},\"refund(uint256,address)\":{\"params\":{\"borrowShares\":\"shares to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualShares\":\"actual subtracted shares from the borrower's accountability.\",\"assets\":\"subtracted assets from the borrower's accountability.\"}},\"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.\"},\"repay(uint256,address)\":{\"params\":{\"assets\":\"assets to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualRepay\":\"the actual amount that should be transferred into the protocol.\",\"borrowShares\":\"subtracted shares from the borrower's accountability.\"}},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"borrower\":\"address of the account that has the debt.\",\"maturity\":\"maturity date where the assets will be repaid.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept to be repaid.\",\"positionAssets\":\"amount to be paid for the borrower's debt.\"},\"returns\":{\"actualRepayAssets\":\"the actual amount that was transferred into the protocol.\"}},\"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.\"},\"seize(address,address,uint256)\":{\"details\":\"Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\",\"params\":{\"assets\":\"amount to be removed from borrower's possession.\",\"borrower\":\"address from which the assets will be seized.\",\"liquidator\":\"address which will receive the seized assets.\"}},\"setAssetSymbol(string)\":{\"params\":{\"assetSymbol\":\"the symbol for the underlying asset.\"}},\"setBackupFeeRate(uint256)\":{\"params\":{\"backupFeeRate_\":\"percentage amount represented with 18 decimals.\"}},\"setDampSpeed(uint256,uint256)\":{\"params\":{\"down\":\"damp speed down, represented with 18 decimals.\",\"up\":\"damp speed up, represented with 18 decimals.\"}},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"params\":{\"earningsAccumulatorSmoothFactor_\":\"represented with 18 decimals.\"}},\"setInterestRateModel(address)\":{\"params\":{\"interestRateModel_\":\"new interest rate model.\"}},\"setMaxFuturePools(uint8)\":{\"details\":\"If value is decreased, VALID maturities will become NOT_READY.\",\"params\":{\"futurePools\":\"number of pools to be active at the same time.\"}},\"setPenaltyRate(uint256)\":{\"params\":{\"penaltyRate_\":\"percentage represented with 18 decimals.\"}},\"setReserveFactor(uint128)\":{\"params\":{\"reserveFactor_\":\"parameter represented with 18 decimals.\"}},\"setRewardsController(address)\":{\"params\":{\"rewardsController_\":\"new rewards controller.\"}},\"setTreasury(address,uint256)\":{\"params\":{\"treasuryFeeRate_\":\"represented with 18 decimals.\",\"treasury_\":\"address of the treasury that will receive the minted eTokens.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalAssets()\":{\"returns\":{\"_0\":\"actual floatingAssets plus earnings to be accrued at current timestamp.\"}},\"totalFloatingBorrowAssets()\":{\"returns\":{\"_0\":\"actual floating debt plus projected interest.\"}},\"transfer(address,uint256)\":{\"details\":\"Makes sure that the caller doesn't have shortfall after transferring.\",\"params\":{\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Makes sure that `from` address doesn't have shortfall after transferring.\",\"params\":{\"from\":\"address from which the assets will be transferred.\",\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"withdraw(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"assets\":\"amount of underlying to be withdrawn.\",\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\"},\"returns\":{\"shares\":\"amount of shares redeemed for underlying asset.\"}},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"maturity\":\"maturity date where the assets will be withdrawn.\",\"minAssetsRequired\":\"minimum amount required by the account (if discount included for early withdrawal).\",\"owner\":\"address that previously deposited the assets.\",\"positionAssets\":\"position size to be reduced.\",\"receiver\":\"address that will receive the withdrawn assets.\"},\"returns\":{\"assetsDiscounted\":\"amount of assets withdrawn (can include a discount for early withdraw).\"}}},\"stateVariables\":{\"__gap\":{\"custom:oz-renamed-from\":\"floatingUtilization\",\"details\":\"gap from deprecated state.\"},\"auditor\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"notice\":\"Emitted when accumulator distributes earnings.\"},\"BackupFeeRateSet(uint256)\":{\"notice\":\"Emitted when the backupFeeRate parameter is changed by admin.\"},\"Borrow(address,address,address,uint256,uint256)\":{\"notice\":\"Event emitted when an account borrows amount of assets from a floating pool.\"},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account borrows amount of an asset from a certain maturity date.\"},\"DampSpeedSet(uint256,uint256)\":{\"notice\":\"Emitted when the damp speeds are changed by admin.\"},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period.\"},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"notice\":\"Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\"},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"notice\":\"Emitted when the earnings of a maturity are updated.\"},\"FloatingDebtUpdate(uint256,uint256)\":{\"notice\":\"Emitted when the floating debt is updated.\"},\"Frozen(address,bool)\":{\"notice\":\"Emitted when `account` sets the `isFrozen` flag.\"},\"InterestRateModelSet(address)\":{\"notice\":\"Emitted when the interestRateModel is changed by admin.\"},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"notice\":\"Emitted when an account's position had a liquidation.\"},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when market state is updated.\"},\"MaxFuturePoolsSet(uint256)\":{\"notice\":\"Emitted when the maxFuturePools is changed by admin.\"},\"PenaltyRateSet(uint256)\":{\"notice\":\"Emitted when the penaltyRate is changed by admin.\"},\"Repay(address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays amount of assets to a floating pool.\"},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays its borrows after maturity.\"},\"ReserveFactorSet(uint256)\":{\"notice\":\"Emitted when the reserveFactor is changed by admin.\"},\"RewardsControllerSet(address)\":{\"notice\":\"Emitted when the rewardsController is changed by admin.\"},\"Seize(address,address,uint256)\":{\"notice\":\"Emitted when an account's collateral has been seized.\"},\"SpreadBadDebt(address,uint256)\":{\"notice\":\"Emitted when an account is cleared from bad debt.\"},\"TreasurySet(address,uint256)\":{\"notice\":\"Emitted when the treasury variables are changed by admin.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account withdraws from a fixed rate pool.\"}},\"kind\":\"user\",\"methods\":{\"accountSnapshot(address)\":{\"notice\":\"Gets current snapshot for an account across all maturities.\"},\"accounts(address)\":{\"notice\":\"Tracks fixed deposit and borrow map and floating borrow shares of an account.\"},\"backupFeeRate()\":{\"notice\":\"Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\"},\"borrow(uint256,address,address)\":{\"notice\":\"Borrows a certain amount from the floating pool.\"},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Borrows a certain amount from a maturity.\"},\"clearBadDebt(address)\":{\"notice\":\"Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\"},\"dampSpeedDown()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\"},\"dampSpeedUp()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Deposits a certain amount to a maturity.\"},\"earningsAccumulator()\":{\"notice\":\"Accumulated earnings from extraordinary sources to be gradually distributed.\"},\"earningsAccumulatorSmoothFactor()\":{\"notice\":\"Factor used for gradual accrual of earnings to the floating pool.\"},\"fixedBorrowPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed borrow positions by maturity, account and position.\"},\"fixedDepositPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed deposit positions by maturity, account and position.\"},\"fixedPoolBalance(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed and supplied amount.\"},\"fixedPoolBorrowed(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed amount.\"},\"fixedPools(uint256)\":{\"notice\":\"Tracks fixed pools state by maturity.\"},\"floatingAssets()\":{\"notice\":\"Amount of floating assets deposited to the pool.\"},\"floatingAssetsAverage()\":{\"notice\":\"Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\"},\"floatingBackupBorrowed()\":{\"notice\":\"Amount of assets lent by the floating pool to the fixed pools.\"},\"floatingDebt()\":{\"notice\":\"Amount of assets lent by the floating pool to accounts.\"},\"initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"notice\":\"Initializes the contract.\"},\"interestRateModel()\":{\"notice\":\"Interest rate model contract used to get the borrow rates.\"},\"isFrozen()\":{\"notice\":\"Flag to prevent new borrows and deposits.\"},\"lastAccumulatorAccrual()\":{\"notice\":\"Last time the accumulator distributed earnings.\"},\"lastAverageUpdate()\":{\"notice\":\"Last time the floating assets average was updated.\"},\"lastFloatingDebtUpdate()\":{\"notice\":\"Last time the floating debt was updated.\"},\"liquidate(address,uint256,address)\":{\"notice\":\"Liquidates undercollateralized fixed/floating (or both) position(s).\"},\"maxFuturePools()\":{\"notice\":\"Number of fixed pools to be active at the same time.\"},\"pause()\":{\"notice\":\"Sets the pause state to true in case of emergency, triggered by an authorized account.\"},\"penaltyRate()\":{\"notice\":\"Rate per second to be charged to delayed fixed pools borrowers after maturity.\"},\"previewBorrow(uint256)\":{\"notice\":\"Simulates the effects of a borrow at the current time, given current contract conditions.\"},\"previewDebt(address)\":{\"notice\":\"Gets all borrows and penalties for an account.\"},\"previewFloatingAssetsAverage()\":{\"notice\":\"Returns the current `floatingAssetsAverage` without updating the storage variable.\"},\"previewRefund(uint256)\":{\"notice\":\"Simulates the effects of a refund at the current time, given current contract conditions.\"},\"previewRepay(uint256)\":{\"notice\":\"Simulates the effects of a repay at the current time, given current contract conditions.\"},\"redeem(uint256,address,address)\":{\"notice\":\"Redeems the owner's floating pool assets to the receiver address.\"},\"refund(uint256,address)\":{\"notice\":\"Repays a certain amount of shares to the floating pool.\"},\"repay(uint256,address)\":{\"notice\":\"Repays a certain amount of assets to the floating pool.\"},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Repays a certain amount to a maturity.\"},\"reserveFactor()\":{\"notice\":\"Percentage factor that represents the liquidity reserves that can't be borrowed.\"},\"rewardsController()\":{\"notice\":\"Address of the rewards controller that will accrue rewards for accounts operating with the Market.\"},\"seize(address,address,uint256)\":{\"notice\":\"Public function to seize a certain amount of assets.\"},\"setAssetSymbol(string)\":{\"notice\":\"Sets name and symbol for the Market.\"},\"setBackupFeeRate(uint256)\":{\"notice\":\"Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity.\"},\"setDampSpeed(uint256,uint256)\":{\"notice\":\"Sets the damp speed used to update the floatingAssetsAverage.\"},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"notice\":\"Sets the factor used when smoothly accruing earnings to the floating pool.\"},\"setFrozen(bool)\":{\"notice\":\"Sets `isFrozen` state, triggered by an authorized account.\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model to be used to calculate rates.\"},\"setMaxFuturePools(uint8)\":{\"notice\":\"Sets the protocol's max future pools for fixed borrowing and lending.\"},\"setPenaltyRate(uint256)\":{\"notice\":\"Sets the penalty rate per second.\"},\"setReserveFactor(uint128)\":{\"notice\":\"Sets the percentage that represents the liquidity reserves that can't be borrowed.\"},\"setRewardsController(address)\":{\"notice\":\"Sets the rewards controller to update account rewards when operating with the Market.\"},\"setTreasury(address,uint256)\":{\"notice\":\"Sets the treasury variables.\"},\"totalAssets()\":{\"notice\":\"Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator.\"},\"totalFloatingBorrowAssets()\":{\"notice\":\"Calculates the total floating debt, considering elapsed time since last update and current interest rate.\"},\"totalFloatingBorrowShares()\":{\"notice\":\"Total amount of floating borrow shares assigned to floating borrow accounts.\"},\"transfer(address,uint256)\":{\"notice\":\"Moves amount of shares from the caller's account to `to`.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Moves amount of shares from `from` to `to` using the allowance mechanism.\"},\"treasury()\":{\"notice\":\"Address of the treasury that will receive the allocated earnings.\"},\"treasuryFeeRate()\":{\"notice\":\"Rate to be charged by the treasury to floating and fixed borrows.\"},\"unpause()\":{\"notice\":\"Sets the pause state to false when threat is gone, triggered by an authorized account.\"},\"withdraw(uint256,address,address)\":{\"notice\":\"Withdraws the owner's floating pool assets to the receiver address.\"},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Withdraws a certain amount from a maturity.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Market.sol\":\"Market\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":70},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\":{\"keccak256\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b83b7afa4d2372da3ba5402fb10860a105c35d79812c60dc61007be2afc17618\",\"dweb:/ipfs/QmYX9xPmbNVSKXrepKiUZiG5oL3SdzFp9a4kqspxX1sEUx\"]},\"@openzeppelin/contracts-upgradeable-v4/access/IAccessControlUpgradeable.sol\":{\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://740cf4dc535e3082560cf5a031473029f322690fc8037fe9d5e3a8bef42e757c\",\"dweb:/ipfs/QmTQxFdfxcaueQa23VX34wAPqzruZbkzyeN58tZK2yav2b\"]},\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e\",\"dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv\"]},\"@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol\":{\"keccak256\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6d362da7417bc7d7cc8623f3d3f8f04c3808d043ee6379568c63a63ec14a124e\",\"dweb:/ipfs/QmYm3wDHUcfGh3MNiRqpWEBbSSYnDSyUsppDATy5DVsfui\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b\",\"dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8b06267c5f80bad727af3e48b1382333d591dad51376399ef2f6b0ee6d58bf95\",\"dweb:/ipfs/QmdU5La1agcQvghnfMpWZGDPz2TUDTCxUwTLKmuMRXBpAx\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/StringsUpgradeable.sol\":{\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f8613145881436fc0480fff22da4868d611e2b0c0c3da083334eb4362ce1945a\",\"dweb:/ipfs/QmPqpP3YeRbBdTJRe6Gv2eGsUaANf4J6RwTNRW36iYahfV\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/introspection/ERC165Upgradeable.sol\":{\"keccak256\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1b13befeb3413749292f9fb229de1c7a509a5ce2c8047d9094fc004ca9d3af89\",\"dweb:/ipfs/QmRzJ2hZSwRtMejHUZAYTPRKgZsnfb112Fno9Jf3EiDfwA\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/introspection/IERC165Upgradeable.sol\":{\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://92ad7e572cf44e6b4b37631b44b62f9eb9fb1cf14d9ce51c1504d5dc7ccaf758\",\"dweb:/ipfs/QmcnbqX85tsWnUXPmtuPLE4SczME2sJaTfmqEFkuAJvWhy\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\":{\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2b2835c737d073ef8b82a4cc246495a9740f43e7ff2cf130906b2449ff9bfb91\",\"dweb:/ipfs/QmSCWfNoSvvTN57ic7o1RW6NqSxxGAqbBTnLKc7QHe27qB\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/math/SignedMathUpgradeable.sol\":{\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://88ace2d60f265752f18903d839910be4e4e104340b2957678585b812447825d4\",\"dweb:/ipfs/QmXFkNxMc3AAGzhs2wUEZyErWQjsvoTGyYjuU5oZkFki5Z\"]},\"@openzeppelin/contracts-v4/utils/math/Math.sol\":{\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c\",\"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS\"]},\"@openzeppelin/contracts-v4/utils/math/SafeCast.sol\":{\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://495145362c7ff1c9ca88c58bbbbcb412e3c2004406647412394486552ff6c278\",\"dweb:/ipfs/QmNNCeng6d5eRPDn6tkWSQhjE39XWfQEfjA63rRwHmr1iH\"]},\"contracts/Auditor.sol\":{\"keccak256\":\"0x5110a03bc02c12d47bc64ccb39250e2c9eaa4c4089e63ed143e0513bf7ede5d8\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e61331e636beec80bc57e2b751fa672ee98dab4fb489c9ea4cf19cd68acbddfd\",\"dweb:/ipfs/QmPgu5ZNy8b7ywz6fX658A5ETWTKdGLXCwtX5eAPEiZfH8\"]},\"contracts/InterestRateModel.sol\":{\"keccak256\":\"0x21b3897afb0da4e23559f3122f2292deb79516d8850a4995ece47b8c4d278004\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://a8aad4f1b7340db20e72e3c115e951ad5c71c87fb6139729f9b3279289f82908\",\"dweb:/ipfs/QmZ1UAp33jbcHJZFmsDSokVM6tSCPTPXi3zEranQDP4ZQE\"]},\"contracts/Market.sol\":{\"keccak256\":\"0xea262e9a46d356f8626b4ea1d2bf9017e009b3d4f95809f5f33331b0236b3ce6\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e05e0132c04440fa2a3bd7d991940f4f14f70efe0414f7b8085f5a2247aea6ec\",\"dweb:/ipfs/QmWwjTo5nRbuY1GywEXUPdA9tDvN6CgA8pL147dQdPTacW\"]},\"contracts/RewardsController.sol\":{\"keccak256\":\"0xab502e9e6c6fdd56878d80fde0aee78c360234b15b1db8d7cb6508fe3c430163\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://08502c85c6753a61ff24aeab55809674dd47cb206ad02aa615c81a53820acb06\",\"dweb:/ipfs/Qmazc5RbGCq7QXsuqqfkC5yC4LgkTUQLg5Xn1YCyi5Rxi4\"]},\"contracts/utils/FixedLib.sol\":{\"keccak256\":\"0x9eb04f02cac9a0c2fd049587524799c8ab4fa1840d9550bad02d87d81074187c\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://885545fb71ae6e82d70b364dd2fc021e25435b01131f1e7a63755c303a350928\",\"dweb:/ipfs/QmaejvpPc1qX1GWvwodnUaHgKzob8WpsU3kz84qpk7vRn3\"]},\"contracts/utils/IPriceFeed.sol\":{\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://b06913f9c7e4fe67bbb1ddf3d9335a2a6c0e7a537aae8ed7d8b5825c61e80514\",\"dweb:/ipfs/Qmb34jWcW4Pv8Upsq2rtoYoncPHoUgDUET6JHBBsTo583L\"]},\"solmate/src/mixins/ERC4626.sol\":{\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1dca20fc42d20ce7b6023fafd744dc7e91ed2d1f6c5f1fb45e3004b1d5f33100\",\"dweb:/ipfs/Qmf7MtQTTSJYEhsJ3HDmegt4PFSG13msyFAv4DFAoqyypa\"]},\"solmate/src/tokens/ERC20.sol\":{\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb440672ebad7d487c1600e406e140fd1ffc4bd7520c86b5709183ca2602da58\",\"dweb:/ipfs/QmNgZaBoAZwnwm4mTL1cUZnMtvt1iZnruMnfpJnDu6upuc\"]},\"solmate/src/utils/FixedPointMathLib.sol\":{\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://737232ccd46bfbe6f34a3e5bc24c345777da47e6ea27bcc46d2c3931883c2257\",\"dweb:/ipfs/QmeA6ikG9dQKZgkJYUVGXcApuCii34h7qtmguToRdSU3qZ\"]},\"solmate/src/utils/SafeTransferLib.sol\":{\"keccak256\":\"0xbb4580ec2c735b5f31bb176567c886a87c2800b3eff132eda15ddc2b28cc2932\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://27ce4609ece6f8635dafd662cf8a45a4e0b5c3240e6f26c6b0081df880039152\",\"dweb:/ipfs/QmYPBJ1DPeFNUTPSPka3G9iwpSfbyJnYQeo5YGvbfyQFGC\"]}},\"version\":1}", + "bytecode": "0x610120604052348015610010575f80fd5b5060405161651138038061651183398101604081905261002f9161021c565b8160405180602001604052805f81525060405180602001604052805f8152508181846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100b09190610254565b60c96100bc8482610313565b5060ca6100c98382610313565b5060ff81166080524660a0526100dd610108565b60c0525050506001600160a01b0392831660e05250508116610100526101016101a1565b505061043e565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c960405161013991906103cd565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f54610100900460ff16156101b4575f80fd5b5f5460ff90811614610203575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610219575f80fd5b50565b5f806040838503121561022d575f80fd5b825161023881610205565b602084015190925061024981610205565b809150509250929050565b5f60208284031215610264575f80fd5b815160ff81168114610274575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102a357607f821691505b6020821081036102c157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561030e57805f5260205f20601f840160051c810160208510156102ec5750805b601f840160051c820191505b8181101561030b575f81556001016102f8565b50505b505050565b81516001600160401b0381111561032c5761032c61027b565b6103408161033a845461028f565b846102c7565b6020601f821160018114610372575f831561035b5750848201515b5f19600385901b1c1916600184901b17845561030b565b5f84815260208120601f198516915b828110156103a15787850151825560209485019460019092019101610381565b50848210156103be57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f8083546103da8161028f565b6001821680156103f1576001811461040657610433565b60ff1983168652811515820286019350610433565b865f5260205f205f5b8381101561042b5781548882015260019091019060200161040f565b505081860193505b509195945050505050565b60805160a05160c05160e05161010051615ff561051c5f395f81816107840152818161154d015281816116fe01528181611d7a01528181611faa01528181612184015281816124b201528181612e8b0152818161303c0152818161312e015281816136700152614b2801525f8181610734015281816115be01528181611b7101528181611c650152818161206c015281816122780152818161233f0152818161282e01528181612e0d015281816136e101528181614cb2015281816151cd01526152cf01525f611bde01525f611ba901525f6106cb0152615ff55ff3fe608060405234801561000f575f80fd5b50600436106104c1575f3560e01c80636e76fc8f11610283578063b2a02ff111610168578063d5164184116100e0578063e63ab1e91161009a578063e63ab1e914610c98578063e94b3c2114610cac578063eee8c9e014610cb5578063ef8b30f714610cbd578063f3fdb15a14610cd0578063fb0fc4c314610ce3578063fea45d9414610cfa575f80fd5b8063d516418414610c04578063d547741f14610c17578063d6b7494f14610c2a578063d905777e14610c33578063dd62ed3e14610c5b578063e00b262514610c85575f80fd5b8063b2a02ff114610af7578063b3d7f6b914610b0a578063b460af9414610b1d578063ba08765214610b30578063bee36bb314610b43578063bf722ca214610b56578063c63d75b6146107ae578063c6e6f59214610b69578063ccfd8b1114610b7c578063ce96cb7714610bad578063d2681a0b14610bc0578063d505accf14610bf1575f80fd5b806391d14854116101fb57806391d1485414610a32578063926bb63314610a4557806394bf804d14610a5857806395d89b4114610a6b57806397bce8d014610a73578063a05a091a14610a86578063a16a885014610a99578063a1bab44714610aae578063a1e8f02b14610ac1578063a217fddf14610aca578063a9059cbb14610ad1578063acb7081514610ae4575f80fd5b80636e76fc8f146109325780636eb9ffeb1461095957806370a082311461098557806378007e23146109a45780637ad226dc146109b75780637e932d32146109ca5780637ecebe00146109dd5780638456cb59146109fc5780638a1baa4614610a045780638bcd401614610a0d5780638c3cba5a14610a205780638d0e5f0214610a29575f80fd5b8063313ce567116103a95780634322b714116103215780634322b714146107d557806347dffde0146107fc5780634914c0081461080f5780634cdad506146108225780634e7c5059146108355780635c975abb146108895780635cc2ef83146108945780635e5c06e2146108a757806361d027b3146108f057806366601032146109035780636bb65f531461090c5780636e553f651461091f575f80fd5b8063313ce567146106c657806333eeb147146106ed57806334f7d1f2146107015780633644e5151461071457806336568abe1461071c57806338d52e0f1461072f5780633aa18d6f146107635780633c6f317f1461076c5780633ec045a61461077f5780633f4ba83a146107a6578063402d267d146107ae57806342da42bf146107c2575f80fd5b8063137001011161043c57806313700101146105e557806318160ddd146105f85780631a5b9e62146106015780631a90f186146106145780631d43b30b1461061d57806323b872dd14610630578063248a9ca31461064357806325fc07a91461066557806328acf2cf146106845780632c5dcc77146106975780632e0af008146106aa5780632f2ff15d146106b3575f80fd5b8063014a296f146104c557806301e1d114146104f257806301ffc9a714610508578063022d8af51461052b5780630539fa8c1461054057806306fdde031461054957806307a2d13a1461055e578063095ea7b3146105715780630a28a477146105845780630ab69be8146105975780630e52dbec146105be5780630f2b75aa146105dd575b5f80fd5b6104d86104d336600461564e565b610d0d565b604080519283526020830191909152015b60405180910390f35b6104fa610d42565b6040519081526020016104e9565b61051b610516366004615669565b610dee565b60405190151581526020016104e9565b61053e6105393660046156ab565b610e24565b005b6104fa60d85481565b610551610eab565b6040516104e991906156c4565b6104fa61056c3660046156f9565b610f37565b61051b61057f366004615710565b610f63565b6104fa6105923660046156f9565b610fce565b6104d86105a53660046156f9565b5f90815260d16020526040902080546001909101549091565b60da546105cb9060ff1681565b60405160ff90911681526020016104e9565b6104fa610fed565b61053e6105f3366004615777565b611092565b6104fa60cb5481565b6104fa61060f3660046157b5565b611103565b6104fa60d45481565b6104fa61062b36600461564e565b6115f3565b61051b61063e366004615807565b6116f3565b6104fa6106513660046156f9565b5f9081526065602052604090206001015490565b6104fa6106733660046156f9565b5f90815260d1602052604090205490565b61053e610692366004615855565b61185a565b61053e6106a5366004615710565b6118a6565b6104fa60dd5481565b61053e6106c136600461586e565b611916565b6105cb7f000000000000000000000000000000000000000000000000000000000000000081565b60e35461051b90600160a01b900460ff1681565b6104fa61070f36600461589c565b61193f565b6104fa611ba6565b61053e61072a36600461586e565b611c00565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b6040516104e991906158da565b6104fa60d95481565b6104fa61077a36600461589c565b611c22565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b61053e611c95565b6104fa6107bc36600461564e565b505f1990565b61053e6107d03660046156f9565b611cb7565b60dc546107ef90600160801b90046001600160801b031681565b6040516104e991906158ee565b6104fa61080a3660046156f9565b611cf6565b6104fa61081d366004615902565b611d14565b6104fa6108303660046156f9565b6121f0565b6108696108433660046156f9565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016104e9565b60975460ff1661051b565b61053e6108a2366004615941565b6121fa565b6108d56108b536600461564e565b60d26020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016104e9565b60e154610756906001600160a01b031681565b6104fa60e25481565b60e354610756906001600160a01b031681565b6104fa61092d36600461586e565b612254565b6104fa7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da5461097090600160281b900463ffffffff1681565b60405163ffffffff90911681526020016104e9565b6104fa61099336600461564e565b60cc6020525f908152604090205481565b6104fa6109b23660046156f9565b6122fa565b6104d86109c536600461586e565b612311565b61053e6109d8366004615961565b61236e565b6104fa6109eb36600461564e565b60ce6020525f908152604090205481565b61053e6123eb565b6104fa60d55481565b61053e610a1b36600461564e565b6123fd565b6104fa60d35481565b6104fa60df5481565b61051b610a4036600461586e565b61247d565b61053e610a5336600461564e565b6124a7565b6104fa610a6636600461586e565b612815565b6105516128b0565b61053e610a81366004615980565b6128bd565b6104fa610a943660046157b5565b612a1c565b60da5461097090610100900463ffffffff1681565b61053e610abc3660046156f9565b612e41565b6104fa60d75481565b6104fa5f81565b61051b610adf366004615710565b612e80565b6104d8610af236600461586e565b612fdd565b61053e610b05366004615807565b612ff9565b6104fa610b183660046156f9565b61300d565b6104fa610b2b366004615a2b565b613023565b6104fa610b3e366004615a2b565b61312b565b61053e610b5136600461564e565b613228565b6104fa610b643660046156f9565b61327c565b6104fa610b773660046156f9565b61329b565b6104d8610b8a36600461586e565b60cf60209081525f92835260408084209091529082529020805460019091015482565b6104fa610bbb36600461564e565b6132b2565b6104d8610bce36600461586e565b60d060209081525f92835260408084209091529082529020805460019091015482565b61053e610bff366004615a5f565b6132d3565b6104fa610c12366004615a2b565b613498565b61053e610c2536600461586e565b613713565b6104fa60d65481565b6104fa610c4136600461564e565b6001600160a01b03165f90815260cc602052604090205490565b6104fa610c69366004615ac9565b60cd60209081525f928352604080842090915290825290205481565b61053e610c933660046156ab565b613737565b6104fa5f80516020615f8083398151915281565b6104fa60de5481565b6104fa61378b565b6104fa610ccb3660046156f9565b61386c565b60db54610756906001600160a01b031681565b60da5461097090600160481b900463ffffffff1681565b60dc546107ef906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610d3090610f37565b610d39846115f3565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610db4575f81815260d160205260409020600381015480831115610da857824210610d8e578160020154610da3565b6002820154610da39042839003838603613876565b860195505b50506224ea0001610d5c565b50610dd760e254670de0b6b3a76400000360d454610dd061378b565b0390613894565b610ddf6138a8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610e1e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610e2e8161391e565b610e36613928565b60dd5f828254610e469190615b1d565b90915550610e5490506139a1565b60dc80546001600160801b0319166001600160801b0384161790556040517f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e90610e9f9084906158ee565b60405180910390a15050565b60c98054610eb890615b30565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee490615b30565b8015610f2f5780601f10610f0657610100808354040283529160200191610f2f565b820191905f5260205f20905b815481529060010190602001808311610f1257829003601f168201915b505050505081565b60cb545f908015610f5a57610f55610f4d610d42565b849083613876565b610f5c565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fbd9086815260200190565b60405180910390a350600192915050565b60cb545f908015610f5a57610f5581610fe5610d42565b859190613a07565b60dd5460de545f9190828183106110065760d85461100a565b60d9545b60da549091505f906110459061102d90600160481b900463ffffffff1642615b68565b6110379084615b7b565b61104090615b92565b613a34565b61105790670de0b6b3a7640000615bac565b90506110638185613894565b61107f61107883670de0b6b3a7640000615b68565b8590613894565b6110899190615b1d565b94505050505090565b5f61109c8161391e565b82826040516020016110af929190615bcb565b60405160208183030381529060405260c990816110cc9190615c46565b5082826040516020016110e0929190615d00565b60405160208183030381529060405260ca90816110fd9190615c46565b50505050565b5f61110c613ba7565b611114613bb6565b845f036111345760405163774257f760e01b815260040160405180910390fd5b60da5461114890879060ff1660035f613be1565b5f86815260d160205260409020611165611160613d7b565b613e89565b61116f8188613ec6565b60dd5f82825461117f9190615b1d565b909155505060e3546001600160a01b031680156111f057604051636c912dad60e01b81526001600160a01b03821690636c912dad906111c29087906004016158da565b5f604051808303815f87803b1580156111d9575f80fd5b505af11580156111eb573d5f803e3d5ffd5b505050505b5f6111fb8389613f44565b9050801561127f575f8160d3546112129190615b1d565b60dc549091506112509061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b60dd54906001600160801b0316613894565b60d45461125d9083615b1d565b111561127b57604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061128a610fed565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff166112d88a600101548b5f015489613f80565b6112e28888613fad565b6112ef898960d354613fc5565b6040518663ffffffff1660e01b815260040161130f959493929190615d3d565b602060405180830381865afa15801561132a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061134e9190615d63565b905061137361136c611360428f615b68565b83906301e13380613876565b8c90613fe1565b935050505080886113849190615b1d565b9350868411156113a757604051632c1b6b4160e21b815260040160405180910390fd5b6113b18585613ff5565b5f89815260d0602090815260408083206001600160a01b038916845290915281208054909103611408576001600160a01b0386165f90815260d2602052604090206001810154611401908c61406b565b6001909101555b5f8061144b61141685614154565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614180565b91509150815f1461146f5781866002015f8282546114699190615b1d565b90915550505b611478816141cc565b60405180604001604052808c855f01546114929190615b1d565b81526020018585600101546114a79190615b1d565b90525f8d815260d0602090815260408083206001600160a01b03808e168086529184529382902085518155949092015160019094019390935591519194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139061151d9033908e908890615d7a565b60405180910390a461152d6139a1565b611536896141f8565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906115849030908990600401615d9b565b5f604051808303815f87803b15801561159b575f80fd5b505af11580156115ad573d5f803e3d5ffd5b506115e79250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614246565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b81156116c85760018216156116ad575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916116689190615b1d565b90506116748188615b1d565b9650824211156116aa5761169d8561168c8542615b68565b6116969190615b7b565b8290613894565b6116a79088615b1d565b96505b50505b60019190911c906116c16224ea0082615b1d565b9050611624565b600284015480156116e9576116dc81611cf6565b6116e69087615b1d565b95505b5050505050919050565b5f6116fc613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53086611736866121f0565b6040518463ffffffff1660e01b815260040161175493929190615db5565b5f6040518083038186803b15801561176a575f80fd5b505afa15801561177c573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561184657604051630149e46f60e01b81526001600160a01b03821690630149e46f906117bf9088906004016158da565b5f604051808303815f87803b1580156117d6575f80fd5b505af11580156117e8573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f91506118189087906004016158da565b5f604051808303815f87803b15801561182f575f80fd5b505af1158015611841573d5f803e3d5ffd5b505050505b611851858585614291565b95945050505050565b5f6118648161391e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610e9f565b5f6118b08161391e565b6118bb611160613d7b565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119308161391e565b61193a838361436b565b505050565b5f611948613ba7565b611950613bb6565b835f03611970576040516356316e8760e01b815260040160405180910390fd5b60da5461198490869060ff1660035f613be1565b5f85815260d1602052604081209061199c8288613ec6565b90506119a9611160613d7b565b8060dd5f8282546119ba9190615b1d565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f9182916119ff918a906143f0565b9092509050611a0e8289615b1d565b945086851015611a3157604051632c1b6b4160e21b815260040160405180910390fd5b611a3b8489614441565b60d35f828254611a4b9190615b68565b90915550611a5b90508183615b1d565b846002015f828254611a6d9190615b68565b925050819055508060d55f828254611a859190615b1d565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611ada576001600160a01b0387165f90815260d2602052604090208054611ad7908c61406b565b90555b88815f015f828254611aec9190615b1d565b9250508190555082816001015f828254611b069190615b1d565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611b5b6139a1565b611b648a6141f8565b611b996001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614471565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611bdb57611bd66144c9565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611c14575f80fd5b611c1e8282614562565b5050565b5f611c2b613ba7565b60da54611c4090869060ff1660036002613be1565b611c4e8585858560016145c8565b9050611c586139a1565b611c8d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b949350505050565b5f80516020615f80833981519152611cac8161391e565b611cb4614952565b50565b5f611cc18161391e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610e9f565b60df545f908015610f5a57610f55611d0c61378b565b849083613a07565b5f611d1d613ba7565b6001600160a01b0384163303611d46576040516344511af160e01b815260040160405180910390fd5b611d4e613928565b60dd5f828254611d5e9190615b1d565b909155505060405163042dcf6b60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890611db5903090869089908990600401615dd9565b602060405180830381865afa158015611dd0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df49190615d63565b9250825f03611e165760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611e5057508515155b15611f5d576001821615611f42575f81421015611e8757611e748288898b5f6145c8565b9050611e808188615b68565b9650611f34565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611eb99190615b1d565b9150505f611ee060d6548542611ecf9190615b68565b611ed99190615b7b565b8390613894565b611eea9083615b1d565b9050888111611ef95788611f04565b611f04898383613876565b9250825f03611f15575f9850611f31565b611f2284848b8d5f6145c8565b9250611f2e838a615b68565b98505b50505b611f3e8186615b1d565b9450505b60019190911c90611f566224ea0082615b1d565b9050611e42565b50508315801590611f715750600281015415155b15611fa6575f611f808561327c565b90508015611fa4575f611f938288614994565b509050611fa08185615b1d565b9350505b505b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1b003130878a886040518563ffffffff1660e01b8152600401611ffa9493929190615dd9565b6040805180830381865afa158015612014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120389190615e03565b915091508160d55f82825461204d9190615b1d565b90915550612094905033306120628588615b1d565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614471565b306001600160a01b038616036120b5576120b030338984614af1565b61211a565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906120e59033908b908690600401615db5565b5f604051808303815f87803b1580156120fc575f80fd5b505af115801561210e573d5f803e3d5ffd5b5050505061211a6139a1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906121b9908a906004016158da565b5f604051808303815f87803b1580156121d0575f80fd5b505af11580156121e2573d5f803e3d5ffd5b505050505050509392505050565b5f610e1e82610f37565b5f6122048161391e565b61220c614cd9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61225e8361386c565b9050805f0361226b575f80fd5b6122a06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614471565b6122aa8282614d04565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8382614d7a565b60df545f908015610f5a57610f5581610fe561378b565b5f8061231b613ba7565b6123258484614994565b90925090506123326139a1565b6123676001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614471565b9250929050565b5f6123788161391e565b60e35460ff600160a01b90910416151582151514611c1e5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee698906123df90851515815260200190565b60405180910390a25050565b6123f3614dd9565b6123fb614e42565b565b5f6124078161391e565b60db546001600160a01b03161561242357612423611160613d7b565b60db80546001600160a01b0319166001600160a01b0384161790556124466139a1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146124f0576040516317568c8f60e21b815260040160405180910390fd5b6124f8613928565b60dd5f8282546125089190615b1d565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b811561276c576001821615612751575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916125849190615b1d565b905080861061274e5760e3546001600160a01b031680156125f957604051636c912dad60e01b81526001600160a01b03821690636c912dad906125cb908c906004016158da565b5f604051808303815f87803b1580156125e2575f80fd5b505af11580156125f4573d5f803e3d5ffd5b505050505b6126038288615b68565b965061260f8287615b1d565b83545f86815260d1602052604081209298509161262b91614e7f565b905080156126c4578060d35f8282546126449190615b68565b909155505083545f906126739061265b9084614e9e565b5f88815260d160205260409020600201549084613876565b90508060d15f8881526020019081526020015f206002015f8282546126989190615b68565b925050819055508060d55f8282546126b09190615b1d565b909155506126c09050818a615b1d565b9850505b5f85815260d0602090815260408083206001600160a01b038e16845290915281208181556001908101919091558901546126fe9086614eb3565b60018a015560408051848152602081018590526001600160a01b038c1691339188917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a450505b50505b60019190911c906127656224ea0082615b1d565b9050612540565b60028501541580159061278957506127838461327c565b93508315155b156127aa575f6127998588614994565b5090506127a68185615b1d565b9350505b8215612805578260d55f8282546127c19190615b68565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b61280d6139a1565b505050505050565b5f61281f8361300d565b90506128566001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b6128608284614d04565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8184614d7a565b60ca8054610eb890615b30565b5f54610100900460ff16158080156128db57505f54600160ff909116105b806128f45750303b1580156128f457505f5460ff166001145b6128fc575f80fd5b5f805460ff19166001179055801561291d575f805461ff0019166101001790555b612925614f72565b61292d614f84565b60da805468ffffffffffffffff0019166101004263ffffffff1690810263ffffffff60281b191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129805f3361436b565b61298a8b8b611092565b6129938961185a565b61299c88610e24565b6129a5876123fd565b6129ae86612e41565b6129b785611cb7565b6129c084613737565b6129ca83836121fa565b8015612a0f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a25613ba7565b845f03612a455760405163b8cb621960e01b815260040160405180910390fd5b60da54612a5a90879060ff1660036002613be1565b5f86815260d160205260409020612a72611160613d7b565b612a7c8188613ec6565b60dd5f828254612a8c9190615b1d565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612ad69190615b1d565b871115612af15760208101518151612aee9190615b1d565b96505b6040805180820190915281518152602080830151908201525f90612b2190612b19908a614f9e565b518490614fe4565b60d354612b2e9190615b1d565b905060dd5460d45482612b419190615b1d565b1115612b5f57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612c71575f612b73610fed565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bc78a600101548b5f01548a613f80565b612bd18989613fad565b612bdc8a8a8a613fc5565b6040518663ffffffff1660e01b8152600401612bfc959493929190615d3d565b602060405180830381865afa158015612c17573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c3b9190615d63565b9050612c66612c4d611360428f615b68565b612c5f90670de0b6b3a7640000615b1d565b8c90615028565b965050505050612c75565b8692505b85831015612c9657604051632c1b6b4160e21b815260040160405180910390fd5b612ca08484613ff5565b5f80612cec612cb7612cb2878c615b68565b614154565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614180565b9150915081846002015f828254612d039190615b1d565b90915550612d129050816141cc565b612d1c838a61503c565b5060208301518351175f03612d6f575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612d68908c614eb3565b9055612d9f565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b856001600160a01b0316876001600160a01b03168b7fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c338d8a604051612de793929190615d7a565b60405180910390a4612df76139a1565b612e008a6141f8565b612e346001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614246565b5050505095945050505050565b5f612e4b8161391e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610e9f565b5f612e89613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612ec3866121f0565b6040518463ffffffff1660e01b8152600401612ee193929190615db5565b5f6040518083038186803b158015612ef7575f80fd5b505afa158015612f09573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015612fd357604051630149e46f60e01b81526001600160a01b03821690630149e46f90612f4c9033906004016158da565b5f604051808303815f87803b158015612f63575f80fd5b505af1158015612f75573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f9150612fa59087906004016158da565b5f604051808303815f87803b158015612fbc575f80fd5b505af1158015612fce573d5f803e3d5ffd5b505050505b611c8d848461509a565b5f80612fe7613ba7565b612325612ff38561327c565b84614994565b613001613ba7565b61193a33848484614af1565b60cb545f908015610f5a57610f55611d0c610d42565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db59061307590309086908990600401615db5565b5f6040518083038186803b15801561308b575f80fd5b505afa15801561309d573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561310e57604051630149e46f60e01b81526001600160a01b03821690630149e46f906130e09086906004016158da565b5f604051808303815f87803b1580156130f7575f80fd5b505af1158015613109573d5f803e3d5ffd5b505050505b6131198585856150fd565b91506131236139a1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53084613166886121f0565b6040518463ffffffff1660e01b815260040161318493929190615db5565b5f6040518083038186803b15801561319a575f80fd5b505afa1580156131ac573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561321d57604051630149e46f60e01b81526001600160a01b03821690630149e46f906131ef9086906004016158da565b5f604051808303815f87803b158015613206575f80fd5b505af1158015613218573d5f803e3d5ffd5b505050505b6131198585856151f4565b5f6132328161391e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f908015610f5a57610f558161329361378b565b859190613876565b60cb545f908015610f5a57610f5581613293610d42565b6001600160a01b0381165f90815260cc6020526040812054610e1e90610f37565b428410156132df575f80fd5b5f60016132ea611ba6565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156133f2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134285750876001600160a01b0316816001600160a01b0316145b613430575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134a1613ba7565b6134a9613bb6565b835f036134c95760405163774257f760e01b815260040160405180910390fd5b6134d38285613ff5565b60e3546001600160a01b0316801561353f57604051636c912dad60e01b81526001600160a01b03821690636c912dad906135119086906004016158da565b5f604051808303815f87803b158015613528575f80fd5b505af115801561353a573d5f803e3d5ffd5b505050505b61354a611160613d7b565b613553856122fa565b91505f8560d4546135649190615b1d565b60d481905560dc549091506135959061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b8160d3546135a39190615b1d565b11156135c157604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135d29190615b1d565b90915550506001600160a01b0384165f90815260d2602052604081206002018054859290613601908490615b1d565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136596139a1565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906136a79030908890600401615d9b565b5f604051808303815f87803b1580156136be575f80fd5b505af11580156136d0573d5f803e3d5ffd5b5061370a9250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614246565b50509392505050565b5f8281526065602052604090206001015461372d8161391e565b61193a8383614562565b5f6137418161391e565b60dc80546001600160801b03808516600160801b0291161790556040517fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90610e9f9084906158ee565b60d45460dd5460da545f929190839061385890613851906137b990600160281b900463ffffffff1642615b68565b60db546301e13380906001600160a01b0316637c21fb1d6137da888a613fad565b6137e7898b60d354613fc5565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613826573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061384a9190615d63565b9190613876565b8490613894565b90506138648184615b1d565b935050505090565b5f610e1e8261329b565b82820281151584158583048514171661388d575f80fd5b0492915050565b5f610f5c8383670de0b6b3a7640000613876565b60da545f9081906138c490610100900463ffffffff1642615b68565b9050805f036138d4575f91505090565b60da54613918908290613904906138f2906224ea009060ff16615b7b565b60dc546001600160801b031690613894565b61390e9084615b1d565b60d5549190613876565b91505090565b611cb481336152f6565b5f6139316138a8565b90508060d55f8282546139449190615b68565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a1e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a4d57505f919050565b680755bf798b4a1bf1e58212613a61575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156123fb575f80fd5b60e354600160a01b900460ff16156123fb5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613bef6224ea0086615e25565b15613bfc57506001613c4f565b428511613c0b57506002613c4f565b613c1b60ff85166224ea00615b7b565b613c286224ea0042615e25565b613c329042615b68565b613c3c9190615b1d565b851115613c4b57506004613c4f565b5060035b826004811115613c6157613c61615e38565b816004811115613c7357613c73615e38565b14158015613ca35750816004811115613c8e57613c8e615e38565b816004811115613ca057613ca0615e38565b14155b15613d74575f826004811115613cbb57613cbb615e38565b03613d0f57806004811115613cd257613cd2615e38565b836004811115613ce457613ce4615e38565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d2157613d21615e38565b836004811115613d3357613d33615e38565b836004811115613d4557613d45615e38565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d06565b5050505050565b60d45460dd545f919082613d8f8284613fad565b60da549091505f90613de19061107890613db690600160281b900463ffffffff1642615b68565b60db5460d3546301e13380916001600160a01b031690637c21fb1d9088906137e7908b908d90613fc5565b9050613ded8185615b1d565b9350613e0460e2548261389490919063ffffffff16565b945084613e118285615b1d565b613e1b9190615b68565b60dd5560d484905560da805463ffffffff60281b1916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611cb45760e154613ead906001600160a01b0316613ea88361386c565b614d04565b8060dd5f828254613ebe9190615b1d565b909155505050565b60038201545f9042831115613f1a5760028401544260038601819055613f0390613ef1908490615b68565b613efb8487615b68565b839190613876565b9250613f0f8382615b68565b600286015550613f3d565b828103613f29575f9150613f3d565b600384018390556002840180545f90915591505b5092915050565b81545f9081613f538483615b1d565b9050613f6c613f6683876001015461533c565b82614e9e565b613f769082615b68565b9455509192915050565b5f8115801590613f8f57508383115b613f99575f611c8d565b611c8d82613fa78686615b68565b9061534a565b5f825f03613fbb575f610f5c565b610f5c828461534a565b5f835f03613fd3575f611c8d565b611c8d84613fa78486615b1d565b5f610f5c8383670de0b6b3a7640000613a07565b336001600160a01b03831614611c1e576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461193a5761403982610fce565b6140439082615b68565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f036140805750600160201b8117610e1e565b63ffffffff8316808310156140fd575f6224ea0061409e8584615b68565b6140a89190615e4c565b90506140b681610100615b68565b85901c156140d75760405163293cc41f60e21b815260040160405180910390fd5b6140e2816020615b1d565b602086901c901b9450848417600160201b1792505050610e1e565b5f6224ea0061410c8386615b68565b6141169190615e4c565b905060df81111561413a5760405163293cc41f60e21b815260040160405180910390fd5b614145816020615b1d565b6001901b851792505050610e1e565b5f8061416b60e2548461389490919063ffffffff16565b905061417681613e89565b610f5c8184615b68565b5f8082156141b4576141af61419d6141978761535e565b85614e9e565b6141a79085615b68565b859085613876565b6141b6565b5f5b90506141c28185615b68565b9150935093915050565b805f036141d65750565b60e254156141e757611cb481613e89565b8060d55f828254613ebe9190615b1d565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806110fd575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142ea576142c68382615b68565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614311908490615b68565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615fa0833981519152906143589087815260200190565b60405180910390a3506001949350505050565b614375828261247d565b611c1e575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f6143fc8661535e565b905080156144385761441d6144118683614e9e565b60408801519083613876565b92506144298385613894565b91506144358284615b68565b92505b50935093915050565b815460018301545f91906144558482615b1d565b60018601556118516144678383614e9e565b6141979084615b68565b5f6040516323b872dd60e01b5f526001600160a01b0385166004526001600160a01b0384166024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d74575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144fa9190615e5f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61456c828261247d565b15611c1e575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145e95760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906146018289613ec6565b905061460e611160613d7b565b8060dd5f82825461461f9190615b1d565b90915550505f88815260d0602090815260408083206001600160a01b0389168452825280832081518083019092528054808352600190910154928201839052909291614675918b9161467091615b1d565b614e9e565b6040805180820190915283518152602080850151908201529091505f9061469c9083614f9e565b5160e3549091506001600160a01b0316801561470c57604051636c912dad60e01b81526001600160a01b03821690636c912dad906146de908c906004016158da565b5f604051808303815f87803b1580156146f5575f80fd5b505af1158015614707573d5f803e3d5ffd5b505050505b8b4210156147d45760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147549186906143f0565b90925090506147638183615b1d565b886002015f8282546147759190615b68565b909155505089156147a8578060d55f8282546147919190615b1d565b909155506147a190508286615b68565b98506147cd565b6147b28183615b1d565b60d55f8282546147c29190615b1d565b925050819055508498505b505061481b565b60d6546147ef906147e58e42615b68565b6138519190615b7b565b6147f99084615b1d565b96506148058388615b68565b60d55f8282546148159190615b1d565b90915550505b8987111561483c57604051632c1b6b4160e21b815260040160405180910390fd5b6148468683614e7f565b60d35f8282546148569190615b68565b909155506148669050848461503c565b5060208401518451175f036148c2575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d2909252909120908101546148b7908e614eb3565b6001909101556148f2565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a46149438c6141f8565b50505050505095945050505050565b61495a61537c565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516139fd91906158da565b60e3545f9081906001600160a01b03168015614a0457604051636c912dad60e01b81526001600160a01b03821690636c912dad906149d69087906004016158da565b5f604051808303815f87803b1580156149ed575f80fd5b505af11580156149ff573d5f803e3d5ffd5b505050505b614a0f611160613d7b565b6001600160a01b0384165f90815260d2602052604090206002810154614a358782614e9e565b9350614a4084611cf6565b9450845f03614a625760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a739190615b68565b90915550614a8390508482615b68565b82600201819055508360df5f828254614a9c9190615b68565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614b115760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e16ee72090614b5f9087903090600401615d9b565b5f6040518083038186803b158015614b75575f80fd5b505afa158015614b87573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bf857604051630149e46f60e01b81526001600160a01b03821690630149e46f90614bca9086906004016158da565b5f604051808303815f87803b158015614be1575f80fd5b505af1158015614bf3573d5f803e3d5ffd5b505050505b5f614c0283610fce565b9050614c0e838261538a565b614c188482615403565b60408051848152602081018390526001600160a01b03808716929088169133915f80516020615f60833981519152910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c9591815260200190565b60405180910390a3614ca56139a1565b61280d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614246565b614ce1610fed565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d7057604051630149e46f60e01b81526001600160a01b03821690630149e46f90614d429086906004016158da565b5f604051808303815f87803b158015614d59575f80fd5b505af1158015614d6b573d5f803e3d5ffd5b505050505b61193a838361546a565b614d82613ba7565b614d8a613bb6565b614d92614cd9565b5f614d9b613d7b565b90505f614da6613928565b9050614db28482615b1d565b60dd5f828254614dc29190615b1d565b90915550614dd1905082613e89565b6110fd6139a1565b614e037f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361247d565b158015614e245750614e225f80516020615f808339815191523361247d565b155b156123fb57604051631d006fdb60e31b815260040160405180910390fd5b614e4a613ba7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586149873390565b815460018301545f9190614e938483615b68565b855561185161446783835b5f818310614eac5781610f5c565b5090919050565b5f821580614ec6575081600160201b1783145b15614ed257505f610e1e565b63ffffffff8316808303614f4057602184901c60015b60018216158015614ef857508115155b15614f0957600191821c9101614ee8565b6020614f158282615b1d565b9690961c90951b9485614f2b6224ea0083615b7b565b614f359087615b1d565b179350505050610e1e565b6224ea00614f4e8285615b68565b614f589190615e4c565b614f63906020615b1d565b6001901b198416915050610e1e565b5f54610100900460ff166123fb575f80fd5b5f54610100900460ff16614f96575f80fd5b6123fb6154b9565b604080518082019091525f8082526020820152825160208401515f91614fc8916132939082615b1d565b8085529050614fd78184615b68565b6020850152509192915050565b815460018301545f919082614ff98583615b68565b90506150058184614e9e565b61500f8385614e9e565b6150199190615b68565b60019096015550929392505050565b5f610f5c83670de0b6b3a764000084613876565b604080518082019091525f8082526020820152602083015183515f9161506191615b1d565b90505f61506e8483615b68565b855190915061507f90829084613876565b80865261508c9082615b68565b602086015250929392505050565b335f90815260cc60205260408120805483919083906150ba908490615b68565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615fa083398151915290610fbd9086815260200190565b5f61510784610fce565b9050336001600160a01b03831614615174576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151725761514e8282615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61517e848261538a565b6151888282615403565b60408051858152602081018390526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614246565b5f336001600160a01b03831614615260576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461525e5761523a8582615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b615269846121f0565b9050805f03615276575f80fd5b615280818561538a565b61528a8285615403565b60408051828152602081018690526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614246565b615300828261247d565b611c1e5761530d816154d7565b6153188360206154e9565b604051602001615329929190615ee7565b6040516020818303038152906040525f80fd5b5f818311614eac5781610f5c565b5f610f5c83670de0b6b3a764000084613a07565b805160208201515f91906153728282614e9e565b611c8d9083615b68565b60975460ff166123fb575f80fd5b615392613ba7565b61539a614cd9565b6153a5611160613d7b565b5f6153ae613928565b90505f838260dd546153c09190615b1d565b6153ca9190615b68565b90508060d45460d3546153dd9190615b1d565b11156153fb57604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc60205260408120805483929061542a908490615b68565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615fa0833981519152906020015b60405180910390a35050565b8060cb5f82825461547b9190615b1d565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615fa0833981519152910161545e565b5f54610100900460ff166154cb575f80fd5b6097805460ff19169055565b6060610e1e6001600160a01b03831660145b60605f6154f7836002615b7b565b615502906002615b1d565b6001600160401b0381111561551957615519615bee565b6040519080825280601f01601f191660200182016040528015615543576020820181803683370190505b509050600360fc1b815f8151811061555d5761555d615f36565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061558b5761558b615f36565b60200101906001600160f81b03191690815f1a9053505f6155ad846002615b7b565b6155b8906001615b1d565b90505b600181111561562f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106155ec576155ec615f36565b1a60f81b82828151811061560257615602615f36565b60200101906001600160f81b03191690815f1a90535060049490941c9361562881615f4a565b90506155bb565b508315610f5c575f80fd5b6001600160a01b0381168114611cb4575f80fd5b5f6020828403121561565e575f80fd5b8135610f5c8161563a565b5f60208284031215615679575f80fd5b81356001600160e01b031981168114610f5c575f80fd5b80356001600160801b03811681146156a6575f80fd5b919050565b5f602082840312156156bb575f80fd5b610f5c82615690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615709575f80fd5b5035919050565b5f8060408385031215615721575f80fd5b823561572c8161563a565b946020939093013593505050565b5f8083601f84011261574a575f80fd5b5081356001600160401b03811115615760575f80fd5b602083019150836020828501011115612367575f80fd5b5f8060208385031215615788575f80fd5b82356001600160401b0381111561579d575f80fd5b6157a98582860161573a565b90969095509350505050565b5f805f805f60a086880312156157c9575f80fd5b85359450602086013593506040860135925060608601356157e98161563a565b915060808601356157f98161563a565b809150509295509295909350565b5f805f60608486031215615819575f80fd5b83356158248161563a565b925060208401356158348161563a565b929592945050506040919091013590565b803560ff811681146156a6575f80fd5b5f60208284031215615865575f80fd5b610f5c82615845565b5f806040838503121561587f575f80fd5b8235915060208301356158918161563a565b809150509250929050565b5f805f80608085870312156158af575f80fd5b84359350602085013592506040850135915060608501356158cf8161563a565b939692955090935050565b6001600160a01b0391909116815260200190565b6001600160801b0391909116815260200190565b5f805f60608486031215615914575f80fd5b833561591f8161563a565b92506020840135915060408401356159368161563a565b809150509250925092565b5f8060408385031215615952575f80fd5b50508035926020909101359150565b5f60208284031215615971575f80fd5b81358015158114610f5c575f80fd5b5f805f805f805f805f806101208b8d03121561599a575f80fd5b8a356001600160401b038111156159af575f80fd5b6159bb8d828e0161573a565b909b5099506159ce905060208c01615845565b97506159dc60408c01615690565b965060608b01356159ec8161563a565b955060808b0135945060a08b01359350615a0860c08c01615690565b999c989b50969995989497939650919460e0810135936101009091013592509050565b5f805f60608486031215615a3d575f80fd5b833592506020840135615a4f8161563a565b915060408401356159368161563a565b5f805f805f805f60e0888a031215615a75575f80fd5b8735615a808161563a565b96506020880135615a908161563a565b95506040880135945060608801359350615aac60808901615845565b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215615ada575f80fd5b8235615ae58161563a565b915060208301356158918161563a565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610e1e57610e1e615b09565b600181811c90821680615b4457607f821691505b602082108103615b6257634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610e1e57610e1e615b09565b8082028115828204841417610e1e57610e1e615b09565b5f600160ff1b8201615ba657615ba6615b09565b505f0390565b8181035f831280158383131683831282161715613f3d57613f3d615b09565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f82111561193a57805f5260205f20601f840160051c81016020851015615c275750805b601f840160051c820191505b81811015613d74575f8155600101615c33565b81516001600160401b03811115615c5f57615c5f615bee565b615c7381615c6d8454615b30565b84615c02565b6020601f821160018114615ca5575f8315615c8e5750848201515b5f19600385901b1c1916600184901b178455613d74565b5f84815260208120601f198516915b82811015615cd45787850151825560209485019460019092019101615cb4565b5084821015615cf157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b038281168282160390811115610e1e57610e1e615b09565b94855260ff93909316602085015260408401919091526060830152608082015260a00190565b5f60208284031215615d73575f80fd5b5051919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b5f8060408385031215615e14575f80fd5b505080516020909101519092909150565b5f82615e3357615e33615af5565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615e5a57615e5a615af5565b500490565b5f808354615e6c81615b30565b600182168015615e835760018114615e9857615ec5565b60ff1983168652811515820286019350615ec5565b865f5260205f205f5b83811015615ebd57815488820152600190910190602001615ea1565b505081860193505b509195945050505050565b5f81518060208401855e5f93019283525090919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81525f615f126017830185615ed0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526118516011820185615ed0565b634e487b7160e01b5f52603260045260245ffd5b5f81615f5857615f58615b09565b505f19019056fefbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122005ec196d152ea67004b2106a9e8456d6fce9e4ca698150d3a643ce4c0c94880d64736f6c634300081a0033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106104c1575f3560e01c80636e76fc8f11610283578063b2a02ff111610168578063d5164184116100e0578063e63ab1e91161009a578063e63ab1e914610c98578063e94b3c2114610cac578063eee8c9e014610cb5578063ef8b30f714610cbd578063f3fdb15a14610cd0578063fb0fc4c314610ce3578063fea45d9414610cfa575f80fd5b8063d516418414610c04578063d547741f14610c17578063d6b7494f14610c2a578063d905777e14610c33578063dd62ed3e14610c5b578063e00b262514610c85575f80fd5b8063b2a02ff114610af7578063b3d7f6b914610b0a578063b460af9414610b1d578063ba08765214610b30578063bee36bb314610b43578063bf722ca214610b56578063c63d75b6146107ae578063c6e6f59214610b69578063ccfd8b1114610b7c578063ce96cb7714610bad578063d2681a0b14610bc0578063d505accf14610bf1575f80fd5b806391d14854116101fb57806391d1485414610a32578063926bb63314610a4557806394bf804d14610a5857806395d89b4114610a6b57806397bce8d014610a73578063a05a091a14610a86578063a16a885014610a99578063a1bab44714610aae578063a1e8f02b14610ac1578063a217fddf14610aca578063a9059cbb14610ad1578063acb7081514610ae4575f80fd5b80636e76fc8f146109325780636eb9ffeb1461095957806370a082311461098557806378007e23146109a45780637ad226dc146109b75780637e932d32146109ca5780637ecebe00146109dd5780638456cb59146109fc5780638a1baa4614610a045780638bcd401614610a0d5780638c3cba5a14610a205780638d0e5f0214610a29575f80fd5b8063313ce567116103a95780634322b714116103215780634322b714146107d557806347dffde0146107fc5780634914c0081461080f5780634cdad506146108225780634e7c5059146108355780635c975abb146108895780635cc2ef83146108945780635e5c06e2146108a757806361d027b3146108f057806366601032146109035780636bb65f531461090c5780636e553f651461091f575f80fd5b8063313ce567146106c657806333eeb147146106ed57806334f7d1f2146107015780633644e5151461071457806336568abe1461071c57806338d52e0f1461072f5780633aa18d6f146107635780633c6f317f1461076c5780633ec045a61461077f5780633f4ba83a146107a6578063402d267d146107ae57806342da42bf146107c2575f80fd5b8063137001011161043c57806313700101146105e557806318160ddd146105f85780631a5b9e62146106015780631a90f186146106145780631d43b30b1461061d57806323b872dd14610630578063248a9ca31461064357806325fc07a91461066557806328acf2cf146106845780632c5dcc77146106975780632e0af008146106aa5780632f2ff15d146106b3575f80fd5b8063014a296f146104c557806301e1d114146104f257806301ffc9a714610508578063022d8af51461052b5780630539fa8c1461054057806306fdde031461054957806307a2d13a1461055e578063095ea7b3146105715780630a28a477146105845780630ab69be8146105975780630e52dbec146105be5780630f2b75aa146105dd575b5f80fd5b6104d86104d336600461564e565b610d0d565b604080519283526020830191909152015b60405180910390f35b6104fa610d42565b6040519081526020016104e9565b61051b610516366004615669565b610dee565b60405190151581526020016104e9565b61053e6105393660046156ab565b610e24565b005b6104fa60d85481565b610551610eab565b6040516104e991906156c4565b6104fa61056c3660046156f9565b610f37565b61051b61057f366004615710565b610f63565b6104fa6105923660046156f9565b610fce565b6104d86105a53660046156f9565b5f90815260d16020526040902080546001909101549091565b60da546105cb9060ff1681565b60405160ff90911681526020016104e9565b6104fa610fed565b61053e6105f3366004615777565b611092565b6104fa60cb5481565b6104fa61060f3660046157b5565b611103565b6104fa60d45481565b6104fa61062b36600461564e565b6115f3565b61051b61063e366004615807565b6116f3565b6104fa6106513660046156f9565b5f9081526065602052604090206001015490565b6104fa6106733660046156f9565b5f90815260d1602052604090205490565b61053e610692366004615855565b61185a565b61053e6106a5366004615710565b6118a6565b6104fa60dd5481565b61053e6106c136600461586e565b611916565b6105cb7f000000000000000000000000000000000000000000000000000000000000000081565b60e35461051b90600160a01b900460ff1681565b6104fa61070f36600461589c565b61193f565b6104fa611ba6565b61053e61072a36600461586e565b611c00565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b6040516104e991906158da565b6104fa60d95481565b6104fa61077a36600461589c565b611c22565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b61053e611c95565b6104fa6107bc36600461564e565b505f1990565b61053e6107d03660046156f9565b611cb7565b60dc546107ef90600160801b90046001600160801b031681565b6040516104e991906158ee565b6104fa61080a3660046156f9565b611cf6565b6104fa61081d366004615902565b611d14565b6104fa6108303660046156f9565b6121f0565b6108696108433660046156f9565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016104e9565b60975460ff1661051b565b61053e6108a2366004615941565b6121fa565b6108d56108b536600461564e565b60d26020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016104e9565b60e154610756906001600160a01b031681565b6104fa60e25481565b60e354610756906001600160a01b031681565b6104fa61092d36600461586e565b612254565b6104fa7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da5461097090600160281b900463ffffffff1681565b60405163ffffffff90911681526020016104e9565b6104fa61099336600461564e565b60cc6020525f908152604090205481565b6104fa6109b23660046156f9565b6122fa565b6104d86109c536600461586e565b612311565b61053e6109d8366004615961565b61236e565b6104fa6109eb36600461564e565b60ce6020525f908152604090205481565b61053e6123eb565b6104fa60d55481565b61053e610a1b36600461564e565b6123fd565b6104fa60d35481565b6104fa60df5481565b61051b610a4036600461586e565b61247d565b61053e610a5336600461564e565b6124a7565b6104fa610a6636600461586e565b612815565b6105516128b0565b61053e610a81366004615980565b6128bd565b6104fa610a943660046157b5565b612a1c565b60da5461097090610100900463ffffffff1681565b61053e610abc3660046156f9565b612e41565b6104fa60d75481565b6104fa5f81565b61051b610adf366004615710565b612e80565b6104d8610af236600461586e565b612fdd565b61053e610b05366004615807565b612ff9565b6104fa610b183660046156f9565b61300d565b6104fa610b2b366004615a2b565b613023565b6104fa610b3e366004615a2b565b61312b565b61053e610b5136600461564e565b613228565b6104fa610b643660046156f9565b61327c565b6104fa610b773660046156f9565b61329b565b6104d8610b8a36600461586e565b60cf60209081525f92835260408084209091529082529020805460019091015482565b6104fa610bbb36600461564e565b6132b2565b6104d8610bce36600461586e565b60d060209081525f92835260408084209091529082529020805460019091015482565b61053e610bff366004615a5f565b6132d3565b6104fa610c12366004615a2b565b613498565b61053e610c2536600461586e565b613713565b6104fa60d65481565b6104fa610c4136600461564e565b6001600160a01b03165f90815260cc602052604090205490565b6104fa610c69366004615ac9565b60cd60209081525f928352604080842090915290825290205481565b61053e610c933660046156ab565b613737565b6104fa5f80516020615f8083398151915281565b6104fa60de5481565b6104fa61378b565b6104fa610ccb3660046156f9565b61386c565b60db54610756906001600160a01b031681565b60da5461097090600160481b900463ffffffff1681565b60dc546107ef906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610d3090610f37565b610d39846115f3565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610db4575f81815260d160205260409020600381015480831115610da857824210610d8e578160020154610da3565b6002820154610da39042839003838603613876565b860195505b50506224ea0001610d5c565b50610dd760e254670de0b6b3a76400000360d454610dd061378b565b0390613894565b610ddf6138a8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610e1e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610e2e8161391e565b610e36613928565b60dd5f828254610e469190615b1d565b90915550610e5490506139a1565b60dc80546001600160801b0319166001600160801b0384161790556040517f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e90610e9f9084906158ee565b60405180910390a15050565b60c98054610eb890615b30565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee490615b30565b8015610f2f5780601f10610f0657610100808354040283529160200191610f2f565b820191905f5260205f20905b815481529060010190602001808311610f1257829003601f168201915b505050505081565b60cb545f908015610f5a57610f55610f4d610d42565b849083613876565b610f5c565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fbd9086815260200190565b60405180910390a350600192915050565b60cb545f908015610f5a57610f5581610fe5610d42565b859190613a07565b60dd5460de545f9190828183106110065760d85461100a565b60d9545b60da549091505f906110459061102d90600160481b900463ffffffff1642615b68565b6110379084615b7b565b61104090615b92565b613a34565b61105790670de0b6b3a7640000615bac565b90506110638185613894565b61107f61107883670de0b6b3a7640000615b68565b8590613894565b6110899190615b1d565b94505050505090565b5f61109c8161391e565b82826040516020016110af929190615bcb565b60405160208183030381529060405260c990816110cc9190615c46565b5082826040516020016110e0929190615d00565b60405160208183030381529060405260ca90816110fd9190615c46565b50505050565b5f61110c613ba7565b611114613bb6565b845f036111345760405163774257f760e01b815260040160405180910390fd5b60da5461114890879060ff1660035f613be1565b5f86815260d160205260409020611165611160613d7b565b613e89565b61116f8188613ec6565b60dd5f82825461117f9190615b1d565b909155505060e3546001600160a01b031680156111f057604051636c912dad60e01b81526001600160a01b03821690636c912dad906111c29087906004016158da565b5f604051808303815f87803b1580156111d9575f80fd5b505af11580156111eb573d5f803e3d5ffd5b505050505b5f6111fb8389613f44565b9050801561127f575f8160d3546112129190615b1d565b60dc549091506112509061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b60dd54906001600160801b0316613894565b60d45461125d9083615b1d565b111561127b57604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061128a610fed565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff166112d88a600101548b5f015489613f80565b6112e28888613fad565b6112ef898960d354613fc5565b6040518663ffffffff1660e01b815260040161130f959493929190615d3d565b602060405180830381865afa15801561132a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061134e9190615d63565b905061137361136c611360428f615b68565b83906301e13380613876565b8c90613fe1565b935050505080886113849190615b1d565b9350868411156113a757604051632c1b6b4160e21b815260040160405180910390fd5b6113b18585613ff5565b5f89815260d0602090815260408083206001600160a01b038916845290915281208054909103611408576001600160a01b0386165f90815260d2602052604090206001810154611401908c61406b565b6001909101555b5f8061144b61141685614154565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614180565b91509150815f1461146f5781866002015f8282546114699190615b1d565b90915550505b611478816141cc565b60405180604001604052808c855f01546114929190615b1d565b81526020018585600101546114a79190615b1d565b90525f8d815260d0602090815260408083206001600160a01b03808e168086529184529382902085518155949092015160019094019390935591519194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139061151d9033908e908890615d7a565b60405180910390a461152d6139a1565b611536896141f8565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906115849030908990600401615d9b565b5f604051808303815f87803b15801561159b575f80fd5b505af11580156115ad573d5f803e3d5ffd5b506115e79250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614246565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b81156116c85760018216156116ad575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916116689190615b1d565b90506116748188615b1d565b9650824211156116aa5761169d8561168c8542615b68565b6116969190615b7b565b8290613894565b6116a79088615b1d565b96505b50505b60019190911c906116c16224ea0082615b1d565b9050611624565b600284015480156116e9576116dc81611cf6565b6116e69087615b1d565b95505b5050505050919050565b5f6116fc613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53086611736866121f0565b6040518463ffffffff1660e01b815260040161175493929190615db5565b5f6040518083038186803b15801561176a575f80fd5b505afa15801561177c573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561184657604051630149e46f60e01b81526001600160a01b03821690630149e46f906117bf9088906004016158da565b5f604051808303815f87803b1580156117d6575f80fd5b505af11580156117e8573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f91506118189087906004016158da565b5f604051808303815f87803b15801561182f575f80fd5b505af1158015611841573d5f803e3d5ffd5b505050505b611851858585614291565b95945050505050565b5f6118648161391e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610e9f565b5f6118b08161391e565b6118bb611160613d7b565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119308161391e565b61193a838361436b565b505050565b5f611948613ba7565b611950613bb6565b835f03611970576040516356316e8760e01b815260040160405180910390fd5b60da5461198490869060ff1660035f613be1565b5f85815260d1602052604081209061199c8288613ec6565b90506119a9611160613d7b565b8060dd5f8282546119ba9190615b1d565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f9182916119ff918a906143f0565b9092509050611a0e8289615b1d565b945086851015611a3157604051632c1b6b4160e21b815260040160405180910390fd5b611a3b8489614441565b60d35f828254611a4b9190615b68565b90915550611a5b90508183615b1d565b846002015f828254611a6d9190615b68565b925050819055508060d55f828254611a859190615b1d565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611ada576001600160a01b0387165f90815260d2602052604090208054611ad7908c61406b565b90555b88815f015f828254611aec9190615b1d565b9250508190555082816001015f828254611b069190615b1d565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611b5b6139a1565b611b648a6141f8565b611b996001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614471565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611bdb57611bd66144c9565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611c14575f80fd5b611c1e8282614562565b5050565b5f611c2b613ba7565b60da54611c4090869060ff1660036002613be1565b611c4e8585858560016145c8565b9050611c586139a1565b611c8d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b949350505050565b5f80516020615f80833981519152611cac8161391e565b611cb4614952565b50565b5f611cc18161391e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610e9f565b60df545f908015610f5a57610f55611d0c61378b565b849083613a07565b5f611d1d613ba7565b6001600160a01b0384163303611d46576040516344511af160e01b815260040160405180910390fd5b611d4e613928565b60dd5f828254611d5e9190615b1d565b909155505060405163042dcf6b60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890611db5903090869089908990600401615dd9565b602060405180830381865afa158015611dd0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df49190615d63565b9250825f03611e165760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611e5057508515155b15611f5d576001821615611f42575f81421015611e8757611e748288898b5f6145c8565b9050611e808188615b68565b9650611f34565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611eb99190615b1d565b9150505f611ee060d6548542611ecf9190615b68565b611ed99190615b7b565b8390613894565b611eea9083615b1d565b9050888111611ef95788611f04565b611f04898383613876565b9250825f03611f15575f9850611f31565b611f2284848b8d5f6145c8565b9250611f2e838a615b68565b98505b50505b611f3e8186615b1d565b9450505b60019190911c90611f566224ea0082615b1d565b9050611e42565b50508315801590611f715750600281015415155b15611fa6575f611f808561327c565b90508015611fa4575f611f938288614994565b509050611fa08185615b1d565b9350505b505b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1b003130878a886040518563ffffffff1660e01b8152600401611ffa9493929190615dd9565b6040805180830381865afa158015612014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120389190615e03565b915091508160d55f82825461204d9190615b1d565b90915550612094905033306120628588615b1d565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614471565b306001600160a01b038616036120b5576120b030338984614af1565b61211a565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906120e59033908b908690600401615db5565b5f604051808303815f87803b1580156120fc575f80fd5b505af115801561210e573d5f803e3d5ffd5b5050505061211a6139a1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906121b9908a906004016158da565b5f604051808303815f87803b1580156121d0575f80fd5b505af11580156121e2573d5f803e3d5ffd5b505050505050509392505050565b5f610e1e82610f37565b5f6122048161391e565b61220c614cd9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61225e8361386c565b9050805f0361226b575f80fd5b6122a06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614471565b6122aa8282614d04565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8382614d7a565b60df545f908015610f5a57610f5581610fe561378b565b5f8061231b613ba7565b6123258484614994565b90925090506123326139a1565b6123676001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614471565b9250929050565b5f6123788161391e565b60e35460ff600160a01b90910416151582151514611c1e5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee698906123df90851515815260200190565b60405180910390a25050565b6123f3614dd9565b6123fb614e42565b565b5f6124078161391e565b60db546001600160a01b03161561242357612423611160613d7b565b60db80546001600160a01b0319166001600160a01b0384161790556124466139a1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146124f0576040516317568c8f60e21b815260040160405180910390fd5b6124f8613928565b60dd5f8282546125089190615b1d565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b811561276c576001821615612751575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916125849190615b1d565b905080861061274e5760e3546001600160a01b031680156125f957604051636c912dad60e01b81526001600160a01b03821690636c912dad906125cb908c906004016158da565b5f604051808303815f87803b1580156125e2575f80fd5b505af11580156125f4573d5f803e3d5ffd5b505050505b6126038288615b68565b965061260f8287615b1d565b83545f86815260d1602052604081209298509161262b91614e7f565b905080156126c4578060d35f8282546126449190615b68565b909155505083545f906126739061265b9084614e9e565b5f88815260d160205260409020600201549084613876565b90508060d15f8881526020019081526020015f206002015f8282546126989190615b68565b925050819055508060d55f8282546126b09190615b1d565b909155506126c09050818a615b1d565b9850505b5f85815260d0602090815260408083206001600160a01b038e16845290915281208181556001908101919091558901546126fe9086614eb3565b60018a015560408051848152602081018590526001600160a01b038c1691339188917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a450505b50505b60019190911c906127656224ea0082615b1d565b9050612540565b60028501541580159061278957506127838461327c565b93508315155b156127aa575f6127998588614994565b5090506127a68185615b1d565b9350505b8215612805578260d55f8282546127c19190615b68565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b61280d6139a1565b505050505050565b5f61281f8361300d565b90506128566001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b6128608284614d04565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8184614d7a565b60ca8054610eb890615b30565b5f54610100900460ff16158080156128db57505f54600160ff909116105b806128f45750303b1580156128f457505f5460ff166001145b6128fc575f80fd5b5f805460ff19166001179055801561291d575f805461ff0019166101001790555b612925614f72565b61292d614f84565b60da805468ffffffffffffffff0019166101004263ffffffff1690810263ffffffff60281b191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129805f3361436b565b61298a8b8b611092565b6129938961185a565b61299c88610e24565b6129a5876123fd565b6129ae86612e41565b6129b785611cb7565b6129c084613737565b6129ca83836121fa565b8015612a0f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a25613ba7565b845f03612a455760405163b8cb621960e01b815260040160405180910390fd5b60da54612a5a90879060ff1660036002613be1565b5f86815260d160205260409020612a72611160613d7b565b612a7c8188613ec6565b60dd5f828254612a8c9190615b1d565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612ad69190615b1d565b871115612af15760208101518151612aee9190615b1d565b96505b6040805180820190915281518152602080830151908201525f90612b2190612b19908a614f9e565b518490614fe4565b60d354612b2e9190615b1d565b905060dd5460d45482612b419190615b1d565b1115612b5f57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612c71575f612b73610fed565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bc78a600101548b5f01548a613f80565b612bd18989613fad565b612bdc8a8a8a613fc5565b6040518663ffffffff1660e01b8152600401612bfc959493929190615d3d565b602060405180830381865afa158015612c17573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c3b9190615d63565b9050612c66612c4d611360428f615b68565b612c5f90670de0b6b3a7640000615b1d565b8c90615028565b965050505050612c75565b8692505b85831015612c9657604051632c1b6b4160e21b815260040160405180910390fd5b612ca08484613ff5565b5f80612cec612cb7612cb2878c615b68565b614154565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614180565b9150915081846002015f828254612d039190615b1d565b90915550612d129050816141cc565b612d1c838a61503c565b5060208301518351175f03612d6f575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612d68908c614eb3565b9055612d9f565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b856001600160a01b0316876001600160a01b03168b7fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c338d8a604051612de793929190615d7a565b60405180910390a4612df76139a1565b612e008a6141f8565b612e346001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614246565b5050505095945050505050565b5f612e4b8161391e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610e9f565b5f612e89613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612ec3866121f0565b6040518463ffffffff1660e01b8152600401612ee193929190615db5565b5f6040518083038186803b158015612ef7575f80fd5b505afa158015612f09573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015612fd357604051630149e46f60e01b81526001600160a01b03821690630149e46f90612f4c9033906004016158da565b5f604051808303815f87803b158015612f63575f80fd5b505af1158015612f75573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f9150612fa59087906004016158da565b5f604051808303815f87803b158015612fbc575f80fd5b505af1158015612fce573d5f803e3d5ffd5b505050505b611c8d848461509a565b5f80612fe7613ba7565b612325612ff38561327c565b84614994565b613001613ba7565b61193a33848484614af1565b60cb545f908015610f5a57610f55611d0c610d42565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db59061307590309086908990600401615db5565b5f6040518083038186803b15801561308b575f80fd5b505afa15801561309d573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561310e57604051630149e46f60e01b81526001600160a01b03821690630149e46f906130e09086906004016158da565b5f604051808303815f87803b1580156130f7575f80fd5b505af1158015613109573d5f803e3d5ffd5b505050505b6131198585856150fd565b91506131236139a1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53084613166886121f0565b6040518463ffffffff1660e01b815260040161318493929190615db5565b5f6040518083038186803b15801561319a575f80fd5b505afa1580156131ac573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561321d57604051630149e46f60e01b81526001600160a01b03821690630149e46f906131ef9086906004016158da565b5f604051808303815f87803b158015613206575f80fd5b505af1158015613218573d5f803e3d5ffd5b505050505b6131198585856151f4565b5f6132328161391e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f908015610f5a57610f558161329361378b565b859190613876565b60cb545f908015610f5a57610f5581613293610d42565b6001600160a01b0381165f90815260cc6020526040812054610e1e90610f37565b428410156132df575f80fd5b5f60016132ea611ba6565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156133f2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134285750876001600160a01b0316816001600160a01b0316145b613430575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134a1613ba7565b6134a9613bb6565b835f036134c95760405163774257f760e01b815260040160405180910390fd5b6134d38285613ff5565b60e3546001600160a01b0316801561353f57604051636c912dad60e01b81526001600160a01b03821690636c912dad906135119086906004016158da565b5f604051808303815f87803b158015613528575f80fd5b505af115801561353a573d5f803e3d5ffd5b505050505b61354a611160613d7b565b613553856122fa565b91505f8560d4546135649190615b1d565b60d481905560dc549091506135959061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b8160d3546135a39190615b1d565b11156135c157604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135d29190615b1d565b90915550506001600160a01b0384165f90815260d2602052604081206002018054859290613601908490615b1d565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136596139a1565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906136a79030908890600401615d9b565b5f604051808303815f87803b1580156136be575f80fd5b505af11580156136d0573d5f803e3d5ffd5b5061370a9250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614246565b50509392505050565b5f8281526065602052604090206001015461372d8161391e565b61193a8383614562565b5f6137418161391e565b60dc80546001600160801b03808516600160801b0291161790556040517fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90610e9f9084906158ee565b60d45460dd5460da545f929190839061385890613851906137b990600160281b900463ffffffff1642615b68565b60db546301e13380906001600160a01b0316637c21fb1d6137da888a613fad565b6137e7898b60d354613fc5565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613826573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061384a9190615d63565b9190613876565b8490613894565b90506138648184615b1d565b935050505090565b5f610e1e8261329b565b82820281151584158583048514171661388d575f80fd5b0492915050565b5f610f5c8383670de0b6b3a7640000613876565b60da545f9081906138c490610100900463ffffffff1642615b68565b9050805f036138d4575f91505090565b60da54613918908290613904906138f2906224ea009060ff16615b7b565b60dc546001600160801b031690613894565b61390e9084615b1d565b60d5549190613876565b91505090565b611cb481336152f6565b5f6139316138a8565b90508060d55f8282546139449190615b68565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a1e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a4d57505f919050565b680755bf798b4a1bf1e58212613a61575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156123fb575f80fd5b60e354600160a01b900460ff16156123fb5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613bef6224ea0086615e25565b15613bfc57506001613c4f565b428511613c0b57506002613c4f565b613c1b60ff85166224ea00615b7b565b613c286224ea0042615e25565b613c329042615b68565b613c3c9190615b1d565b851115613c4b57506004613c4f565b5060035b826004811115613c6157613c61615e38565b816004811115613c7357613c73615e38565b14158015613ca35750816004811115613c8e57613c8e615e38565b816004811115613ca057613ca0615e38565b14155b15613d74575f826004811115613cbb57613cbb615e38565b03613d0f57806004811115613cd257613cd2615e38565b836004811115613ce457613ce4615e38565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d2157613d21615e38565b836004811115613d3357613d33615e38565b836004811115613d4557613d45615e38565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d06565b5050505050565b60d45460dd545f919082613d8f8284613fad565b60da549091505f90613de19061107890613db690600160281b900463ffffffff1642615b68565b60db5460d3546301e13380916001600160a01b031690637c21fb1d9088906137e7908b908d90613fc5565b9050613ded8185615b1d565b9350613e0460e2548261389490919063ffffffff16565b945084613e118285615b1d565b613e1b9190615b68565b60dd5560d484905560da805463ffffffff60281b1916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611cb45760e154613ead906001600160a01b0316613ea88361386c565b614d04565b8060dd5f828254613ebe9190615b1d565b909155505050565b60038201545f9042831115613f1a5760028401544260038601819055613f0390613ef1908490615b68565b613efb8487615b68565b839190613876565b9250613f0f8382615b68565b600286015550613f3d565b828103613f29575f9150613f3d565b600384018390556002840180545f90915591505b5092915050565b81545f9081613f538483615b1d565b9050613f6c613f6683876001015461533c565b82614e9e565b613f769082615b68565b9455509192915050565b5f8115801590613f8f57508383115b613f99575f611c8d565b611c8d82613fa78686615b68565b9061534a565b5f825f03613fbb575f610f5c565b610f5c828461534a565b5f835f03613fd3575f611c8d565b611c8d84613fa78486615b1d565b5f610f5c8383670de0b6b3a7640000613a07565b336001600160a01b03831614611c1e576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461193a5761403982610fce565b6140439082615b68565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f036140805750600160201b8117610e1e565b63ffffffff8316808310156140fd575f6224ea0061409e8584615b68565b6140a89190615e4c565b90506140b681610100615b68565b85901c156140d75760405163293cc41f60e21b815260040160405180910390fd5b6140e2816020615b1d565b602086901c901b9450848417600160201b1792505050610e1e565b5f6224ea0061410c8386615b68565b6141169190615e4c565b905060df81111561413a5760405163293cc41f60e21b815260040160405180910390fd5b614145816020615b1d565b6001901b851792505050610e1e565b5f8061416b60e2548461389490919063ffffffff16565b905061417681613e89565b610f5c8184615b68565b5f8082156141b4576141af61419d6141978761535e565b85614e9e565b6141a79085615b68565b859085613876565b6141b6565b5f5b90506141c28185615b68565b9150935093915050565b805f036141d65750565b60e254156141e757611cb481613e89565b8060d55f828254613ebe9190615b1d565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806110fd575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142ea576142c68382615b68565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614311908490615b68565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615fa0833981519152906143589087815260200190565b60405180910390a3506001949350505050565b614375828261247d565b611c1e575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f6143fc8661535e565b905080156144385761441d6144118683614e9e565b60408801519083613876565b92506144298385613894565b91506144358284615b68565b92505b50935093915050565b815460018301545f91906144558482615b1d565b60018601556118516144678383614e9e565b6141979084615b68565b5f6040516323b872dd60e01b5f526001600160a01b0385166004526001600160a01b0384166024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d74575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144fa9190615e5f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61456c828261247d565b15611c1e575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145e95760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906146018289613ec6565b905061460e611160613d7b565b8060dd5f82825461461f9190615b1d565b90915550505f88815260d0602090815260408083206001600160a01b0389168452825280832081518083019092528054808352600190910154928201839052909291614675918b9161467091615b1d565b614e9e565b6040805180820190915283518152602080850151908201529091505f9061469c9083614f9e565b5160e3549091506001600160a01b0316801561470c57604051636c912dad60e01b81526001600160a01b03821690636c912dad906146de908c906004016158da565b5f604051808303815f87803b1580156146f5575f80fd5b505af1158015614707573d5f803e3d5ffd5b505050505b8b4210156147d45760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147549186906143f0565b90925090506147638183615b1d565b886002015f8282546147759190615b68565b909155505089156147a8578060d55f8282546147919190615b1d565b909155506147a190508286615b68565b98506147cd565b6147b28183615b1d565b60d55f8282546147c29190615b1d565b925050819055508498505b505061481b565b60d6546147ef906147e58e42615b68565b6138519190615b7b565b6147f99084615b1d565b96506148058388615b68565b60d55f8282546148159190615b1d565b90915550505b8987111561483c57604051632c1b6b4160e21b815260040160405180910390fd5b6148468683614e7f565b60d35f8282546148569190615b68565b909155506148669050848461503c565b5060208401518451175f036148c2575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d2909252909120908101546148b7908e614eb3565b6001909101556148f2565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a46149438c6141f8565b50505050505095945050505050565b61495a61537c565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516139fd91906158da565b60e3545f9081906001600160a01b03168015614a0457604051636c912dad60e01b81526001600160a01b03821690636c912dad906149d69087906004016158da565b5f604051808303815f87803b1580156149ed575f80fd5b505af11580156149ff573d5f803e3d5ffd5b505050505b614a0f611160613d7b565b6001600160a01b0384165f90815260d2602052604090206002810154614a358782614e9e565b9350614a4084611cf6565b9450845f03614a625760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a739190615b68565b90915550614a8390508482615b68565b82600201819055508360df5f828254614a9c9190615b68565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614b115760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e16ee72090614b5f9087903090600401615d9b565b5f6040518083038186803b158015614b75575f80fd5b505afa158015614b87573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bf857604051630149e46f60e01b81526001600160a01b03821690630149e46f90614bca9086906004016158da565b5f604051808303815f87803b158015614be1575f80fd5b505af1158015614bf3573d5f803e3d5ffd5b505050505b5f614c0283610fce565b9050614c0e838261538a565b614c188482615403565b60408051848152602081018390526001600160a01b03808716929088169133915f80516020615f60833981519152910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c9591815260200190565b60405180910390a3614ca56139a1565b61280d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614246565b614ce1610fed565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d7057604051630149e46f60e01b81526001600160a01b03821690630149e46f90614d429086906004016158da565b5f604051808303815f87803b158015614d59575f80fd5b505af1158015614d6b573d5f803e3d5ffd5b505050505b61193a838361546a565b614d82613ba7565b614d8a613bb6565b614d92614cd9565b5f614d9b613d7b565b90505f614da6613928565b9050614db28482615b1d565b60dd5f828254614dc29190615b1d565b90915550614dd1905082613e89565b6110fd6139a1565b614e037f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361247d565b158015614e245750614e225f80516020615f808339815191523361247d565b155b156123fb57604051631d006fdb60e31b815260040160405180910390fd5b614e4a613ba7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586149873390565b815460018301545f9190614e938483615b68565b855561185161446783835b5f818310614eac5781610f5c565b5090919050565b5f821580614ec6575081600160201b1783145b15614ed257505f610e1e565b63ffffffff8316808303614f4057602184901c60015b60018216158015614ef857508115155b15614f0957600191821c9101614ee8565b6020614f158282615b1d565b9690961c90951b9485614f2b6224ea0083615b7b565b614f359087615b1d565b179350505050610e1e565b6224ea00614f4e8285615b68565b614f589190615e4c565b614f63906020615b1d565b6001901b198416915050610e1e565b5f54610100900460ff166123fb575f80fd5b5f54610100900460ff16614f96575f80fd5b6123fb6154b9565b604080518082019091525f8082526020820152825160208401515f91614fc8916132939082615b1d565b8085529050614fd78184615b68565b6020850152509192915050565b815460018301545f919082614ff98583615b68565b90506150058184614e9e565b61500f8385614e9e565b6150199190615b68565b60019096015550929392505050565b5f610f5c83670de0b6b3a764000084613876565b604080518082019091525f8082526020820152602083015183515f9161506191615b1d565b90505f61506e8483615b68565b855190915061507f90829084613876565b80865261508c9082615b68565b602086015250929392505050565b335f90815260cc60205260408120805483919083906150ba908490615b68565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615fa083398151915290610fbd9086815260200190565b5f61510784610fce565b9050336001600160a01b03831614615174576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151725761514e8282615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61517e848261538a565b6151888282615403565b60408051858152602081018390526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614246565b5f336001600160a01b03831614615260576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461525e5761523a8582615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b615269846121f0565b9050805f03615276575f80fd5b615280818561538a565b61528a8285615403565b60408051828152602081018690526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614246565b615300828261247d565b611c1e5761530d816154d7565b6153188360206154e9565b604051602001615329929190615ee7565b6040516020818303038152906040525f80fd5b5f818311614eac5781610f5c565b5f610f5c83670de0b6b3a764000084613a07565b805160208201515f91906153728282614e9e565b611c8d9083615b68565b60975460ff166123fb575f80fd5b615392613ba7565b61539a614cd9565b6153a5611160613d7b565b5f6153ae613928565b90505f838260dd546153c09190615b1d565b6153ca9190615b68565b90508060d45460d3546153dd9190615b1d565b11156153fb57604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc60205260408120805483929061542a908490615b68565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615fa0833981519152906020015b60405180910390a35050565b8060cb5f82825461547b9190615b1d565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615fa0833981519152910161545e565b5f54610100900460ff166154cb575f80fd5b6097805460ff19169055565b6060610e1e6001600160a01b03831660145b60605f6154f7836002615b7b565b615502906002615b1d565b6001600160401b0381111561551957615519615bee565b6040519080825280601f01601f191660200182016040528015615543576020820181803683370190505b509050600360fc1b815f8151811061555d5761555d615f36565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061558b5761558b615f36565b60200101906001600160f81b03191690815f1a9053505f6155ad846002615b7b565b6155b8906001615b1d565b90505b600181111561562f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106155ec576155ec615f36565b1a60f81b82828151811061560257615602615f36565b60200101906001600160f81b03191690815f1a90535060049490941c9361562881615f4a565b90506155bb565b508315610f5c575f80fd5b6001600160a01b0381168114611cb4575f80fd5b5f6020828403121561565e575f80fd5b8135610f5c8161563a565b5f60208284031215615679575f80fd5b81356001600160e01b031981168114610f5c575f80fd5b80356001600160801b03811681146156a6575f80fd5b919050565b5f602082840312156156bb575f80fd5b610f5c82615690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615709575f80fd5b5035919050565b5f8060408385031215615721575f80fd5b823561572c8161563a565b946020939093013593505050565b5f8083601f84011261574a575f80fd5b5081356001600160401b03811115615760575f80fd5b602083019150836020828501011115612367575f80fd5b5f8060208385031215615788575f80fd5b82356001600160401b0381111561579d575f80fd5b6157a98582860161573a565b90969095509350505050565b5f805f805f60a086880312156157c9575f80fd5b85359450602086013593506040860135925060608601356157e98161563a565b915060808601356157f98161563a565b809150509295509295909350565b5f805f60608486031215615819575f80fd5b83356158248161563a565b925060208401356158348161563a565b929592945050506040919091013590565b803560ff811681146156a6575f80fd5b5f60208284031215615865575f80fd5b610f5c82615845565b5f806040838503121561587f575f80fd5b8235915060208301356158918161563a565b809150509250929050565b5f805f80608085870312156158af575f80fd5b84359350602085013592506040850135915060608501356158cf8161563a565b939692955090935050565b6001600160a01b0391909116815260200190565b6001600160801b0391909116815260200190565b5f805f60608486031215615914575f80fd5b833561591f8161563a565b92506020840135915060408401356159368161563a565b809150509250925092565b5f8060408385031215615952575f80fd5b50508035926020909101359150565b5f60208284031215615971575f80fd5b81358015158114610f5c575f80fd5b5f805f805f805f805f806101208b8d03121561599a575f80fd5b8a356001600160401b038111156159af575f80fd5b6159bb8d828e0161573a565b909b5099506159ce905060208c01615845565b97506159dc60408c01615690565b965060608b01356159ec8161563a565b955060808b0135945060a08b01359350615a0860c08c01615690565b999c989b50969995989497939650919460e0810135936101009091013592509050565b5f805f60608486031215615a3d575f80fd5b833592506020840135615a4f8161563a565b915060408401356159368161563a565b5f805f805f805f60e0888a031215615a75575f80fd5b8735615a808161563a565b96506020880135615a908161563a565b95506040880135945060608801359350615aac60808901615845565b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215615ada575f80fd5b8235615ae58161563a565b915060208301356158918161563a565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610e1e57610e1e615b09565b600181811c90821680615b4457607f821691505b602082108103615b6257634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610e1e57610e1e615b09565b8082028115828204841417610e1e57610e1e615b09565b5f600160ff1b8201615ba657615ba6615b09565b505f0390565b8181035f831280158383131683831282161715613f3d57613f3d615b09565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f82111561193a57805f5260205f20601f840160051c81016020851015615c275750805b601f840160051c820191505b81811015613d74575f8155600101615c33565b81516001600160401b03811115615c5f57615c5f615bee565b615c7381615c6d8454615b30565b84615c02565b6020601f821160018114615ca5575f8315615c8e5750848201515b5f19600385901b1c1916600184901b178455613d74565b5f84815260208120601f198516915b82811015615cd45787850151825560209485019460019092019101615cb4565b5084821015615cf157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b038281168282160390811115610e1e57610e1e615b09565b94855260ff93909316602085015260408401919091526060830152608082015260a00190565b5f60208284031215615d73575f80fd5b5051919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b5f8060408385031215615e14575f80fd5b505080516020909101519092909150565b5f82615e3357615e33615af5565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615e5a57615e5a615af5565b500490565b5f808354615e6c81615b30565b600182168015615e835760018114615e9857615ec5565b60ff1983168652811515820286019350615ec5565b865f5260205f205f5b83811015615ebd57815488820152600190910190602001615ea1565b505081860193505b509195945050505050565b5f81518060208401855e5f93019283525090919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81525f615f126017830185615ed0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526118516011820185615ed0565b634e487b7160e01b5f52603260045260245ffd5b5f81615f5857615f58615b09565b505f19019056fefbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122005ec196d152ea67004b2106a9e8456d6fce9e4ca698150d3a643ce4c0c94880d64736f6c634300081a0033", "storageLayout": { "storage": [ { - "astId": 543, + "astId": 416, "contract": "contracts/Market.sol:Market", "label": "_initialized", "offset": 0, @@ -3528,7 +2785,7 @@ "type": "t_uint8" }, { - "astId": 546, + "astId": 419, "contract": "contracts/Market.sol:Market", "label": "_initializing", "offset": 1, @@ -3536,7 +2793,7 @@ "type": "t_bool" }, { - "astId": 3288, + "astId": 1086, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3544,7 +2801,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 4287, + "astId": 1360, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3568,7 +2825,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 727, + "astId": 600, "contract": "contracts/Market.sol:Market", "label": "_paused", "offset": 0, @@ -3576,7 +2833,7 @@ "type": "t_bool" }, { - "astId": 832, + "astId": 705, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3584,7 +2841,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 35688, + "astId": 16118, "contract": "contracts/Market.sol:Market", "label": "name", "offset": 0, @@ -3592,7 +2849,7 @@ "type": "t_string_storage" }, { - "astId": 35690, + "astId": 16120, "contract": "contracts/Market.sol:Market", "label": "symbol", "offset": 0, @@ -3600,7 +2857,7 @@ "type": "t_string_storage" }, { - "astId": 35694, + "astId": 16124, "contract": "contracts/Market.sol:Market", "label": "totalSupply", "offset": 0, @@ -3608,7 +2865,7 @@ "type": "t_uint256" }, { - "astId": 35698, + "astId": 16128, "contract": "contracts/Market.sol:Market", "label": "balanceOf", "offset": 0, @@ -3616,7 +2873,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 35704, + "astId": 16134, "contract": "contracts/Market.sol:Market", "label": "allowance", "offset": 0, @@ -3624,7 +2881,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 35712, + "astId": 16142, "contract": "contracts/Market.sol:Market", "label": "nonces", "offset": 0, @@ -3632,39 +2889,39 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 15178, + "astId": 7382, "contract": "contracts/Market.sol:Market", "label": "fixedDepositPositions", "offset": 0, "slot": "207", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))" }, { - "astId": 15186, + "astId": 7390, "contract": "contracts/Market.sol:Market", "label": "fixedBorrowPositions", "offset": 0, "slot": "208", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))" }, { - "astId": 15192, + "astId": 7396, "contract": "contracts/Market.sol:Market", "label": "fixedPools", "offset": 0, "slot": "209", - "type": "t_mapping(t_uint256,t_struct(Pool)35048_storage)" + "type": "t_mapping(t_uint256,t_struct(Pool)15534_storage)" }, { - "astId": 15198, + "astId": 7402, "contract": "contracts/Market.sol:Market", "label": "accounts", "offset": 0, "slot": "210", - "type": "t_mapping(t_address,t_struct(Account)19124_storage)" + "type": "t_mapping(t_address,t_struct(Account)11401_storage)" }, { - "astId": 15201, + "astId": 7405, "contract": "contracts/Market.sol:Market", "label": "floatingBackupBorrowed", "offset": 0, @@ -3672,7 +2929,7 @@ "type": "t_uint256" }, { - "astId": 15204, + "astId": 7408, "contract": "contracts/Market.sol:Market", "label": "floatingDebt", "offset": 0, @@ -3680,7 +2937,7 @@ "type": "t_uint256" }, { - "astId": 15207, + "astId": 7411, "contract": "contracts/Market.sol:Market", "label": "earningsAccumulator", "offset": 0, @@ -3688,7 +2945,7 @@ "type": "t_uint256" }, { - "astId": 15210, + "astId": 7414, "contract": "contracts/Market.sol:Market", "label": "penaltyRate", "offset": 0, @@ -3696,7 +2953,7 @@ "type": "t_uint256" }, { - "astId": 15213, + "astId": 7417, "contract": "contracts/Market.sol:Market", "label": "backupFeeRate", "offset": 0, @@ -3704,7 +2961,7 @@ "type": "t_uint256" }, { - "astId": 15216, + "astId": 7420, "contract": "contracts/Market.sol:Market", "label": "dampSpeedUp", "offset": 0, @@ -3712,7 +2969,7 @@ "type": "t_uint256" }, { - "astId": 15219, + "astId": 7423, "contract": "contracts/Market.sol:Market", "label": "dampSpeedDown", "offset": 0, @@ -3720,7 +2977,7 @@ "type": "t_uint256" }, { - "astId": 15222, + "astId": 7426, "contract": "contracts/Market.sol:Market", "label": "maxFuturePools", "offset": 0, @@ -3728,7 +2985,7 @@ "type": "t_uint8" }, { - "astId": 15225, + "astId": 7429, "contract": "contracts/Market.sol:Market", "label": "lastAccumulatorAccrual", "offset": 1, @@ -3736,7 +2993,7 @@ "type": "t_uint32" }, { - "astId": 15228, + "astId": 7432, "contract": "contracts/Market.sol:Market", "label": "lastFloatingDebtUpdate", "offset": 5, @@ -3744,7 +3001,7 @@ "type": "t_uint32" }, { - "astId": 15231, + "astId": 7435, "contract": "contracts/Market.sol:Market", "label": "lastAverageUpdate", "offset": 9, @@ -3752,15 +3009,15 @@ "type": "t_uint32" }, { - "astId": 15235, + "astId": 7439, "contract": "contracts/Market.sol:Market", "label": "interestRateModel", "offset": 0, "slot": "219", - "type": "t_contract(InterestRateModel)15062" + "type": "t_contract(InterestRateModel)7266" }, { - "astId": 15238, + "astId": 7442, "contract": "contracts/Market.sol:Market", "label": "earningsAccumulatorSmoothFactor", "offset": 0, @@ -3768,7 +3025,7 @@ "type": "t_uint128" }, { - "astId": 15241, + "astId": 7445, "contract": "contracts/Market.sol:Market", "label": "reserveFactor", "offset": 16, @@ -3776,7 +3033,7 @@ "type": "t_uint128" }, { - "astId": 15244, + "astId": 7448, "contract": "contracts/Market.sol:Market", "label": "floatingAssets", "offset": 0, @@ -3784,7 +3041,7 @@ "type": "t_uint256" }, { - "astId": 15247, + "astId": 7451, "contract": "contracts/Market.sol:Market", "label": "floatingAssetsAverage", "offset": 0, @@ -3792,7 +3049,7 @@ "type": "t_uint256" }, { - "astId": 15250, + "astId": 7454, "contract": "contracts/Market.sol:Market", "label": "totalFloatingBorrowShares", "offset": 0, @@ -3800,7 +3057,7 @@ "type": "t_uint256" }, { - "astId": 15253, + "astId": 7457, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3808,7 +3065,7 @@ "type": "t_uint256" }, { - "astId": 15256, + "astId": 7460, "contract": "contracts/Market.sol:Market", "label": "treasury", "offset": 0, @@ -3816,7 +3073,7 @@ "type": "t_address" }, { - "astId": 15259, + "astId": 7463, "contract": "contracts/Market.sol:Market", "label": "treasuryFeeRate", "offset": 0, @@ -3824,15 +3081,15 @@ "type": "t_uint256" }, { - "astId": 15263, + "astId": 7467, "contract": "contracts/Market.sol:Market", "label": "rewardsController", "offset": 0, "slot": "227", - "type": "t_contract(RewardsController)23082" + "type": "t_contract(RewardsController)14682" }, { - "astId": 15266, + "astId": 7470, "contract": "contracts/Market.sol:Market", "label": "isFrozen", "offset": 20, @@ -3868,12 +3125,12 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(InterestRateModel)15062": { + "t_contract(InterestRateModel)7266": { "encoding": "inplace", "label": "contract InterestRateModel", "numberOfBytes": "20" }, - "t_contract(RewardsController)23082": { + "t_contract(RewardsController)14682": { "encoding": "inplace", "label": "contract RewardsController", "numberOfBytes": "20" @@ -3892,19 +3149,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_uint256)" }, - "t_mapping(t_address,t_struct(Account)19124_storage)": { + "t_mapping(t_address,t_struct(Account)11401_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct Market.Account)", "numberOfBytes": "32", - "value": "t_struct(Account)19124_storage" + "value": "t_struct(Account)11401_storage" }, - "t_mapping(t_address,t_struct(Position)35054_storage)": { + "t_mapping(t_address,t_struct(Position)15540_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct FixedLib.Position)", "numberOfBytes": "32", - "value": "t_struct(Position)35054_storage" + "value": "t_struct(Position)15540_storage" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -3920,31 +3177,31 @@ "numberOfBytes": "32", "value": "t_struct(RoleData)23_storage" }, - "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))": { + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => mapping(address => struct FixedLib.Position))", "numberOfBytes": "32", - "value": "t_mapping(t_address,t_struct(Position)35054_storage)" + "value": "t_mapping(t_address,t_struct(Position)15540_storage)" }, - "t_mapping(t_uint256,t_struct(Pool)35048_storage)": { + "t_mapping(t_uint256,t_struct(Pool)15534_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct FixedLib.Pool)", "numberOfBytes": "32", - "value": "t_struct(Pool)35048_storage" + "value": "t_struct(Pool)15534_storage" }, "t_string_storage": { "encoding": "bytes", "label": "string", "numberOfBytes": "32" }, - "t_struct(Account)19124_storage": { + "t_struct(Account)11401_storage": { "encoding": "inplace", "label": "struct Market.Account", "members": [ { - "astId": 19119, + "astId": 11396, "contract": "contracts/Market.sol:Market", "label": "fixedDeposits", "offset": 0, @@ -3952,7 +3209,7 @@ "type": "t_uint256" }, { - "astId": 19121, + "astId": 11398, "contract": "contracts/Market.sol:Market", "label": "fixedBorrows", "offset": 0, @@ -3960,7 +3217,7 @@ "type": "t_uint256" }, { - "astId": 19123, + "astId": 11400, "contract": "contracts/Market.sol:Market", "label": "floatingBorrowShares", "offset": 0, @@ -3970,12 +3227,12 @@ ], "numberOfBytes": "96" }, - "t_struct(Pool)35048_storage": { + "t_struct(Pool)15534_storage": { "encoding": "inplace", "label": "struct FixedLib.Pool", "members": [ { - "astId": 35041, + "astId": 15527, "contract": "contracts/Market.sol:Market", "label": "borrowed", "offset": 0, @@ -3983,7 +3240,7 @@ "type": "t_uint256" }, { - "astId": 35043, + "astId": 15529, "contract": "contracts/Market.sol:Market", "label": "supplied", "offset": 0, @@ -3991,7 +3248,7 @@ "type": "t_uint256" }, { - "astId": 35045, + "astId": 15531, "contract": "contracts/Market.sol:Market", "label": "unassignedEarnings", "offset": 0, @@ -3999,7 +3256,7 @@ "type": "t_uint256" }, { - "astId": 35047, + "astId": 15533, "contract": "contracts/Market.sol:Market", "label": "lastAccrual", "offset": 0, @@ -4009,12 +3266,12 @@ ], "numberOfBytes": "128" }, - "t_struct(Position)35054_storage": { + "t_struct(Position)15540_storage": { "encoding": "inplace", "label": "struct FixedLib.Position", "members": [ { - "astId": 35051, + "astId": 15537, "contract": "contracts/Market.sol:Market", "label": "principal", "offset": 0, @@ -4022,7 +3279,7 @@ "type": "t_uint256" }, { - "astId": 35053, + "astId": 15539, "contract": "contracts/Market.sol:Market", "label": "fee", "offset": 0, diff --git a/deployments/optimism/MarketUSDC.json b/deployments/optimism/MarketUSDC.json index 6bd239b1..eebf6fad 100644 --- a/deployments/optimism/MarketUSDC.json +++ b/deployments/optimism/MarketUSDC.json @@ -2989,26 +2989,12 @@ "0xfBa759BCd1a99a7724c5068FEddb4F5b844b941A", "0x97bce8d0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000001bc16d674ec8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c206898d5000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000b1a2bc2ec50000000000000000000000000000000000000000000000000000001057acf5f78000000000000000000000000000000000000000000000000000058d15e17628000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000" ], - "numDeployments": 1, + "numDeployments": 2, "solcInputHash": "e3ac7af802d0124bd24cbb337b6ddc93", "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"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\"},{\"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. NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to fully implement transparency without decoding reverts caused by selector clashes between the proxy and the implementation. WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is changed.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"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}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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/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/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": "0x6080604052604051610a6d380380610a6d833981016040819052610022916102b7565b828161002f82825f610043565b5061003b90508261006e565b505050610398565b61004c836100db565b5f825111806100585750805b1561006957610067838361011a565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6100ad5f80516020610a26833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a16100d881610146565b50565b6100e481610189565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b606061013f8383604051806060016040528060278152602001610a46602791396101c3565b9392505050565b6001600160a01b038116610158575f80fd5b805f80516020610a268339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b61019c575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610168565b60605f80856001600160a01b0316856040516101df9190610382565b5f60405180830381855af49150503d805f8114610217576040519150601f19603f3d011682016040523d82523d5f602084013e61021c565b606091505b50909250905061022e86838387610238565b9695505050505050565b606083156102625782515f0361025b576001600160a01b0385163b61025b575f80fd5b508161026c565b61026c8383610274565b949350505050565b8151156102845781518083602001fd5b5f80fd5b80516001600160a01b038116811461029e575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f805f606084860312156102c9575f80fd5b6102d284610288565b92506102e060208501610288565b60408501519092506001600160401b03808211156102fc575f80fd5b818601915086601f83011261030f575f80fd5b815181811115610321576103216102a3565b604051601f8201601f19908116603f01168101908382118183101715610349576103496102a3565b81604052828152896020848701011115610361575f80fd5b8260208601602083015e5f6020848301015280955050505050509250925092565b5f82518060208501845e5f920191825250919050565b610681806103a55f395ff3fe60806040523661001357610011610017565b005b6100115b61001f6100ee565b6001600160a01b031633036100e45760606001600160e01b03195f35166364d3180d60e11b810161005957610052610120565b91506100dc565b63587086bd60e11b6001600160e01b031982160161007957610052610173565b63070d7c6960e41b6001600160e01b0319821601610099576100526101b7565b621eb96f60e61b6001600160e01b03198216016100b8576100526101e7565b63a39f25e560e01b6001600160e01b03198216016100d857610052610226565b5f80fd5b815160208301f35b6100ec610239565b565b5f7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b606061012a610249565b5f61013836600481846104e3565b8101906101459190610525565b90506101608160405180602001604052805f8152505f610253565b505060408051602081019091525f815290565b60605f8061018436600481846104e3565b8101906101919190610552565b915091506101a182826001610253565b60405180602001604052805f8152509250505090565b60606101c1610249565b5f6101cf36600481846104e3565b8101906101dc9190610525565b90506101608161027e565b60606101f1610249565b5f6101fa6100ee565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b6060610230610249565b5f6101fa6102d5565b6100ec6102446102d5565b6102e3565b34156100ec575f80fd5b61025c83610301565b5f825111806102685750805b15610279576102778383610340565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6102a76100ee565b604080516001600160a01b03928316815291841660208301520160405180910390a16102d28161036c565b50565b5f6102de6103c2565b905090565b365f80375f80365f845af43d5f803e8080156102fd573d5ff35b3d5ffd5b61030a816103e9565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b6060610365838360405180606001604052806027815260200161062560279139610423565b9392505050565b6001600160a01b03811661037e575f80fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b5f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610111565b6001600160a01b0381163b6103fc575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6103a1565b60605f80856001600160a01b03168560405161043f919061060e565b5f60405180830381855af49150503d805f8114610477576040519150601f19603f3d011682016040523d82523d5f602084013e61047c565b606091505b509150915061048d86838387610497565b9695505050505050565b606083156104c15782515f036104ba576001600160a01b0385163b6104ba575f80fd5b50816104cb565b6104cb83836104d3565b949350505050565b8151156100d85781518083602001fd5b5f80858511156104f1575f80fd5b838611156104fd575f80fd5b5050820193919092039150565b80356001600160a01b0381168114610520575f80fd5b919050565b5f60208284031215610535575f80fd5b6103658261050a565b634e487b7160e01b5f52604160045260245ffd5b5f8060408385031215610563575f80fd5b61056c8361050a565b9150602083013567ffffffffffffffff80821115610588575f80fd5b818501915085601f83011261059b575f80fd5b8135818111156105ad576105ad61053e565b604051601f8201601f19908116603f011681019083821181831017156105d5576105d561053e565b816040528281528860208487010111156105ed575f80fd5b826020860160208301375f6020848301015280955050505050509250929050565b5f82518060208501845e5f92019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207adc130af683e5732b81908080a45f6134fe389cd5cd3dde740f5a5249cbeeaf64736f6c63430008190033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61001f6100ee565b6001600160a01b031633036100e45760606001600160e01b03195f35166364d3180d60e11b810161005957610052610120565b91506100dc565b63587086bd60e11b6001600160e01b031982160161007957610052610173565b63070d7c6960e41b6001600160e01b0319821601610099576100526101b7565b621eb96f60e61b6001600160e01b03198216016100b8576100526101e7565b63a39f25e560e01b6001600160e01b03198216016100d857610052610226565b5f80fd5b815160208301f35b6100ec610239565b565b5f7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b606061012a610249565b5f61013836600481846104e3565b8101906101459190610525565b90506101608160405180602001604052805f8152505f610253565b505060408051602081019091525f815290565b60605f8061018436600481846104e3565b8101906101919190610552565b915091506101a182826001610253565b60405180602001604052805f8152509250505090565b60606101c1610249565b5f6101cf36600481846104e3565b8101906101dc9190610525565b90506101608161027e565b60606101f1610249565b5f6101fa6100ee565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b6060610230610249565b5f6101fa6102d5565b6100ec6102446102d5565b6102e3565b34156100ec575f80fd5b61025c83610301565b5f825111806102685750805b15610279576102778383610340565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6102a76100ee565b604080516001600160a01b03928316815291841660208301520160405180910390a16102d28161036c565b50565b5f6102de6103c2565b905090565b365f80375f80365f845af43d5f803e8080156102fd573d5ff35b3d5ffd5b61030a816103e9565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b6060610365838360405180606001604052806027815260200161062560279139610423565b9392505050565b6001600160a01b03811661037e575f80fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b5f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610111565b6001600160a01b0381163b6103fc575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6103a1565b60605f80856001600160a01b03168560405161043f919061060e565b5f60405180830381855af49150503d805f8114610477576040519150601f19603f3d011682016040523d82523d5f602084013e61047c565b606091505b509150915061048d86838387610497565b9695505050505050565b606083156104c15782515f036104ba576001600160a01b0385163b6104ba575f80fd5b50816104cb565b6104cb83836104d3565b949350505050565b8151156100d85781518083602001fd5b5f80858511156104f1575f80fd5b838611156104fd575f80fd5b5050820193919092039150565b80356001600160a01b0381168114610520575f80fd5b919050565b5f60208284031215610535575f80fd5b6103658261050a565b634e487b7160e01b5f52604160045260245ffd5b5f8060408385031215610563575f80fd5b61056c8361050a565b9150602083013567ffffffffffffffff80821115610588575f80fd5b818501915085601f83011261059b575f80fd5b8135818111156105ad576105ad61053e565b604051601f8201601f19908116603f011681019083821181831017156105d5576105d561053e565b816040528281528860208487010111156105ed575f80fd5b826020860160208301375f6020848301015280955050505050509250929050565b5f82518060208501845e5f92019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207adc130af683e5732b81908080a45f6134fe389cd5cd3dde740f5a5249cbeeaf64736f6c63430008190033", - "execute": { - "methodName": "initialize", - "args": [ - "USDC", - 7, - "2000000000000000000", - "0x0000000000000000000000000000000000000000", - "52083333333", - "100000000000000000", - "50000000000000000", - "4600000000000000", - "400000000000000000" - ] - }, - "implementation": "0x87581E1540aE45056C0ed59530c783a6e0A9C53e", + "implementation": "0xcE46bc1f3edB054dACF2087255670090Cdd60F38", "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. NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to fully implement transparency without decoding reverts caused by selector clashes between the proxy and the implementation. WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.", "events": { diff --git a/deployments/optimism/MarketUSDC_Implementation.json b/deployments/optimism/MarketUSDC_Implementation.json index bd3b4555..255ed6d5 100644 --- a/deployments/optimism/MarketUSDC_Implementation.json +++ b/deployments/optimism/MarketUSDC_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x87581E1540aE45056C0ed59530c783a6e0A9C53e", + "address": "0xcE46bc1f3edB054dACF2087255670090Cdd60F38", "abi": [ { "inputs": [ @@ -2736,32 +2736,32 @@ "type": "function" } ], - "transactionHash": "0x899d12d15c32d9db37eb6b62ab0ddb00b03e67604054cb9c9b671b372687113d", + "transactionHash": "0xc9634942df6ee09aeb2de4406e15629d1a64561942de3b9f6f89dcb67cd42ce5", "receipt": { "to": null, "from": "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", - "contractAddress": "0x87581E1540aE45056C0ed59530c783a6e0A9C53e", - "transactionIndex": 17, - "gasUsed": "5374118", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000100000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2475f6320ec12e57d2934c7ca18c9e0ecf268285a422121b5228cf6c2e85f3fc", - "transactionHash": "0x899d12d15c32d9db37eb6b62ab0ddb00b03e67604054cb9c9b671b372687113d", + "contractAddress": "0xcE46bc1f3edB054dACF2087255670090Cdd60F38", + "transactionIndex": 11, + "gasUsed": "5418955", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000", + "blockHash": "0xf94a91053598a3cfb9343edcbbf83eb64de4fb7dfb27960b77588e69213fd5bc", + "transactionHash": "0xc9634942df6ee09aeb2de4406e15629d1a64561942de3b9f6f89dcb67cd42ce5", "logs": [ { - "transactionIndex": 17, - "blockNumber": 118840319, - "transactionHash": "0x899d12d15c32d9db37eb6b62ab0ddb00b03e67604054cb9c9b671b372687113d", - "address": "0x87581E1540aE45056C0ed59530c783a6e0A9C53e", + "transactionIndex": 11, + "blockNumber": 124901192, + "transactionHash": "0xc9634942df6ee09aeb2de4406e15629d1a64561942de3b9f6f89dcb67cd42ce5", + "address": "0xcE46bc1f3edB054dACF2087255670090Cdd60F38", "topics": [ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" ], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 44, - "blockHash": "0x2475f6320ec12e57d2934c7ca18c9e0ecf268285a422121b5228cf6c2e85f3fc" + "logIndex": 85, + "blockHash": "0xf94a91053598a3cfb9343edcbbf83eb64de4fb7dfb27960b77588e69213fd5bc" } ], - "blockNumber": 118840319, - "cumulativeGasUsed": "7900676", + "blockNumber": 124901192, + "cumulativeGasUsed": "7642328", "status": 1, "byzantium": true }, @@ -2769,758 +2769,15 @@ "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", "0xaEb62e6F27BC103702E7BC879AE98bceA56f027E" ], - "numDeployments": 1, - "solcInputHash": "e3ac7af802d0124bd24cbb337b6ddc93", - "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"contract Auditor\",\"name\":\"auditor_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Disagreement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientProtocolLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketFrozen\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaturityOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAuditor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPausingRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SelfLiquidation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolState\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"alternativeState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolStates\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBorrow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRepay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWithdraw\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AccumulatorAccrual\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"backupFeeRate\",\"type\":\"uint256\"}],\"name\":\"BackupFeeRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"BorrowAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedUp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedDown\",\"type\":\"uint256\"}],\"name\":\"DampSpeedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"DepositAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulatorSmoothFactor\",\"type\":\"uint256\"}],\"name\":\"EarningsAccumulatorSmoothFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"}],\"name\":\"FixedEarningsUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilization\",\"type\":\"uint256\"}],\"name\":\"FloatingDebtUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isFrozen\",\"type\":\"bool\"}],\"name\":\"Frozen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel\",\"type\":\"address\"}],\"name\":\"InterestRateModelSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lendersAssets\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizedAssets\",\"type\":\"uint256\"}],\"name\":\"Liquidate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDepositShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDebt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulator\",\"type\":\"uint256\"}],\"name\":\"MarketUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxFuturePools\",\"type\":\"uint256\"}],\"name\":\"MaxFuturePoolsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyRate\",\"type\":\"uint256\"}],\"name\":\"PenaltyRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Repay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"name\":\"RepayAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveFactor\",\"type\":\"uint256\"}],\"name\":\"ReserveFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController\",\"type\":\"address\"}],\"name\":\"RewardsControllerSet\",\"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\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"SpreadBadDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate\",\"type\":\"uint256\"}],\"name\":\"TreasurySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"WithdrawAtMaturity\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EMERGENCY_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"accountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fixedDeposits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fixedBorrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auditor\",\"outputs\":[{\"internalType\":\"contract Auditor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"backupFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrowAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsOwed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"clearBadDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"depositAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulatorSmoothFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedBorrowPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedDepositPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"fixedPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplied\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastAccrual\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingBackupBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"maxFuturePools_\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedUp_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedDown_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAccumulatorAccrual\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAverageUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFloatingDebtUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxFuturePools\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"previewDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"debt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewFloatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRefund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewRepay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repayAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepayAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsController\",\"outputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"}],\"name\":\"setAssetSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setBackupFeeRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"up\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"down\",\"type\":\"uint256\"}],\"name\":\"setDampSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"}],\"name\":\"setEarningsAccumulatorSmoothFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isFrozen_\",\"type\":\"bool\"}],\"name\":\"setFrozen\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"futurePools\",\"type\":\"uint8\"}],\"name\":\"setMaxFuturePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"}],\"name\":\"setReserveFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController_\",\"type\":\"address\"}],\"name\":\"setRewardsController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setTreasury\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasuryFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsDiscounted\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\"}},\"BackupFeeRateSet(uint256)\":{\"params\":{\"backupFeeRate\":\"rate charged to the fixed pools to be accrued by the floating depositors.\"}},\"Borrow(address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"receiver\":\"address that received the borrowed assets.\",\"shares\":\"amount of borrow shares assigned to the account.\"}},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"fee\":\"extra amount that will need to be paid at maturity.\",\"maturity\":\"maturity in which the account will have to repay the loan.\",\"receiver\":\"address that received the borrowed assets.\"}},\"DampSpeedSet(uint256,uint256)\":{\"params\":{\"dampSpeedDown\":\"represented with 18 decimals.\",\"dampSpeedUp\":\"represented with 18 decimals.\"}},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were deposited.\",\"caller\":\"address which deposited the assets.\",\"fee\":\"is the extra amount that it will be collected at maturity.\",\"maturity\":\"maturity at which the account will be able to collect his deposit + his fee.\",\"owner\":\"address that will be able to withdraw the deposited assets.\"}},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"params\":{\"earningsAccumulatorSmoothFactor\":\"factor represented with 18 decimals.\"}},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"params\":{\"maturity\":\"maturity date where the earnings were updated.\",\"timestamp\":\"current timestamp.\",\"unassignedEarnings\":\"pending unassigned earnings.\"}},\"FloatingDebtUpdate(uint256,uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\",\"utilization\":\"new floating utilization.\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InterestRateModelSet(address)\":{\"params\":{\"interestRateModel\":\"new interest rate model to be used to calculate rates.\"}},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were repaid.\",\"borrower\":\"address which had the original debt.\",\"lendersAssets\":\"incentive paid to lenders.\",\"receiver\":\"address which repaid the previously borrowed amount.\",\"seizeMarket\":\"address of the asset that were seized by the liquidator.\",\"seizedAssets\":\"amount seized of the collateral.\"}},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"earningsAccumulator\":\"earnings accumulator.\",\"floatingAssets\":\"total floating supply assets.\",\"floatingBorrowShares\":\"total floating borrow shares.\",\"floatingDebt\":\"total floating borrow assets.\",\"floatingDepositShares\":\"total floating supply shares.\",\"timestamp\":\"current timestamp.\"}},\"MaxFuturePoolsSet(uint256)\":{\"params\":{\"maxFuturePools\":\"represented with 0 decimals.\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PenaltyRateSet(uint256)\":{\"params\":{\"penaltyRate\":\"penaltyRate percentage per second represented with 18 decimals.\"}},\"Repay(address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"shares\":\"amount of borrow shares that were subtracted from the account's accountability.\"}},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"maturity\":\"maturity where the account repaid its borrowed amounts.\",\"positionAssets\":\"amount of the debt that was covered in this repayment (penalties could have been repaid).\"}},\"ReserveFactorSet(uint256)\":{\"params\":{\"reserveFactor\":\"reserveFactor percentage.\"}},\"RewardsControllerSet(address)\":{\"params\":{\"rewardsController\":\"new rewards controller to update account rewards when operating with the Market.\"}},\"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`)\"},\"Seize(address,address,uint256)\":{\"params\":{\"assets\":\"amount seized of the collateral.\",\"borrower\":\"address which had the original debt.\",\"liquidator\":\"address which seized this collateral.\"}},\"SpreadBadDebt(address,uint256)\":{\"params\":{\"assets\":\"amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\",\"borrower\":\"address which was cleared from bad debt.\"}},\"TreasurySet(address,uint256)\":{\"params\":{\"treasury\":\"address of the treasury that will receive the minted eTokens.\",\"treasuryFeeRate\":\"represented with 18 decimals.\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets withdrawn (can include a discount for early withdraw).\",\"caller\":\"address which withdraw the asset.\",\"maturity\":\"maturity where the account withdraw its deposits.\",\"owner\":\"address which had the assets withdrawn.\",\"positionAssets\":\"position size reduced.\",\"receiver\":\"address which will be collecting the assets.\"}}},\"kind\":\"dev\",\"methods\":{\"accountSnapshot(address)\":{\"params\":{\"account\":\"account to return status snapshot in the specified maturity date.\"},\"returns\":{\"_0\":\"the amount deposited to the floating pool and the amount owed to floating and fixed pools.\"}},\"borrow(uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"borrowShares\":\"shares corresponding to the borrowed assets.\"}},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"maturity\":\"maturity date for repayment.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"assetsOwed\":\"total amount of assets (principal + fee) to be repaid at maturity.\"}},\"clearBadDebt(address)\":{\"details\":\"Can only be called from the auditor.\",\"params\":{\"borrower\":\"account with insufficient collateral to be cleared the debt.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"assets\":\"amount to receive from the msg.sender.\",\"maturity\":\"maturity date where the assets will be deposited.\",\"minAssetsRequired\":\"minimum amount of assets required by the depositor for the transaction to be accepted.\",\"receiver\":\"address that will be able to withdraw the deposited assets.\"},\"returns\":{\"positionAssets\":\"total amount of assets (principal + fee) to be withdrawn at maturity.\"}},\"fixedPoolBalance(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed and supplied amount of the fixed pool.\"}},\"fixedPoolBorrowed(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed amount of the fixed pool.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"details\":\"can only be called once.\"},\"liquidate(address,uint256,address)\":{\"details\":\"Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.\",\"params\":{\"borrower\":\"account that has an outstanding debt across floating or fixed pools.\",\"maxAssets\":\"maximum amount of debt that the liquidator is willing to accept. (it can be less)\",\"seizeMarket\":\"market from which the collateral will be seized to give to the liquidator.\"},\"returns\":{\"repaidAssets\":\"actual amount repaid.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"previewBorrow(uint256)\":{\"params\":{\"assets\":\"amount of assets to borrow.\"},\"returns\":{\"_0\":\"amount of shares that will be asigned to the account after the borrow.\"}},\"previewDebt(address)\":{\"params\":{\"borrower\":\"account to return status snapshot for fixed and floating borrows.\"},\"returns\":{\"debt\":\"the total debt, denominated in number of assets.\"}},\"previewFloatingAssetsAverage()\":{\"returns\":{\"_0\":\"projected `floatingAssetsAverage`.\"}},\"previewRefund(uint256)\":{\"params\":{\"shares\":\"amount of shares to subtract from caller's accountability.\"},\"returns\":{\"_0\":\"amount of assets that will be repaid.\"}},\"previewRepay(uint256)\":{\"params\":{\"assets\":\"amount of assets to repay.\"},\"returns\":{\"_0\":\"amount of shares that will be subtracted from the account after the repay.\"}},\"redeem(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\",\"shares\":\"amount of shares to be redeemed for underlying asset.\"},\"returns\":{\"assets\":\"amount of underlying asset that was withdrawn.\"}},\"refund(uint256,address)\":{\"params\":{\"borrowShares\":\"shares to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualShares\":\"actual subtracted shares from the borrower's accountability.\",\"assets\":\"subtracted assets from the borrower's accountability.\"}},\"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.\"},\"repay(uint256,address)\":{\"params\":{\"assets\":\"assets to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualRepay\":\"the actual amount that should be transferred into the protocol.\",\"borrowShares\":\"subtracted shares from the borrower's accountability.\"}},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"borrower\":\"address of the account that has the debt.\",\"maturity\":\"maturity date where the assets will be repaid.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept to be repaid.\",\"positionAssets\":\"amount to be paid for the borrower's debt.\"},\"returns\":{\"actualRepayAssets\":\"the actual amount that was transferred into the protocol.\"}},\"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.\"},\"seize(address,address,uint256)\":{\"details\":\"Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\",\"params\":{\"assets\":\"amount to be removed from borrower's possession.\",\"borrower\":\"address from which the assets will be seized.\",\"liquidator\":\"address which will receive the seized assets.\"}},\"setAssetSymbol(string)\":{\"params\":{\"assetSymbol\":\"the symbol for the underlying asset.\"}},\"setBackupFeeRate(uint256)\":{\"params\":{\"backupFeeRate_\":\"percentage amount represented with 18 decimals.\"}},\"setDampSpeed(uint256,uint256)\":{\"params\":{\"down\":\"damp speed down, represented with 18 decimals.\",\"up\":\"damp speed up, represented with 18 decimals.\"}},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"params\":{\"earningsAccumulatorSmoothFactor_\":\"represented with 18 decimals.\"}},\"setInterestRateModel(address)\":{\"params\":{\"interestRateModel_\":\"new interest rate model.\"}},\"setMaxFuturePools(uint8)\":{\"details\":\"If value is decreased, VALID maturities will become NOT_READY.\",\"params\":{\"futurePools\":\"number of pools to be active at the same time.\"}},\"setPenaltyRate(uint256)\":{\"params\":{\"penaltyRate_\":\"percentage represented with 18 decimals.\"}},\"setReserveFactor(uint128)\":{\"params\":{\"reserveFactor_\":\"parameter represented with 18 decimals.\"}},\"setRewardsController(address)\":{\"params\":{\"rewardsController_\":\"new rewards controller.\"}},\"setTreasury(address,uint256)\":{\"params\":{\"treasuryFeeRate_\":\"represented with 18 decimals.\",\"treasury_\":\"address of the treasury that will receive the minted eTokens.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalAssets()\":{\"returns\":{\"_0\":\"actual floatingAssets plus earnings to be accrued at current timestamp.\"}},\"totalFloatingBorrowAssets()\":{\"returns\":{\"_0\":\"actual floating debt plus projected interest.\"}},\"transfer(address,uint256)\":{\"details\":\"Makes sure that the caller doesn't have shortfall after transferring.\",\"params\":{\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Makes sure that `from` address doesn't have shortfall after transferring.\",\"params\":{\"from\":\"address from which the assets will be transferred.\",\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"withdraw(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"assets\":\"amount of underlying to be withdrawn.\",\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\"},\"returns\":{\"shares\":\"amount of shares redeemed for underlying asset.\"}},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"maturity\":\"maturity date where the assets will be withdrawn.\",\"minAssetsRequired\":\"minimum amount required by the account (if discount included for early withdrawal).\",\"owner\":\"address that previously deposited the assets.\",\"positionAssets\":\"position size to be reduced.\",\"receiver\":\"address that will receive the withdrawn assets.\"},\"returns\":{\"assetsDiscounted\":\"amount of assets withdrawn (can include a discount for early withdraw).\"}}},\"stateVariables\":{\"__gap\":{\"custom:oz-renamed-from\":\"floatingUtilization\",\"details\":\"gap from deprecated state.\"},\"auditor\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"notice\":\"Emitted when accumulator distributes earnings.\"},\"BackupFeeRateSet(uint256)\":{\"notice\":\"Emitted when the backupFeeRate parameter is changed by admin.\"},\"Borrow(address,address,address,uint256,uint256)\":{\"notice\":\"Event emitted when an account borrows amount of assets from a floating pool.\"},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account borrows amount of an asset from a certain maturity date.\"},\"DampSpeedSet(uint256,uint256)\":{\"notice\":\"Emitted when the damp speeds are changed by admin.\"},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period.\"},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"notice\":\"Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\"},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"notice\":\"Emitted when the earnings of a maturity are updated.\"},\"FloatingDebtUpdate(uint256,uint256)\":{\"notice\":\"Emitted when the floating debt is updated.\"},\"Frozen(address,bool)\":{\"notice\":\"Emitted when `account` sets the `isFrozen` flag.\"},\"InterestRateModelSet(address)\":{\"notice\":\"Emitted when the interestRateModel is changed by admin.\"},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"notice\":\"Emitted when an account's position had a liquidation.\"},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when market state is updated.\"},\"MaxFuturePoolsSet(uint256)\":{\"notice\":\"Emitted when the maxFuturePools is changed by admin.\"},\"PenaltyRateSet(uint256)\":{\"notice\":\"Emitted when the penaltyRate is changed by admin.\"},\"Repay(address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays amount of assets to a floating pool.\"},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays its borrows after maturity.\"},\"ReserveFactorSet(uint256)\":{\"notice\":\"Emitted when the reserveFactor is changed by admin.\"},\"RewardsControllerSet(address)\":{\"notice\":\"Emitted when the rewardsController is changed by admin.\"},\"Seize(address,address,uint256)\":{\"notice\":\"Emitted when an account's collateral has been seized.\"},\"SpreadBadDebt(address,uint256)\":{\"notice\":\"Emitted when an account is cleared from bad debt.\"},\"TreasurySet(address,uint256)\":{\"notice\":\"Emitted when the treasury variables are changed by admin.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account withdraws from a fixed rate pool.\"}},\"kind\":\"user\",\"methods\":{\"accountSnapshot(address)\":{\"notice\":\"Gets current snapshot for an account across all maturities.\"},\"accounts(address)\":{\"notice\":\"Tracks fixed deposit and borrow map and floating borrow shares of an account.\"},\"backupFeeRate()\":{\"notice\":\"Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\"},\"borrow(uint256,address,address)\":{\"notice\":\"Borrows a certain amount from the floating pool.\"},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Borrows a certain amount from a maturity.\"},\"clearBadDebt(address)\":{\"notice\":\"Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\"},\"dampSpeedDown()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\"},\"dampSpeedUp()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Deposits a certain amount to a maturity.\"},\"earningsAccumulator()\":{\"notice\":\"Accumulated earnings from extraordinary sources to be gradually distributed.\"},\"earningsAccumulatorSmoothFactor()\":{\"notice\":\"Factor used for gradual accrual of earnings to the floating pool.\"},\"fixedBorrowPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed borrow positions by maturity, account and position.\"},\"fixedDepositPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed deposit positions by maturity, account and position.\"},\"fixedPoolBalance(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed and supplied amount.\"},\"fixedPoolBorrowed(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed amount.\"},\"fixedPools(uint256)\":{\"notice\":\"Tracks fixed pools state by maturity.\"},\"floatingAssets()\":{\"notice\":\"Amount of floating assets deposited to the pool.\"},\"floatingAssetsAverage()\":{\"notice\":\"Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\"},\"floatingBackupBorrowed()\":{\"notice\":\"Amount of assets lent by the floating pool to the fixed pools.\"},\"floatingDebt()\":{\"notice\":\"Amount of assets lent by the floating pool to accounts.\"},\"initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"notice\":\"Initializes the contract.\"},\"interestRateModel()\":{\"notice\":\"Interest rate model contract used to get the borrow rates.\"},\"isFrozen()\":{\"notice\":\"Flag to prevent new borrows and deposits.\"},\"lastAccumulatorAccrual()\":{\"notice\":\"Last time the accumulator distributed earnings.\"},\"lastAverageUpdate()\":{\"notice\":\"Last time the floating assets average was updated.\"},\"lastFloatingDebtUpdate()\":{\"notice\":\"Last time the floating debt was updated.\"},\"liquidate(address,uint256,address)\":{\"notice\":\"Liquidates undercollateralized fixed/floating (or both) position(s).\"},\"maxFuturePools()\":{\"notice\":\"Number of fixed pools to be active at the same time.\"},\"pause()\":{\"notice\":\"Sets the pause state to true in case of emergency, triggered by an authorized account.\"},\"penaltyRate()\":{\"notice\":\"Rate per second to be charged to delayed fixed pools borrowers after maturity.\"},\"previewBorrow(uint256)\":{\"notice\":\"Simulates the effects of a borrow at the current time, given current contract conditions.\"},\"previewDebt(address)\":{\"notice\":\"Gets all borrows and penalties for an account.\"},\"previewFloatingAssetsAverage()\":{\"notice\":\"Returns the current `floatingAssetsAverage` without updating the storage variable.\"},\"previewRefund(uint256)\":{\"notice\":\"Simulates the effects of a refund at the current time, given current contract conditions.\"},\"previewRepay(uint256)\":{\"notice\":\"Simulates the effects of a repay at the current time, given current contract conditions.\"},\"redeem(uint256,address,address)\":{\"notice\":\"Redeems the owner's floating pool assets to the receiver address.\"},\"refund(uint256,address)\":{\"notice\":\"Repays a certain amount of shares to the floating pool.\"},\"repay(uint256,address)\":{\"notice\":\"Repays a certain amount of assets to the floating pool.\"},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Repays a certain amount to a maturity.\"},\"reserveFactor()\":{\"notice\":\"Percentage factor that represents the liquidity reserves that can't be borrowed.\"},\"rewardsController()\":{\"notice\":\"Address of the rewards controller that will accrue rewards for accounts operating with the Market.\"},\"seize(address,address,uint256)\":{\"notice\":\"Public function to seize a certain amount of assets.\"},\"setAssetSymbol(string)\":{\"notice\":\"Sets name and symbol for the Market.\"},\"setBackupFeeRate(uint256)\":{\"notice\":\"Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity.\"},\"setDampSpeed(uint256,uint256)\":{\"notice\":\"Sets the damp speed used to update the floatingAssetsAverage.\"},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"notice\":\"Sets the factor used when smoothly accruing earnings to the floating pool.\"},\"setFrozen(bool)\":{\"notice\":\"Sets `isFrozen` state, triggered by an authorized account.\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model to be used to calculate rates.\"},\"setMaxFuturePools(uint8)\":{\"notice\":\"Sets the protocol's max future pools for fixed borrowing and lending.\"},\"setPenaltyRate(uint256)\":{\"notice\":\"Sets the penalty rate per second.\"},\"setReserveFactor(uint128)\":{\"notice\":\"Sets the percentage that represents the liquidity reserves that can't be borrowed.\"},\"setRewardsController(address)\":{\"notice\":\"Sets the rewards controller to update account rewards when operating with the Market.\"},\"setTreasury(address,uint256)\":{\"notice\":\"Sets the treasury variables.\"},\"totalAssets()\":{\"notice\":\"Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator.\"},\"totalFloatingBorrowAssets()\":{\"notice\":\"Calculates the total floating debt, considering elapsed time since last update and current interest rate.\"},\"totalFloatingBorrowShares()\":{\"notice\":\"Total amount of floating borrow shares assigned to floating borrow accounts.\"},\"transfer(address,uint256)\":{\"notice\":\"Moves amount of shares from the caller's account to `to`.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Moves amount of shares from `from` to `to` using the allowance mechanism.\"},\"treasury()\":{\"notice\":\"Address of the treasury that will receive the allocated earnings.\"},\"treasuryFeeRate()\":{\"notice\":\"Rate to be charged by the treasury to floating and fixed borrows.\"},\"unpause()\":{\"notice\":\"Sets the pause state to false when threat is gone, triggered by an authorized account.\"},\"withdraw(uint256,address,address)\":{\"notice\":\"Withdraws the owner's floating pool assets to the receiver address.\"},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Withdraws a certain amount from a maturity.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Market.sol\":\"Market\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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 {Initializable} from \\\"../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 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 function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_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(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\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"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/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\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\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"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 (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport {Initializable} from \\\"../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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\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\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"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 {Initializable} from \\\"../../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\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"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/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\"},\"contracts/Auditor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract Auditor is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n\\n /// @notice Address that a market should have as price feed to consider as base price and avoid external price call.\\n address public constant BASE_FEED = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n /// @notice Target health factor that the account should have after it's liquidated to prevent cascade liquidations.\\n uint256 public constant TARGET_HEALTH = 1.25e18;\\n /// @notice Maximum value the liquidator can send and still have granular control of max assets.\\n /// Above this threshold, they should send `type(uint256).max`.\\n uint256 public constant ASSETS_THRESHOLD = type(uint256).max / 1e18;\\n\\n /// @notice Decimals that the answer of all price feeds should have.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 public immutable priceDecimals;\\n /// @notice Base factor to scale the price returned by the feed to 18 decimals.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable baseFactor;\\n /// @notice Base price used if the feed to fetch the price from is `BASE_FEED`.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable basePrice;\\n\\n /// @notice Tracks the markets' indexes that an account has entered as collateral.\\n mapping(address => uint256) public accountMarkets;\\n /// @notice Stores market parameters per each enabled market.\\n mapping(Market => MarketData) public markets;\\n /// @notice Array of all enabled markets.\\n Market[] public marketList;\\n\\n /// @notice Liquidation incentive factors for the liquidator and the lenders of the market where the debt is repaid.\\n LiquidationIncentive public liquidationIncentive;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(uint256 priceDecimals_) {\\n priceDecimals = priceDecimals_;\\n baseFactor = 10 ** (18 - priceDecimals_);\\n basePrice = 10 ** priceDecimals_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(LiquidationIncentive memory liquidationIncentive_) external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setLiquidationIncentive(liquidationIncentive_);\\n }\\n\\n /// @notice Allows assets of a certain market to be used as collateral for borrowing other assets.\\n /// @param market market to enabled as collateral.\\n function enterMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) != 0) return;\\n accountMarkets[msg.sender] = marketMap | marketMask;\\n\\n emit MarketEntered(market, msg.sender);\\n }\\n\\n /// @notice Removes market from sender's account liquidity calculation.\\n /// @dev Sender must not have an outstanding borrow balance in the asset, or be providing necessary collateral\\n /// for an outstanding borrow.\\n /// @param market market to be disabled as collateral.\\n function exitMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n (uint256 assets, uint256 debt) = market.accountSnapshot(msg.sender);\\n\\n // fail if the sender has a borrow balance\\n if (debt != 0) revert RemainingDebt();\\n\\n // fail if the sender is not permitted to redeem all of their assets\\n checkShortfall(market, msg.sender, assets);\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) == 0) return;\\n accountMarkets[msg.sender] = marketMap & ~marketMask;\\n\\n emit MarketExited(market, msg.sender);\\n }\\n\\n /// @notice Returns account's liquidity calculation.\\n /// @param account account in which the liquidity will be calculated.\\n /// @param marketToSimulate market in which to simulate withdraw operation.\\n /// @param withdrawAmount amount to simulate as withdraw.\\n /// @return sumCollateral sum of all collateral, already multiplied by each adjust factor (denominated in base).\\n /// @return sumDebtPlusEffects sum of all debt divided by adjust factor considering withdrawal (denominated in base).\\n function accountLiquidity(\\n address account,\\n Market marketToSimulate,\\n uint256 withdrawAmount\\n ) public view returns (uint256 sumCollateral, uint256 sumDebtPlusEffects) {\\n AccountLiquidity memory vars; // holds all our calculation results\\n\\n // for each asset the account is in\\n uint256 marketMap = accountMarkets[account];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 baseUnit = 10 ** m.decimals;\\n uint256 adjustFactor = m.adjustFactor;\\n\\n // read the balances\\n (vars.balance, vars.borrowBalance) = market.accountSnapshot(account);\\n\\n // get the normalized price of the asset (18 decimals)\\n vars.price = assetPrice(m.priceFeed);\\n\\n // sum all the collateral prices\\n sumCollateral += vars.balance.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n\\n // sum all the debt\\n sumDebtPlusEffects += vars.borrowBalance.mulDivUp(vars.price, baseUnit).divWadUp(adjustFactor);\\n\\n // simulate the effects of withdrawing from a pool\\n if (market == marketToSimulate) {\\n // calculate the effects of redeeming markets\\n // (having less collateral is the same as having more debt for this calculation)\\n if (withdrawAmount != 0) {\\n sumDebtPlusEffects += withdrawAmount.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n }\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Validates that the current state of the position and system are valid.\\n /// @dev To be called after adding the borrowed debt to the account position.\\n /// @param market address of the market where the borrow is made.\\n /// @param borrower address of the account that will repay the debt.\\n function checkBorrow(Market market, address borrower) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[borrower];\\n uint256 marketMask = 1 << m.index;\\n\\n // validate borrow state\\n if ((marketMap & marketMask) == 0) {\\n // only markets may call checkBorrow if borrower not in market\\n if (msg.sender != address(market)) revert NotMarket();\\n\\n accountMarkets[borrower] = marketMap | marketMask;\\n emit MarketEntered(market, borrower);\\n }\\n\\n // verify that current liquidity is not short\\n (uint256 collateral, uint256 debt) = accountLiquidity(borrower, Market(address(0)), 0);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Checks if the account has liquidity shortfall.\\n /// @param market address of the market where the operation will happen.\\n /// @param account address of the account to check for possible shortfall.\\n /// @param amount amount that the account wants to withdraw or transfer.\\n function checkShortfall(Market market, address account, uint256 amount) public view {\\n // if the account is not 'in' the market, bypass the liquidity check\\n if ((accountMarkets[account] & (1 << markets[market].index)) == 0) return;\\n\\n // otherwise, perform a hypothetical liquidity check to guard against shortfall\\n (uint256 collateral, uint256 debt) = accountLiquidity(account, market, amount);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Allows/rejects liquidation of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt is being repaid.\\n /// @param seizeMarket market from where the liquidator will seize assets.\\n /// @param borrower address in which the assets are being liquidated.\\n /// @param maxLiquidatorAssets maximum amount of debt the liquidator is willing to accept.\\n /// @return maxRepayAssets capped amount of debt the liquidator is allowed to repay.\\n function checkLiquidation(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 maxLiquidatorAssets\\n ) external view returns (uint256 maxRepayAssets) {\\n // if markets are listed, they have the same auditor\\n if (!markets[repayMarket].isListed || !markets[seizeMarket].isListed) revert MarketNotListed();\\n\\n MarketVars memory repay;\\n LiquidityVars memory base;\\n uint256 marketMap = accountMarkets[borrower];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage marketData = markets[market];\\n MarketVars memory m = MarketVars({\\n price: assetPrice(marketData.priceFeed),\\n adjustFactor: marketData.adjustFactor,\\n baseUnit: 10 ** marketData.decimals\\n });\\n\\n if (market == repayMarket) repay = m;\\n\\n (uint256 collateral, uint256 debt) = market.accountSnapshot(borrower);\\n\\n uint256 value = debt.mulDivUp(m.price, m.baseUnit);\\n base.totalDebt += value;\\n base.adjustedDebt += value.divWadUp(m.adjustFactor);\\n\\n value = collateral.mulDivDown(m.price, m.baseUnit);\\n base.totalCollateral += value;\\n base.adjustedCollateral += value.mulWadDown(m.adjustFactor);\\n if (market == seizeMarket) base.seizeAvailable = value;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (base.adjustedCollateral >= base.adjustedDebt) revert InsufficientShortfall();\\n\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n uint256 adjustFactor = base.adjustedCollateral.mulWadDown(base.totalDebt).divWadUp(\\n base.adjustedDebt.mulWadUp(base.totalCollateral)\\n );\\n uint256 closeFactor = (TARGET_HEALTH - base.adjustedCollateral.divWadUp(base.adjustedDebt)).divWadUp(\\n TARGET_HEALTH - adjustFactor.mulWadDown(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n );\\n maxRepayAssets = Math.min(\\n Math\\n .min(\\n base.totalDebt.mulWadUp(Math.min(1e18, closeFactor)),\\n base.seizeAvailable.divWadUp(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n )\\n .mulDivUp(repay.baseUnit, repay.price),\\n maxLiquidatorAssets < ASSETS_THRESHOLD\\n ? maxLiquidatorAssets.divWadDown(1e18 + memIncentive.lenders)\\n : maxLiquidatorAssets\\n );\\n }\\n\\n /// @notice Allow/rejects seizing of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market where the assets will be seized.\\n function checkSeize(Market repayMarket, Market seizeMarket) external view {\\n // if markets are listed, they also point to the same Auditor\\n if (!markets[seizeMarket].isListed || !markets[repayMarket].isListed) revert MarketNotListed();\\n }\\n\\n /// @notice Calculates the amount of collateral to be seized when a position is undercollateralized.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market from where the assets will be seized by the liquidator.\\n /// @param borrower account in which assets are being seized.\\n /// @param actualRepayAssets amount being repaid.\\n /// @return lendersAssets amount to be added for other lenders as a compensation of bad debt clearing.\\n /// @return seizeAssets amount that can be seized by the liquidator.\\n function calculateSeize(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 actualRepayAssets\\n ) external view returns (uint256 lendersAssets, uint256 seizeAssets) {\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n lendersAssets = actualRepayAssets.mulWadDown(memIncentive.lenders);\\n\\n // read prices for borrowed and collateral markets\\n uint256 priceBorrowed = assetPrice(markets[repayMarket].priceFeed);\\n uint256 priceCollateral = assetPrice(markets[seizeMarket].priceFeed);\\n uint256 baseAmount = actualRepayAssets.mulDivUp(priceBorrowed, 10 ** markets[repayMarket].decimals);\\n\\n seizeAssets = Math.min(\\n baseAmount.mulDivUp(10 ** markets[seizeMarket].decimals, priceCollateral).mulWadUp(\\n 1e18 + memIncentive.liquidator + memIncentive.lenders\\n ),\\n seizeMarket.maxWithdraw(borrower)\\n );\\n }\\n\\n /// @notice Checks if account has debt with no collateral, if so then call `clearBadDebt` from each market.\\n /// @dev Collateral is multiplied by price and adjust factor to be accurately evaluated as positive collateral asset.\\n /// @param account account in which debt is being checked.\\n function handleBadDebt(address account) external {\\n uint256 memMarketMap = accountMarkets[account];\\n uint256 marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 assets = market.maxWithdraw(account);\\n if (assets.mulDivDown(assetPrice(m.priceFeed), 10 ** m.decimals).mulWadDown(m.adjustFactor) > 0) return;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) marketList[i].clearBadDebt(account);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the asset price of a price feed.\\n /// @dev If Chainlink's asset price is <= 0 the call is reverted.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price.\\n /// @return The price of the asset scaled to 18-digit decimals.\\n function assetPrice(IPriceFeed priceFeed) public view returns (uint256) {\\n if (address(priceFeed) == BASE_FEED) return basePrice;\\n\\n int256 price = priceFeed.latestAnswer();\\n if (price <= 0) revert InvalidPrice();\\n return uint256(price) * baseFactor;\\n }\\n\\n /// @notice Retrieves all markets.\\n function allMarkets() external view returns (Market[] memory) {\\n return marketList;\\n }\\n\\n /// @notice Enables a certain market.\\n /// @dev Enabling more than 256 markets will cause an overflow when casting market index to uint8.\\n /// @param market market to add to the protocol.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n /// @param adjustFactor market's adjust factor for the underlying asset.\\n function enableMarket(\\n Market market,\\n IPriceFeed priceFeed,\\n uint128 adjustFactor\\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (market.auditor() != this) revert AuditorMismatch();\\n if (markets[market].isListed) revert MarketAlreadyListed();\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n\\n uint8 decimals = market.decimals();\\n markets[market] = MarketData({\\n isListed: true,\\n adjustFactor: adjustFactor,\\n decimals: decimals,\\n index: uint8(marketList.length),\\n priceFeed: priceFeed\\n });\\n\\n marketList.push(market);\\n\\n emit MarketListed(market, decimals);\\n emit PriceFeedSet(market, priceFeed);\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the adjust factor for a certain market.\\n /// @param market address of the market to change adjust factor for.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n function setAdjustFactor(Market market, uint128 adjustFactor) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (!markets[market].isListed) revert MarketNotListed();\\n\\n markets[market].adjustFactor = adjustFactor;\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the Chainlink Price Feed Aggregator source for a market.\\n /// @param market market address of the asset.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n function setPriceFeed(Market market, IPriceFeed priceFeed) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n markets[market].priceFeed = priceFeed;\\n emit PriceFeedSet(market, priceFeed);\\n }\\n\\n /// @notice Sets liquidation incentive (liquidator and lenders) for the whole ecosystem.\\n /// @param liquidationIncentive_ new liquidation incentive.\\n function setLiquidationIncentive(\\n LiquidationIncentive memory liquidationIncentive_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n liquidationIncentive = liquidationIncentive_;\\n emit LiquidationIncentiveSet(liquidationIncentive_);\\n }\\n\\n /// @notice Emitted when a new market is listed for borrow/lending.\\n /// @param market address of the market that was listed.\\n /// @param decimals decimals of the market's underlying asset.\\n event MarketListed(Market indexed market, uint8 decimals);\\n\\n /// @notice Emitted when an account enters a market to use his deposit as collateral for a loan.\\n /// @param market address of the market that the account entered.\\n /// @param account address of the account that just entered a market.\\n event MarketEntered(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when an account leaves a market.\\n /// Means that they would stop using their deposit as collateral and won't ask for any loans in this market.\\n /// @param market address of the market that the account just left.\\n /// @param account address of the account that just left a market.\\n event MarketExited(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when a adjust factor is changed by admin.\\n /// @param market address of the market that has a new adjust factor.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n event AdjustFactorSet(Market indexed market, uint256 adjustFactor);\\n\\n /// @notice Emitted when a new liquidationIncentive has been set.\\n /// @param liquidationIncentive represented with 18 decimals.\\n event LiquidationIncentiveSet(LiquidationIncentive liquidationIncentive);\\n\\n /// @notice Emitted when a market and prie feed is changed by admin.\\n /// @param market address of the asset used to get the price.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n event PriceFeedSet(Market indexed market, IPriceFeed indexed priceFeed);\\n\\n /// @notice Stores the market parameters used for liquidity calculations.\\n /// @param adjustFactor used to asses the lending power of the market's underlying asset.\\n /// @param decimals number of decimals of the market's underlying asset.\\n /// @param index index of the market in the `marketList`.\\n /// @param isListed true if the market is enabled.\\n /// @param priceFeed address of the price feed used to query the asset's price.\\n struct MarketData {\\n uint128 adjustFactor;\\n uint8 decimals;\\n uint8 index;\\n bool isListed;\\n IPriceFeed priceFeed;\\n }\\n\\n /// @notice Stores the liquidator and lenders factors used in liquidations to calculate the amount to seize.\\n /// @param liquidator factor used to calculate the extra bonus a liquidator can seize.\\n /// @param lenders factor used to calculate the bonus that the pool lenders receive.\\n struct LiquidationIncentive {\\n uint128 liquidator;\\n uint128 lenders;\\n }\\n\\n /// @notice Used as memory access to temporary store account liquidity data.\\n /// @param balance collateral balance of the account.\\n /// @param borrowBalance borrow balance of the account.\\n /// @param price asset price returned by the price feed with 18 decimals.\\n struct AccountLiquidity {\\n uint256 balance;\\n uint256 borrowBalance;\\n uint256 price;\\n }\\n}\\n\\nerror AuditorMismatch();\\nerror InsufficientAccountLiquidity();\\nerror InsufficientShortfall();\\nerror InvalidPrice();\\nerror InvalidPriceFeed();\\nerror MarketAlreadyListed();\\nerror MarketNotListed();\\nerror NotMarket();\\nerror RemainingDebt();\\n\\nstruct MarketVars {\\n uint256 price;\\n uint256 baseUnit;\\n uint128 adjustFactor;\\n}\\n\\nstruct LiquidityVars {\\n uint256 totalDebt;\\n uint256 totalCollateral;\\n uint256 adjustedDebt;\\n uint256 adjustedCollateral;\\n uint256 seizeAvailable;\\n}\\n\",\"keccak256\":\"0xa5facf0b53ee0f3a07843361add23000e569743c9b5a3cdf7817dc51a833040b\",\"license\":\"BUSL-1.1\"},\"contracts/InterestRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract InterestRateModel {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for int256;\\n using SafeCast for uint256;\\n using SafeCast for int256;\\n\\n /// @notice Scale factor of the floating curve.\\n uint256 public immutable floatingCurveA;\\n /// @notice Origin intercept of the floating curve.\\n int256 public immutable floatingCurveB;\\n /// @notice Asymptote of the floating curve.\\n uint256 public immutable floatingMaxUtilization;\\n\\n /// @notice natural level of utilization, represented with 18 decimals.\\n uint256 public immutable naturalUtilization;\\n /// @notice speed of growth for the base rate, represented with 18 decimals.\\n int256 public immutable growthSpeed;\\n /// @notice speed of the sigmoid curve, represented with 18 decimals.\\n int256 public immutable sigmoidSpeed;\\n /// @notice spread factor for the fixed rate, represented with 18 decimals.\\n int256 public immutable spreadFactor;\\n /// @notice speed of maturity for the fixed rate, represented with 18 decimals.\\n int256 public immutable maturitySpeed;\\n /// @notice time preference for the fixed rate, represented with 18 decimals.\\n int256 public immutable timePreference;\\n /// @notice liquidity naturally designated to fixed pools, represented with 18 decimals.\\n uint256 public immutable fixedAllocation;\\n /// @notice maximum interest rate, represented with 18 decimals.\\n uint256 public immutable maxRate;\\n\\n /// @dev maximum input value for expWad, ~ln((2^255 - 1) / 1e18), represented with 18 decimals.\\n int256 internal constant EXP_THRESHOLD = 135305999368893231588;\\n /// @dev auxiliary variable to save an extra operation.\\n int256 internal immutable auxSigmoid;\\n\\n /// @notice set of parameters used to initialize the interest rate model.\\n Parameters internal _parameters;\\n\\n constructor(Parameters memory p, Market market_) {\\n assert(\\n p.minRate > 0 &&\\n p.naturalRate > 0 &&\\n p.maxUtilization > 1e18 &&\\n p.naturalUtilization > 0 &&\\n p.naturalUtilization < 1e18 &&\\n p.growthSpeed > 0 &&\\n p.sigmoidSpeed > 0 &&\\n p.spreadFactor > 0 &&\\n p.maturitySpeed > 0 &&\\n p.maxRate > 0 &&\\n p.maxRate <= 15_000e16\\n );\\n\\n _parameters = p;\\n growthSpeed = p.growthSpeed.toInt256();\\n sigmoidSpeed = p.sigmoidSpeed.toInt256();\\n spreadFactor = p.spreadFactor.toInt256();\\n maturitySpeed = p.maturitySpeed.toInt256();\\n floatingMaxUtilization = p.maxUtilization;\\n naturalUtilization = p.naturalUtilization;\\n\\n floatingCurveA =\\n ((p.naturalRate.mulWadUp(\\n uint256(((growthSpeed * (1e18 - int256(p.naturalUtilization / 2)).lnWad()) / 1e18).expWad())\\n ) - p.minRate) *\\n (p.maxUtilization - p.naturalUtilization) *\\n (p.maxUtilization)) /\\n (p.naturalUtilization * 1e18);\\n floatingCurveB = int256(p.minRate) - int256(floatingCurveA.divWadDown(p.maxUtilization));\\n\\n market = market_;\\n fixedCurveA = address(market_) != address(0) ? floatingCurveA : 0;\\n fixedCurveB = address(market_) != address(0) ? floatingCurveB : int256(0);\\n fixedMaxUtilization = address(market_) != address(0) ? p.maxUtilization : 0;\\n\\n timePreference = p.timePreference;\\n fixedAllocation = p.fixedAllocation;\\n maxRate = p.maxRate;\\n\\n auxSigmoid = int256(naturalUtilization.divWadDown(1e18 - naturalUtilization)).lnWad();\\n\\n // reverts if it's an invalid curve (such as one yielding a negative interest rate).\\n fixedRate(block.timestamp + FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL), 2, 1, 1, 2);\\n baseRate(1e18 - 1, 1e18 - 1);\\n }\\n\\n /// @notice fixed rate with given conditions, represented with 18 decimals.\\n /// @param maturity maturity of the pool.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param uFixed fixed utilization of the pool.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `base * spread` and `maxRate` with given conditions.\\n function fixedRate(\\n uint256 maturity,\\n uint256 maxPools,\\n uint256 uFixed,\\n uint256 uFloating,\\n uint256 uGlobal\\n ) public view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n if (uFixed > uGlobal) revert UtilizationExceeded();\\n if (uGlobal == 0) return baseRate(uFloating, 0);\\n\\n FixedVars memory v;\\n v.sqFNatPools = (maxPools * 1e18).divWadDown(fixedAllocation);\\n v.fNatPools = (v.sqFNatPools * 1e18).sqrt();\\n v.fixedFactor = (maxPools * uFixed).mulDivDown(1e36, uGlobal * fixedAllocation);\\n v.natPools =\\n ((2e18 - v.sqFNatPools.toInt256()) * 1e36) /\\n (v.fNatPools.toInt256() * (1e18 - v.fNatPools.toInt256()));\\n v.maturityFactor = (maturity - block.timestamp).divWadDown(\\n block.timestamp + maxPools * FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL)\\n );\\n\\n uint256 spread = (1e18 +\\n (((maturitySpeed * (v.maturityFactor).toInt256().lnWad()) / 1e18).expWad() *\\n (timePreference +\\n (spreadFactor *\\n ((v.natPools * (v.fixedFactor * 1e18).sqrt().toInt256()) /\\n 1e18 +\\n ((1e18 - v.natPools) * v.fixedFactor.toInt256()) /\\n 1e18 -\\n 1e18)) /\\n 1e18)) /\\n 1e18).toUint256();\\n uint256 base = baseRate(uFloating, uGlobal);\\n\\n if (base >= maxRate.divWadDown(spread)) return maxRate;\\n return base.mulWadUp(spread);\\n }\\n\\n /// @notice base rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the base rate, without capping.\\n function baseRate(uint256 uFloating, uint256 uGlobal) internal view returns (uint256) {\\n if (uFloating > uGlobal) revert UtilizationExceeded();\\n if (uGlobal >= 1e18) return type(uint256).max;\\n\\n uint256 r = ((floatingCurveA.divWadDown(floatingMaxUtilization - uFloating)).toInt256() + floatingCurveB)\\n .toUint256();\\n\\n if (uGlobal == 0) return r;\\n\\n int256 x = -((sigmoidSpeed * (int256(uGlobal.divWadDown(1e18 - uGlobal)).lnWad() - auxSigmoid)) / 1e18);\\n uint256 sigmoid = x > EXP_THRESHOLD ? 0 : uint256(1e18).divWadDown(1e18 + x.expWad().toUint256());\\n x = (-growthSpeed * (1e18 - sigmoid.mulWadDown(uGlobal)).toInt256().lnWad()) / 1e18;\\n uint256 globalFactor = ((x > EXP_THRESHOLD ? EXP_THRESHOLD : x).expWad()).toUint256();\\n\\n if (globalFactor > type(uint256).max / r) return type(uint256).max;\\n\\n return r.mulWadUp(globalFactor);\\n }\\n\\n /// @notice floating rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `baseRate` and `maxRate` with given conditions.\\n function floatingRate(uint256 uFloating, uint256 uGlobal) public view returns (uint256) {\\n return Math.min(baseRate(uFloating, uGlobal), maxRate);\\n }\\n\\n function parameters() external view returns (Parameters memory) {\\n return _parameters;\\n }\\n\\n // Legacy interface, kept for compatibility.\\n\\n /// @notice Market where the interest rate model is used. Keeps compatibility with legacy interest rate model.\\n Market public immutable market;\\n uint256 public immutable fixedCurveA;\\n int256 public immutable fixedCurveB;\\n uint256 public immutable fixedMaxUtilization;\\n\\n /// @dev Deprecated in favor of `floatingRate(uFloating, uGlobal)`.\\n function floatingRate(uint256) public view returns (uint256) {\\n uint256 floatingAssets = market.floatingAssets();\\n uint256 floatingDebt = market.floatingDebt();\\n return\\n floatingRate(\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed())\\n );\\n }\\n\\n /// @dev Deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function fixedBorrowRate(\\n uint256 maturity,\\n uint256 amount,\\n uint256 borrowed,\\n uint256 supplied,\\n uint256\\n ) external view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n uint256 floatingAssets = previewFloatingAssetsAverage(maturity);\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n uint256 newBorrowed = borrowed + amount;\\n uint256 backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, supplied), newBorrowed);\\n\\n return\\n fixedRate(\\n maturity,\\n market.maxFuturePools(),\\n fixedUtilization(supplied, newBorrowed, floatingAssets),\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed() + backupDebtAddition)\\n ).mulDivDown(maturity - block.timestamp, 365 days);\\n }\\n\\n /// @dev deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function minFixedRate(uint256, uint256, uint256) external view returns (uint256 rate, uint256 utilization) {\\n uint256 floatingAssets = market.floatingAssetsAverage();\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n utilization = globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed());\\n rate = baseRate(floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0, utilization);\\n }\\n\\n function previewFloatingAssetsAverage(uint256 maturity) internal view returns (uint256) {\\n FixedLib.Pool memory pool;\\n (pool.borrowed, pool.supplied, pool.unassignedEarnings, pool.lastAccrual) = market.fixedPools(maturity);\\n uint256 memFloatingAssets = market.floatingAssets() +\\n pool.unassignedEarnings.mulDivDown(block.timestamp - pool.lastAccrual, maturity - pool.lastAccrual);\\n uint256 memFloatingAssetsAverage = market.floatingAssetsAverage();\\n uint256 averageFactor = (1e18 -\\n (\\n -int256(\\n memFloatingAssets < memFloatingAssetsAverage\\n ? market.dampSpeedDown()\\n : market.dampSpeedUp() * (block.timestamp - market.lastAverageUpdate())\\n )\\n ).expWad()).toUint256();\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n function globalUtilization(\\n uint256 floatingAssets,\\n uint256 floatingDebt,\\n uint256 backupBorrowed\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 ? (floatingDebt + backupBorrowed).divWadUp(floatingAssets) : 0;\\n }\\n\\n function fixedUtilization(\\n uint256 supplied,\\n uint256 borrowed,\\n uint256 floatingAssets\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(floatingAssets) : 0;\\n }\\n}\\n\\nerror AlreadyMatured();\\nerror UtilizationExceeded();\\n\\nstruct Parameters {\\n uint256 minRate;\\n uint256 naturalRate;\\n uint256 maxUtilization;\\n uint256 naturalUtilization;\\n uint256 growthSpeed;\\n uint256 sigmoidSpeed;\\n uint256 spreadFactor;\\n uint256 maturitySpeed;\\n int256 timePreference;\\n uint256 fixedAllocation;\\n uint256 maxRate;\\n}\\n\\nstruct FixedVars {\\n uint256 sqFNatPools;\\n uint256 fNatPools;\\n uint256 fixedFactor;\\n int256 natPools;\\n uint256 maturityFactor;\\n}\\n\",\"keccak256\":\"0x9df5219d8182a14f123a725c73a586aed83c3d39c17b45a0a59e3923e4fe6532\",\"license\":\"BUSL-1.1\"},\"contracts/Market.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { PausableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { ERC4626, ERC20, SafeTransferLib } from \\\"solmate/src/mixins/ERC4626.sol\\\";\\nimport { InterestRateModel } from \\\"./InterestRateModel.sol\\\";\\nimport { RewardsController } from \\\"./RewardsController.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Auditor } from \\\"./Auditor.sol\\\";\\n\\ncontract Market is Initializable, AccessControlUpgradeable, PausableUpgradeable, ERC4626 {\\n using FixedPointMathLib for int256;\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint128;\\n using SafeTransferLib for ERC20;\\n using FixedLib for FixedLib.Pool;\\n using FixedLib for FixedLib.Position;\\n using FixedLib for uint256;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant EMERGENCY_ADMIN_ROLE = keccak256(\\\"EMERGENCY_ADMIN_ROLE\\\");\\n\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n Auditor public immutable auditor;\\n\\n /// @notice Tracks account's fixed deposit positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedDepositPositions;\\n /// @notice Tracks account's fixed borrow positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedBorrowPositions;\\n /// @notice Tracks fixed pools state by maturity.\\n mapping(uint256 => FixedLib.Pool) public fixedPools;\\n\\n /// @notice Tracks fixed deposit and borrow map and floating borrow shares of an account.\\n mapping(address => Account) public accounts;\\n\\n /// @notice Amount of assets lent by the floating pool to the fixed pools.\\n uint256 public floatingBackupBorrowed;\\n /// @notice Amount of assets lent by the floating pool to accounts.\\n uint256 public floatingDebt;\\n\\n /// @notice Accumulated earnings from extraordinary sources to be gradually distributed.\\n uint256 public earningsAccumulator;\\n /// @notice Rate per second to be charged to delayed fixed pools borrowers after maturity.\\n uint256 public penaltyRate;\\n /// @notice Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\\n uint256 public backupFeeRate;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\\n uint256 public dampSpeedUp;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\\n uint256 public dampSpeedDown;\\n\\n /// @notice Number of fixed pools to be active at the same time.\\n uint8 public maxFuturePools;\\n /// @notice Last time the accumulator distributed earnings.\\n uint32 public lastAccumulatorAccrual;\\n /// @notice Last time the floating debt was updated.\\n uint32 public lastFloatingDebtUpdate;\\n /// @notice Last time the floating assets average was updated.\\n uint32 public lastAverageUpdate;\\n\\n /// @notice Interest rate model contract used to get the borrow rates.\\n InterestRateModel public interestRateModel;\\n\\n /// @notice Factor used for gradual accrual of earnings to the floating pool.\\n uint128 public earningsAccumulatorSmoothFactor;\\n /// @notice Percentage factor that represents the liquidity reserves that can't be borrowed.\\n uint128 public reserveFactor;\\n\\n /// @notice Amount of floating assets deposited to the pool.\\n uint256 public floatingAssets;\\n /// @notice Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\\n uint256 public floatingAssetsAverage;\\n\\n /// @notice Total amount of floating borrow shares assigned to floating borrow accounts.\\n uint256 public totalFloatingBorrowShares;\\n\\n /// @dev gap from deprecated state.\\n /// @custom:oz-renamed-from floatingUtilization\\n uint256 private __gap;\\n\\n /// @notice Address of the treasury that will receive the allocated earnings.\\n address public treasury;\\n /// @notice Rate to be charged by the treasury to floating and fixed borrows.\\n uint256 public treasuryFeeRate;\\n\\n /// @notice Address of the rewards controller that will accrue rewards for accounts operating with the Market.\\n RewardsController public rewardsController;\\n\\n /// @notice Flag to prevent new borrows and deposits.\\n bool public isFrozen;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(ERC20 asset_, Auditor auditor_) ERC4626(asset_, \\\"\\\", \\\"\\\") {\\n auditor = auditor_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(\\n string calldata assetSymbol,\\n uint8 maxFuturePools_,\\n uint128 earningsAccumulatorSmoothFactor_,\\n InterestRateModel interestRateModel_,\\n uint256 penaltyRate_,\\n uint256 backupFeeRate_,\\n uint128 reserveFactor_,\\n uint256 dampSpeedUp_,\\n uint256 dampSpeedDown_\\n ) external initializer {\\n __AccessControl_init();\\n __Pausable_init();\\n\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n lastAverageUpdate = uint32(block.timestamp);\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setAssetSymbol(assetSymbol);\\n setMaxFuturePools(maxFuturePools_);\\n setEarningsAccumulatorSmoothFactor(earningsAccumulatorSmoothFactor_);\\n setInterestRateModel(interestRateModel_);\\n setPenaltyRate(penaltyRate_);\\n setBackupFeeRate(backupFeeRate_);\\n setReserveFactor(reserveFactor_);\\n setDampSpeed(dampSpeedUp_, dampSpeedDown_);\\n }\\n\\n /// @notice Borrows a certain amount from the floating pool.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return borrowShares shares corresponding to the borrowed assets.\\n function borrow(\\n uint256 assets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 borrowShares) {\\n spendAllowance(borrower, assets);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n\\n borrowShares = previewBorrow(assets);\\n\\n uint256 newFloatingDebt = floatingDebt + assets;\\n floatingDebt = newFloatingDebt;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed, also considering the reserves\\n if (floatingBackupBorrowed + newFloatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n\\n totalFloatingBorrowShares += borrowShares;\\n accounts[borrower].floatingBorrowShares += borrowShares;\\n\\n emit Borrow(msg.sender, receiver, borrower, assets, borrowShares);\\n emitMarketUpdate();\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Repays a certain amount of assets to the floating pool.\\n /// @param assets assets to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepay the actual amount that should be transferred into the protocol.\\n /// @return borrowShares subtracted shares from the borrower's accountability.\\n function repay(\\n uint256 assets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepay, uint256 borrowShares) {\\n (actualRepay, borrowShares) = noTransferRefund(previewRepay(assets), borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), actualRepay);\\n }\\n\\n /// @notice Repays a certain amount of shares to the floating pool.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return assets subtracted assets from the borrower's accountability.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function refund(\\n uint256 borrowShares,\\n address borrower\\n ) external whenNotPaused returns (uint256 assets, uint256 actualShares) {\\n (assets, actualShares) = noTransferRefund(borrowShares, borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Allows to (partially) repay a floating borrow. It does not transfer assets.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower the address of the account that has the debt.\\n /// @return assets the actual amount that should be transferred into the protocol.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function noTransferRefund(\\n uint256 borrowShares,\\n address borrower\\n ) internal returns (uint256 assets, uint256 actualShares) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n Account storage account = accounts[borrower];\\n uint256 accountBorrowShares = account.floatingBorrowShares;\\n actualShares = Math.min(borrowShares, accountBorrowShares);\\n assets = previewRefund(actualShares);\\n\\n if (assets == 0) revert ZeroRepay();\\n\\n floatingDebt -= assets;\\n account.floatingBorrowShares = accountBorrowShares - actualShares;\\n totalFloatingBorrowShares -= actualShares;\\n\\n emit Repay(msg.sender, borrower, assets, actualShares);\\n }\\n\\n /// @notice Deposits a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be deposited.\\n /// @param assets amount to receive from the msg.sender.\\n /// @param minAssetsRequired minimum amount of assets required by the depositor for the transaction to be accepted.\\n /// @param receiver address that will be able to withdraw the deposited assets.\\n /// @return positionAssets total amount of assets (principal + fee) to be withdrawn at maturity.\\n function depositAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 minAssetsRequired,\\n address receiver\\n ) external whenNotPaused whenNotFrozen returns (uint256 positionAssets) {\\n if (assets == 0) revert ZeroDeposit();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n floatingAssets += backupEarnings;\\n\\n (uint256 fee, uint256 backupFee) = pool.calculateDeposit(assets, backupFeeRate);\\n positionAssets = assets + fee;\\n if (positionAssets < minAssetsRequired) revert Disagreement();\\n\\n floatingBackupBorrowed -= pool.deposit(assets);\\n pool.unassignedEarnings -= fee + backupFee;\\n earningsAccumulator += backupFee;\\n\\n // update account's position\\n FixedLib.Position storage position = fixedDepositPositions[maturity][receiver];\\n\\n // if account doesn't have a current position, add it to the list\\n if (position.principal == 0) {\\n Account storage account = accounts[receiver];\\n account.fixedDeposits = account.fixedDeposits.setMaturity(maturity);\\n }\\n\\n position.principal += assets;\\n position.fee += fee;\\n\\n emit DepositAtMaturity(maturity, msg.sender, receiver, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Borrows a certain amount from a maturity.\\n /// @param maturity maturity date for repayment.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return assetsOwed total amount of assets (principal + fee) to be repaid at maturity.\\n function borrowAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 maxAssets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 assetsOwed) {\\n if (assets == 0) revert ZeroBorrow();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n {\\n uint256 backupDebtAddition = pool.borrow(assets);\\n if (backupDebtAddition != 0) {\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed + backupDebtAddition;\\n depositToTreasury(updateFloatingDebt());\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n }\\n uint256 fee;\\n {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, floatingBackupBorrowed)\\n );\\n fee = assets.mulWadDown(fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n }\\n assetsOwed = assets + fee;\\n\\n // validate that the account is not taking arbitrary fees\\n if (assetsOwed > maxAssets) revert Disagreement();\\n\\n spendAllowance(borrower, assetsOwed);\\n\\n {\\n // if account doesn't have a current position, add it to the list\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n if (position.principal == 0) {\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.setMaturity(maturity);\\n }\\n\\n // calculate what portion of the fees are to be accrued and what portion goes to earnings accumulator\\n (uint256 newUnassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(fee),\\n assets\\n );\\n if (newUnassignedEarnings != 0) pool.unassignedEarnings += newUnassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n fixedBorrowPositions[maturity][borrower] = FixedLib.Position(position.principal + assets, position.fee + fee);\\n }\\n\\n emit BorrowAtMaturity(maturity, msg.sender, receiver, borrower, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Withdraws a certain amount from a maturity.\\n /// @param maturity maturity date where the assets will be withdrawn.\\n /// @param positionAssets position size to be reduced.\\n /// @param minAssetsRequired minimum amount required by the account (if discount included for early withdrawal).\\n /// @param receiver address that will receive the withdrawn assets.\\n /// @param owner address that previously deposited the assets.\\n /// @return assetsDiscounted amount of assets withdrawn (can include a discount for early withdraw).\\n function withdrawAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 minAssetsRequired,\\n address receiver,\\n address owner\\n ) external whenNotPaused returns (uint256 assetsDiscounted) {\\n if (positionAssets == 0) revert ZeroWithdraw();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n FixedLib.Position memory position = fixedDepositPositions[maturity][owner];\\n\\n if (positionAssets > position.principal + position.fee) positionAssets = position.principal + position.fee;\\n\\n {\\n // remove the supply from the fixed rate pool\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed +\\n pool.withdraw(\\n FixedLib.Position(position.principal, position.fee).scaleProportionally(positionAssets).principal\\n );\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets) revert InsufficientProtocolLiquidity();\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n\\n // verify if there are any penalties/fee for the account because of early withdrawal, if so discount\\n if (block.timestamp < maturity) {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingBackupBorrowed = floatingBackupBorrowed;\\n\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, memFloatingBackupBorrowed)\\n );\\n assetsDiscounted = positionAssets.divWadDown(1e18 + fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n } else {\\n assetsDiscounted = positionAssets;\\n }\\n\\n if (assetsDiscounted < minAssetsRequired) revert Disagreement();\\n\\n spendAllowance(owner, assetsDiscounted);\\n\\n // all the fees go to unassigned or to the floating pool\\n (uint256 unassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(positionAssets - assetsDiscounted),\\n assetsDiscounted\\n );\\n pool.unassignedEarnings += unassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n // the account gets discounted the full amount\\n position.reduceProportionally(positionAssets);\\n if (position.principal | position.fee == 0) {\\n delete fixedDepositPositions[maturity][owner];\\n Account storage account = accounts[owner];\\n account.fixedDeposits = account.fixedDeposits.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedDepositPositions[maturity][owner] = position;\\n }\\n\\n emit WithdrawAtMaturity(maturity, msg.sender, receiver, owner, positionAssets, assetsDiscounted);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransfer(receiver, assetsDiscounted);\\n }\\n\\n /// @notice Repays a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be repaid.\\n /// @param positionAssets amount to be paid for the borrower's debt.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepayAssets the actual amount that was transferred into the protocol.\\n function repayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepayAssets) {\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n actualRepayAssets = noTransferRepayAtMaturity(maturity, positionAssets, maxAssets, borrower, true);\\n emitMarketUpdate();\\n\\n asset.safeTransferFrom(msg.sender, address(this), actualRepayAssets);\\n }\\n\\n /// @notice Allows to (partially) repay a fixed rate position. It does not transfer assets.\\n /// @param maturity the maturity to access the pool.\\n /// @param positionAssets the amount of debt of the pool that should be paid.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower the address of the account that has the debt.\\n /// @param canDiscount should early repay discounts be applied.\\n /// @return actualRepayAssets the actual amount that should be transferred into the protocol.\\n function noTransferRepayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower,\\n bool canDiscount\\n ) internal returns (uint256 actualRepayAssets) {\\n if (positionAssets == 0) revert ZeroRepay();\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n floatingAssets += backupEarnings;\\n\\n FixedLib.Position memory position = fixedBorrowPositions[maturity][borrower];\\n\\n uint256 debtCovered = Math.min(positionAssets, position.principal + position.fee);\\n\\n uint256 principalCovered = FixedLib\\n .Position(position.principal, position.fee)\\n .scaleProportionally(debtCovered)\\n .principal;\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n // early repayment allows a discount from the unassigned earnings\\n if (block.timestamp < maturity) {\\n if (canDiscount) {\\n // calculate the deposit fee considering the amount of debt the account'll pay\\n (uint256 discountFee, uint256 backupFee) = pool.calculateDeposit(principalCovered, backupFeeRate);\\n\\n // remove the fee from unassigned earnings\\n pool.unassignedEarnings -= discountFee + backupFee;\\n\\n // the fee charged to the fixed pool supplier goes to the earnings accumulator\\n earningsAccumulator += backupFee;\\n\\n // the fee gets discounted from the account through `actualRepayAssets`\\n actualRepayAssets = debtCovered - discountFee;\\n } else {\\n actualRepayAssets = debtCovered;\\n }\\n } else {\\n actualRepayAssets = debtCovered + debtCovered.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n\\n // all penalties go to the earnings accumulator\\n earningsAccumulator += actualRepayAssets - debtCovered;\\n }\\n\\n // verify that the account agrees to this discount or penalty\\n if (actualRepayAssets > maxAssets) revert Disagreement();\\n\\n // reduce the borrowed from the pool and might decrease the floating backup borrowed\\n floatingBackupBorrowed -= pool.repay(principalCovered);\\n\\n // update the account position\\n position.reduceProportionally(debtCovered);\\n if (position.principal | position.fee == 0) {\\n delete fixedBorrowPositions[maturity][borrower];\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedBorrowPositions[maturity][borrower] = position;\\n }\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, actualRepayAssets, debtCovered);\\n emitFixedEarningsUpdate(maturity);\\n }\\n\\n /// @notice Liquidates undercollateralized fixed/floating (or both) position(s).\\n /// @dev Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool,\\n /// or/and for multiple fixed pools, seizing a portion of borrower's collateral.\\n /// @param borrower account that has an outstanding debt across floating or fixed pools.\\n /// @param maxAssets maximum amount of debt that the liquidator is willing to accept. (it can be less)\\n /// @param seizeMarket market from which the collateral will be seized to give to the liquidator.\\n /// @return repaidAssets actual amount repaid.\\n function liquidate(\\n address borrower,\\n uint256 maxAssets,\\n Market seizeMarket\\n ) external whenNotPaused returns (uint256 repaidAssets) {\\n if (msg.sender == borrower) revert SelfLiquidation();\\n\\n maxAssets = auditor.checkLiquidation(this, seizeMarket, borrower, maxAssets);\\n if (maxAssets == 0) revert ZeroRepay();\\n\\n Account storage account = accounts[borrower];\\n\\n {\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0 && maxAssets != 0) {\\n if (packedMaturities & 1 != 0) {\\n uint256 actualRepay;\\n if (block.timestamp < maturity) {\\n actualRepay = noTransferRepayAtMaturity(maturity, maxAssets, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n } else {\\n uint256 position;\\n {\\n FixedLib.Position storage p = fixedBorrowPositions[maturity][borrower];\\n position = p.principal + p.fee;\\n }\\n uint256 debt = position + position.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n actualRepay = debt > maxAssets ? maxAssets.mulDivDown(position, debt) : maxAssets;\\n\\n if (actualRepay == 0) maxAssets = 0;\\n else {\\n actualRepay = noTransferRepayAtMaturity(maturity, actualRepay, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n }\\n }\\n repaidAssets += actualRepay;\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n\\n if (maxAssets != 0 && account.floatingBorrowShares != 0) {\\n uint256 borrowShares = previewRepay(maxAssets);\\n if (borrowShares != 0) {\\n (uint256 actualRepayAssets, ) = noTransferRefund(borrowShares, borrower);\\n repaidAssets += actualRepayAssets;\\n }\\n }\\n\\n // reverts on failure\\n (uint256 lendersAssets, uint256 seizeAssets) = auditor.calculateSeize(this, seizeMarket, borrower, repaidAssets);\\n earningsAccumulator += lendersAssets;\\n\\n if (address(seizeMarket) == address(this)) {\\n internalSeize(this, msg.sender, borrower, seizeAssets);\\n } else {\\n seizeMarket.seize(msg.sender, borrower, seizeAssets);\\n\\n emitMarketUpdate();\\n }\\n\\n emit Liquidate(msg.sender, borrower, repaidAssets, lendersAssets, seizeMarket, seizeAssets);\\n\\n auditor.handleBadDebt(borrower);\\n\\n asset.safeTransferFrom(msg.sender, address(this), repaidAssets + lendersAssets);\\n }\\n\\n /// @notice Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\\n /// @dev Can only be called from the auditor.\\n /// @param borrower account with insufficient collateral to be cleared the debt.\\n function clearBadDebt(address borrower) external {\\n if (msg.sender != address(auditor)) revert NotAuditor();\\n\\n floatingAssets += accrueAccumulatedEarnings();\\n Account storage account = accounts[borrower];\\n uint256 accumulator = earningsAccumulator;\\n uint256 totalBadDebt = 0;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 badDebt = position.principal + position.fee;\\n if (accumulator >= badDebt) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n accumulator -= badDebt;\\n totalBadDebt += badDebt;\\n floatingBackupBorrowed -= fixedPools[maturity].repay(position.principal);\\n delete fixedBorrowPositions[maturity][borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, badDebt, badDebt);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n if (account.floatingBorrowShares != 0 && (accumulator = previewRepay(accumulator)) != 0) {\\n (uint256 badDebt, ) = noTransferRefund(accumulator, borrower);\\n totalBadDebt += badDebt;\\n }\\n if (totalBadDebt != 0) {\\n earningsAccumulator -= totalBadDebt;\\n emit SpreadBadDebt(borrower, totalBadDebt);\\n }\\n emitMarketUpdate();\\n }\\n\\n /// @notice Public function to seize a certain amount of assets.\\n /// @dev Public function for liquidator to seize borrowers assets in the floating pool.\\n /// This function will only be called from another Market, on `liquidation` calls.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function seize(address liquidator, address borrower, uint256 assets) external whenNotPaused {\\n internalSeize(Market(msg.sender), liquidator, borrower, assets);\\n }\\n\\n /// @notice Internal function to seize a certain amount of assets.\\n /// @dev Internal function for liquidator to seize borrowers assets in the floating pool.\\n /// Will only be called from this Market on `liquidation` or through `seize` calls from another Market.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param seizeMarket address which is calling the seize function (see `seize` public function).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function internalSeize(Market seizeMarket, address liquidator, address borrower, uint256 assets) internal {\\n if (assets == 0) revert ZeroWithdraw();\\n\\n // reverts on failure\\n auditor.checkSeize(seizeMarket, this);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(borrower);\\n uint256 shares = previewWithdraw(assets);\\n beforeWithdraw(assets, shares);\\n _burn(borrower, shares);\\n emit Withdraw(msg.sender, liquidator, borrower, assets, shares);\\n emit Seize(liquidator, borrower, assets);\\n emitMarketUpdate();\\n\\n asset.safeTransfer(liquidator, assets);\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be withdrawn from the floating pool.\\n function beforeWithdraw(uint256 assets, uint256) internal override whenNotPaused {\\n updateFloatingAssetsAverage();\\n depositToTreasury(updateFloatingDebt());\\n uint256 earnings = accrueAccumulatedEarnings();\\n uint256 newFloatingAssets = floatingAssets + earnings - assets;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed\\n if (floatingBackupBorrowed + floatingDebt > newFloatingAssets) revert InsufficientProtocolLiquidity();\\n floatingAssets = newFloatingAssets;\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be deposited to the floating pool.\\n function afterDeposit(uint256 assets, uint256) internal override whenNotPaused whenNotFrozen {\\n updateFloatingAssetsAverage();\\n uint256 treasuryFee = updateFloatingDebt();\\n uint256 earnings = accrueAccumulatedEarnings();\\n floatingAssets += earnings + assets;\\n depositToTreasury(treasuryFee);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Withdraws the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param assets amount of underlying to be withdrawn.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return shares amount of shares redeemed for underlying asset.\\n function withdraw(uint256 assets, address receiver, address owner) public override returns (uint256 shares) {\\n auditor.checkShortfall(this, owner, assets);\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n shares = super.withdraw(assets, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Redeems the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param shares amount of shares to be redeemed for underlying asset.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return assets amount of underlying asset that was withdrawn.\\n function redeem(uint256 shares, address receiver, address owner) public override returns (uint256 assets) {\\n auditor.checkShortfall(this, owner, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n assets = super.redeem(shares, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n function _mint(address to, uint256 amount) internal override {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(to);\\n super._mint(to, amount);\\n }\\n\\n /// @notice Moves amount of shares from the caller's account to `to`.\\n /// @dev Makes sure that the caller doesn't have shortfall after transferring.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transfer(address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, msg.sender, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(msg.sender);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transfer(to, shares);\\n }\\n\\n /// @notice Moves amount of shares from `from` to `to` using the allowance mechanism.\\n /// @dev Makes sure that `from` address doesn't have shortfall after transferring.\\n /// @param from address from which the assets will be transferred.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transferFrom(address from, address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, from, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(from);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transferFrom(from, to, shares);\\n }\\n\\n /// @notice Gets current snapshot for an account across all maturities.\\n /// @param account account to return status snapshot in the specified maturity date.\\n /// @return the amount deposited to the floating pool and the amount owed to floating and fixed pools.\\n function accountSnapshot(address account) external view returns (uint256, uint256) {\\n return (convertToAssets(balanceOf[account]), previewDebt(account));\\n }\\n\\n /// @notice Gets all borrows and penalties for an account.\\n /// @param borrower account to return status snapshot for fixed and floating borrows.\\n /// @return debt the total debt, denominated in number of assets.\\n function previewDebt(address borrower) public view returns (uint256 debt) {\\n Account storage account = accounts[borrower];\\n uint256 memPenaltyRate = penaltyRate;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n // calculate all maturities using the base maturity and the following bits representing the following intervals\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 positionAssets = position.principal + position.fee;\\n\\n debt += positionAssets;\\n\\n if (block.timestamp > maturity) {\\n debt += positionAssets.mulWadDown((block.timestamp - maturity) * memPenaltyRate);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n // calculate floating borrowed debt\\n uint256 shares = account.floatingBorrowShares;\\n if (shares != 0) debt += previewRefund(shares);\\n }\\n\\n /// @notice Charges treasury fee to certain amount of earnings.\\n /// @param earnings amount of earnings.\\n /// @return earnings minus the fees charged by the treasury.\\n function chargeTreasuryFee(uint256 earnings) internal returns (uint256) {\\n uint256 fee = earnings.mulWadDown(treasuryFeeRate);\\n depositToTreasury(fee);\\n return earnings - fee;\\n }\\n\\n /// @notice Collects all earnings that are charged to borrowers that make use of fixed pool deposits' assets.\\n /// @param earnings amount of earnings.\\n function collectFreeLunch(uint256 earnings) internal {\\n if (earnings == 0) return;\\n\\n if (treasuryFeeRate != 0) {\\n depositToTreasury(earnings);\\n } else {\\n earningsAccumulator += earnings;\\n }\\n }\\n\\n /// @notice Deposits amount of assets on behalf of the treasury address.\\n /// @param fee amount of assets to be deposited.\\n function depositToTreasury(uint256 fee) internal {\\n if (fee != 0) {\\n _mint(treasury, previewDeposit(fee));\\n floatingAssets += fee;\\n }\\n }\\n\\n /// @notice Calculates the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings to be distributed from the accumulator.\\n function accumulatedEarnings() internal view returns (uint256 earnings) {\\n uint256 elapsed = block.timestamp - lastAccumulatorAccrual;\\n if (elapsed == 0) return 0;\\n return\\n earningsAccumulator.mulDivDown(\\n elapsed,\\n elapsed + earningsAccumulatorSmoothFactor.mulWadDown(maxFuturePools * FixedLib.INTERVAL)\\n );\\n }\\n\\n /// @notice Accrues the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings distributed from the accumulator.\\n function accrueAccumulatedEarnings() internal returns (uint256 earnings) {\\n earnings = accumulatedEarnings();\\n\\n earningsAccumulator -= earnings;\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n emit AccumulatorAccrual(block.timestamp);\\n }\\n\\n /// @notice Updates the `floatingAssetsAverage`.\\n function updateFloatingAssetsAverage() internal {\\n floatingAssetsAverage = previewFloatingAssetsAverage();\\n lastAverageUpdate = uint32(block.timestamp);\\n }\\n\\n /// @notice Returns the current `floatingAssetsAverage` without updating the storage variable.\\n /// @return projected `floatingAssetsAverage`.\\n function previewFloatingAssetsAverage() public view returns (uint256) {\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 memFloatingAssetsAverage = floatingAssetsAverage;\\n uint256 dampSpeedFactor = memFloatingAssets < memFloatingAssetsAverage ? dampSpeedDown : dampSpeedUp;\\n uint256 averageFactor = uint256(1e18 - (-int256(dampSpeedFactor * (block.timestamp - lastAverageUpdate))).expWad());\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n /// @notice Updates the floating pool borrows' variables.\\n /// @return treasuryFee amount of fees charged by the treasury to the new calculated floating debt.\\n function updateFloatingDebt() internal returns (uint256 treasuryFee) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 utilization = floatingUtilization(memFloatingAssets, memFloatingDebt);\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(utilization, globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed))\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n\\n memFloatingDebt += newDebt;\\n treasuryFee = newDebt.mulWadDown(treasuryFeeRate);\\n floatingAssets = memFloatingAssets + newDebt - treasuryFee;\\n floatingDebt = memFloatingDebt;\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n emit FloatingDebtUpdate(block.timestamp, utilization);\\n }\\n\\n /// @notice Calculates the total floating debt, considering elapsed time since last update and current interest rate.\\n /// @return actual floating debt plus projected interest.\\n function totalFloatingBorrowAssets() public view returns (uint256) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(\\n floatingUtilization(memFloatingAssets, memFloatingDebt),\\n globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed)\\n )\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n return memFloatingDebt + newDebt;\\n }\\n\\n /// @notice Calculates the floating pool balance plus earnings to be accrued at current timestamp\\n /// from maturities and accumulator.\\n /// @return actual floatingAssets plus earnings to be accrued at current timestamp.\\n function totalAssets() public view override returns (uint256) {\\n unchecked {\\n uint256 backupEarnings = 0;\\n\\n uint256 latestMaturity = block.timestamp - (block.timestamp % FixedLib.INTERVAL);\\n uint256 maxMaturity = latestMaturity + maxFuturePools * FixedLib.INTERVAL;\\n\\n for (uint256 maturity = latestMaturity; maturity <= maxMaturity; maturity += FixedLib.INTERVAL) {\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (maturity > lastAccrual) {\\n backupEarnings += block.timestamp < maturity\\n ? pool.unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual)\\n : pool.unassignedEarnings;\\n }\\n }\\n\\n return\\n floatingAssets +\\n backupEarnings +\\n accumulatedEarnings() +\\n (totalFloatingBorrowAssets() - floatingDebt).mulWadDown(1e18 - treasuryFeeRate);\\n }\\n }\\n\\n /// @notice Simulates the effects of a borrow at the current time, given current contract conditions.\\n /// @param assets amount of assets to borrow.\\n /// @return amount of shares that will be asigned to the account after the borrow.\\n function previewBorrow(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a repay at the current time, given current contract conditions.\\n /// @param assets amount of assets to repay.\\n /// @return amount of shares that will be subtracted from the account after the repay.\\n function previewRepay(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a refund at the current time, given current contract conditions.\\n /// @param shares amount of shares to subtract from caller's accountability.\\n /// @return amount of assets that will be repaid.\\n function previewRefund(uint256 shares) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalFloatingBorrowAssets(), supply);\\n }\\n\\n /// @notice Checks msg.sender's allowance over account's assets.\\n /// @param account account in which the allowance will be checked.\\n /// @param assets assets from account that msg.sender wants to operate on.\\n function spendAllowance(address account, uint256 assets) internal {\\n if (msg.sender != account) {\\n uint256 allowed = allowance[account][msg.sender]; // saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[account][msg.sender] = allowed - previewWithdraw(assets);\\n }\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed amount of the fixed pool.\\n function fixedPoolBorrowed(uint256 maturity) external view returns (uint256) {\\n return fixedPools[maturity].borrowed;\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed and supplied amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed and supplied amount of the fixed pool.\\n function fixedPoolBalance(uint256 maturity) external view returns (uint256, uint256) {\\n return (fixedPools[maturity].borrowed, fixedPools[maturity].supplied);\\n }\\n\\n /// @notice Retrieves fixed utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function fixedUtilization(uint256 supplied, uint256 borrowed, uint256 assets) internal pure returns (uint256) {\\n return assets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves global utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function globalUtilization(uint256 assets, uint256 debt, uint256 backupBorrowed) internal pure returns (uint256) {\\n return assets != 0 ? (debt + backupBorrowed).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves floating utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function floatingUtilization(uint256 assets, uint256 debt) internal pure returns (uint256) {\\n return assets != 0 ? debt.divWadUp(assets) : 0;\\n }\\n\\n /// @notice Emits MarketUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitMarketUpdate() internal {\\n emit MarketUpdate(\\n block.timestamp,\\n totalSupply,\\n floatingAssets,\\n totalFloatingBorrowShares,\\n floatingDebt,\\n earningsAccumulator\\n );\\n }\\n\\n /// @notice Emits FixedEarningsUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitFixedEarningsUpdate(uint256 maturity) internal {\\n emit FixedEarningsUpdate(block.timestamp, maturity, fixedPools[maturity].unassignedEarnings);\\n }\\n\\n /// @notice Sets name and symbol for the Market.\\n /// @param assetSymbol the symbol for the underlying asset.\\n function setAssetSymbol(string calldata assetSymbol) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n name = string.concat(\\\"exactly \\\", assetSymbol);\\n symbol = string.concat(\\\"exa\\\", assetSymbol);\\n }\\n\\n /// @notice Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially\\n /// providing liquidity.\\n /// @param backupFeeRate_ percentage amount represented with 18 decimals.\\n function setBackupFeeRate(uint256 backupFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n backupFeeRate = backupFeeRate_;\\n emit BackupFeeRateSet(backupFeeRate_);\\n }\\n\\n /// @notice Sets the damp speed used to update the floatingAssetsAverage.\\n /// @param up damp speed up, represented with 18 decimals.\\n /// @param down damp speed down, represented with 18 decimals.\\n function setDampSpeed(uint256 up, uint256 down) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n updateFloatingAssetsAverage();\\n dampSpeedUp = up;\\n dampSpeedDown = down;\\n emit DampSpeedSet(up, down);\\n }\\n\\n /// @notice Sets the factor used when smoothly accruing earnings to the floating pool.\\n /// @param earningsAccumulatorSmoothFactor_ represented with 18 decimals.\\n function setEarningsAccumulatorSmoothFactor(\\n uint128 earningsAccumulatorSmoothFactor_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n floatingAssets += accrueAccumulatedEarnings();\\n emitMarketUpdate();\\n earningsAccumulatorSmoothFactor = earningsAccumulatorSmoothFactor_;\\n emit EarningsAccumulatorSmoothFactorSet(earningsAccumulatorSmoothFactor_);\\n }\\n\\n /// @notice Sets the interest rate model to be used to calculate rates.\\n /// @param interestRateModel_ new interest rate model.\\n function setInterestRateModel(InterestRateModel interestRateModel_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(interestRateModel) != address(0)) depositToTreasury(updateFloatingDebt());\\n\\n interestRateModel = interestRateModel_;\\n emitMarketUpdate();\\n emit InterestRateModelSet(interestRateModel_);\\n }\\n\\n /// @notice Sets the rewards controller to update account rewards when operating with the Market.\\n /// @param rewardsController_ new rewards controller.\\n function setRewardsController(RewardsController rewardsController_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n rewardsController = rewardsController_;\\n emit RewardsControllerSet(rewardsController_);\\n }\\n\\n /// @notice Sets the protocol's max future pools for fixed borrowing and lending.\\n /// @dev If value is decreased, VALID maturities will become NOT_READY.\\n /// @param futurePools number of pools to be active at the same time.\\n function setMaxFuturePools(uint8 futurePools) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n maxFuturePools = futurePools;\\n emit MaxFuturePoolsSet(futurePools);\\n }\\n\\n /// @notice Sets the penalty rate per second.\\n /// @param penaltyRate_ percentage represented with 18 decimals.\\n function setPenaltyRate(uint256 penaltyRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n penaltyRate = penaltyRate_;\\n emit PenaltyRateSet(penaltyRate_);\\n }\\n\\n /// @notice Sets the percentage that represents the liquidity reserves that can't be borrowed.\\n /// @param reserveFactor_ parameter represented with 18 decimals.\\n function setReserveFactor(uint128 reserveFactor_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n reserveFactor = reserveFactor_;\\n emit ReserveFactorSet(reserveFactor_);\\n }\\n\\n /// @notice Sets the treasury variables.\\n /// @param treasury_ address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate_ represented with 18 decimals.\\n function setTreasury(address treasury_, uint256 treasuryFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n depositToTreasury(updateFloatingDebt());\\n treasury = treasury_;\\n treasuryFeeRate = treasuryFeeRate_;\\n emit TreasurySet(treasury_, treasuryFeeRate_);\\n }\\n\\n /// @notice Sets the pause state to true in case of emergency, triggered by an authorized account.\\n function pause() external onlyPausingRoles {\\n _pause();\\n }\\n\\n /// @notice Sets the pause state to false when threat is gone, triggered by an authorized account.\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @notice Sets `isFrozen` state, triggered by an authorized account.\\n function setFrozen(bool isFrozen_) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (isFrozen == isFrozen_) return;\\n isFrozen = isFrozen_;\\n emit Frozen(msg.sender, isFrozen_);\\n }\\n\\n /// @dev Throws if the market is frozen.\\n function requireNotFrozen() internal view {\\n if (isFrozen) revert MarketFrozen();\\n }\\n\\n /// @dev Modifier to make a function callable only when the market is not frozen.\\n modifier whenNotFrozen() {\\n requireNotFrozen();\\n _;\\n }\\n\\n /// @dev Throws if the caller is not an `EMERGENCY_ADMIN_ROLE` or `PAUSER_ROLE`.\\n function requirePausingRoles() internal view {\\n if (!hasRole(EMERGENCY_ADMIN_ROLE, msg.sender) && !hasRole(PAUSER_ROLE, msg.sender)) {\\n revert NotPausingRole();\\n }\\n }\\n\\n /// @dev Modifier to make a function callable only by pausing roles.\\n modifier onlyPausingRoles() {\\n requirePausingRoles();\\n _;\\n }\\n\\n /// @notice Event emitted when an account borrows amount of assets from a floating pool.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of assets that were borrowed.\\n /// @param shares amount of borrow shares assigned to the account.\\n event Borrow(\\n address indexed caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /// @notice Emitted when an account repays amount of assets to a floating pool.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of assets that was repaid.\\n /// @param shares amount of borrow shares that were subtracted from the account's accountability.\\n event Repay(address indexed caller, address indexed borrower, uint256 assets, uint256 shares);\\n\\n /// @notice Emitted when an account deposits an amount of an asset to a certain fixed rate pool,\\n /// collecting fees at the end of the period.\\n /// @param maturity maturity at which the account will be able to collect his deposit + his fee.\\n /// @param caller address which deposited the assets.\\n /// @param owner address that will be able to withdraw the deposited assets.\\n /// @param assets amount of the asset that were deposited.\\n /// @param fee is the extra amount that it will be collected at maturity.\\n event DepositAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed owner,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account withdraws from a fixed rate pool.\\n /// @param maturity maturity where the account withdraw its deposits.\\n /// @param caller address which withdraw the asset.\\n /// @param receiver address which will be collecting the assets.\\n /// @param owner address which had the assets withdrawn.\\n /// @param positionAssets position size reduced.\\n /// @param assets amount of assets withdrawn (can include a discount for early withdraw).\\n event WithdrawAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 positionAssets,\\n uint256 assets\\n );\\n\\n /// @notice Emitted when an account borrows amount of an asset from a certain maturity date.\\n /// @param maturity maturity in which the account will have to repay the loan.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of the asset that were borrowed.\\n /// @param fee extra amount that will need to be paid at maturity.\\n event BorrowAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account repays its borrows after maturity.\\n /// @param maturity maturity where the account repaid its borrowed amounts.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount that was repaid.\\n /// @param positionAssets amount of the debt that was covered in this repayment (penalties could have been repaid).\\n event RepayAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed borrower,\\n uint256 assets,\\n uint256 positionAssets\\n );\\n\\n /// @notice Emitted when an account's position had a liquidation.\\n /// @param receiver address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of the asset that were repaid.\\n /// @param lendersAssets incentive paid to lenders.\\n /// @param seizeMarket address of the asset that were seized by the liquidator.\\n /// @param seizedAssets amount seized of the collateral.\\n event Liquidate(\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 lendersAssets,\\n Market indexed seizeMarket,\\n uint256 seizedAssets\\n );\\n\\n /// @notice Emitted when an account's collateral has been seized.\\n /// @param liquidator address which seized this collateral.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount seized of the collateral.\\n event Seize(address indexed liquidator, address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when an account is cleared from bad debt.\\n /// @param borrower address which was cleared from bad debt.\\n /// @param assets amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\\n event SpreadBadDebt(address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when the backupFeeRate parameter is changed by admin.\\n /// @param backupFeeRate rate charged to the fixed pools to be accrued by the floating depositors.\\n event BackupFeeRateSet(uint256 backupFeeRate);\\n\\n /// @notice Emitted when the damp speeds are changed by admin.\\n /// @param dampSpeedUp represented with 18 decimals.\\n /// @param dampSpeedDown represented with 18 decimals.\\n event DampSpeedSet(uint256 dampSpeedUp, uint256 dampSpeedDown);\\n\\n /// @notice Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\\n /// @param earningsAccumulatorSmoothFactor factor represented with 18 decimals.\\n event EarningsAccumulatorSmoothFactorSet(uint256 earningsAccumulatorSmoothFactor);\\n\\n /// @notice Emitted when the interestRateModel is changed by admin.\\n /// @param interestRateModel new interest rate model to be used to calculate rates.\\n event InterestRateModelSet(InterestRateModel indexed interestRateModel);\\n\\n /// @notice Emitted when the maxFuturePools is changed by admin.\\n /// @param maxFuturePools represented with 0 decimals.\\n event MaxFuturePoolsSet(uint256 maxFuturePools);\\n\\n /// @notice Emitted when the penaltyRate is changed by admin.\\n /// @param penaltyRate penaltyRate percentage per second represented with 18 decimals.\\n event PenaltyRateSet(uint256 penaltyRate);\\n\\n /// @notice Emitted when the reserveFactor is changed by admin.\\n /// @param reserveFactor reserveFactor percentage.\\n event ReserveFactorSet(uint256 reserveFactor);\\n\\n /// @notice Emitted when the treasury variables are changed by admin.\\n /// @param treasury address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate represented with 18 decimals.\\n event TreasurySet(address indexed treasury, uint256 treasuryFeeRate);\\n\\n /// @notice Emitted when the rewardsController is changed by admin.\\n /// @param rewardsController new rewards controller to update account rewards when operating with the Market.\\n event RewardsControllerSet(RewardsController indexed rewardsController);\\n\\n /// @notice Emitted when market state is updated.\\n /// @param timestamp current timestamp.\\n /// @param floatingDepositShares total floating supply shares.\\n /// @param floatingAssets total floating supply assets.\\n /// @param floatingBorrowShares total floating borrow shares.\\n /// @param floatingDebt total floating borrow assets.\\n /// @param earningsAccumulator earnings accumulator.\\n event MarketUpdate(\\n uint256 timestamp,\\n uint256 floatingDepositShares,\\n uint256 floatingAssets,\\n uint256 floatingBorrowShares,\\n uint256 floatingDebt,\\n uint256 earningsAccumulator\\n );\\n\\n /// @notice Emitted when the earnings of a maturity are updated.\\n /// @param timestamp current timestamp.\\n /// @param maturity maturity date where the earnings were updated.\\n /// @param unassignedEarnings pending unassigned earnings.\\n event FixedEarningsUpdate(uint256 timestamp, uint256 indexed maturity, uint256 unassignedEarnings);\\n\\n /// @notice Emitted when accumulator distributes earnings.\\n /// @param timestamp current timestamp.\\n event AccumulatorAccrual(uint256 timestamp);\\n\\n /// @notice Emitted when the floating debt is updated.\\n /// @param timestamp current timestamp.\\n /// @param utilization new floating utilization.\\n event FloatingDebtUpdate(uint256 timestamp, uint256 utilization);\\n\\n /// @notice Emitted when `account` sets the `isFrozen` flag.\\n event Frozen(address indexed account, bool isFrozen);\\n\\n /// @notice Stores fixed deposits and fixed borrows map and floating borrow shares of an account.\\n /// @param fixedDeposits encoded map maturity dates where the account supplied to.\\n /// @param fixedBorrows encoded map maturity dates where the account borrowed from.\\n /// @param floatingBorrowShares number of floating borrow shares assigned to the account.\\n struct Account {\\n uint256 fixedDeposits;\\n uint256 fixedBorrows;\\n uint256 floatingBorrowShares;\\n }\\n}\\n\\nerror Disagreement();\\nerror InsufficientProtocolLiquidity();\\nerror MarketFrozen();\\nerror NotAuditor();\\nerror NotPausingRole();\\nerror SelfLiquidation();\\nerror ZeroBorrow();\\nerror ZeroDeposit();\\nerror ZeroRepay();\\nerror ZeroWithdraw();\\n\",\"keccak256\":\"0xdf09a69098df74396067954be63e073deb5d0b9222cae1a1a3b9c2bf69678429\",\"license\":\"BUSL-1.1\"},\"contracts/RewardsController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { SafeTransferLib } from \\\"solmate/src/utils/SafeTransferLib.sol\\\";\\nimport { ERC20 } from \\\"solmate/src/tokens/ERC20.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract RewardsController is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint64;\\n using FixedPointMathLib for int256;\\n using SafeTransferLib for ERC20;\\n\\n /// @notice Max utilization supported by the sigmoid function not to cause a division by zero (1e18 = WAD).\\n uint256 public constant UTILIZATION_CAP = 1e18 - 1;\\n /// @notice Tracks the reward distribution data for a given market.\\n mapping(Market => Distribution) public distribution;\\n /// @notice Tracks enabled asset rewards.\\n mapping(ERC20 => bool) public rewardEnabled;\\n /// @notice Stores registered asset rewards.\\n ERC20[] public rewardList;\\n /// @notice Stores Markets with distributions set.\\n Market[] public marketList;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev Can only be called once.\\n function initialize() external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded deposit.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleDeposit(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n ops[0] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n update(account, market, dist.availableRewards[r], ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded borrow.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleBorrow(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n (, , uint256 accountFloatingBorrowShares) = market.accounts(account);\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n ERC20 reward = dist.availableRewards[r];\\n ops[0] = AccountOperation({\\n operation: true,\\n balance: accountFloatingBorrowShares + accountFixedBorrowShares(market, account, dist.rewards[reward].start)\\n });\\n update(account, Market(msg.sender), reward, ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Claims all `msg.sender` rewards to the given account.\\n /// @param to The address to send the rewards to.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claimAll(address to) external returns (ERC20[] memory rewardsList, uint256[] memory claimedAmounts) {\\n return claim(allMarketsOperations(), to, rewardList);\\n }\\n\\n /// @notice Claims `msg.sender` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param to The address to send the rewards to.\\n /// @param rewardsList The list of rewards assets to claim.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n address to,\\n ERC20[] memory rewardsList\\n ) public claimSender returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n uint256 rewardsCount = rewardsList.length;\\n claimedAmounts = new uint256[](rewardsCount);\\n address sender = _claimSender;\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n uint256 availableRewards = dist.availableRewardsCount;\\n for (uint128 r = 0; r < availableRewards; ) {\\n update(\\n sender,\\n marketOperation.market,\\n dist.availableRewards[r],\\n accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n sender,\\n dist.rewards[dist.availableRewards[r]].start\\n )\\n );\\n unchecked {\\n ++r;\\n }\\n }\\n for (uint256 r = 0; r < rewardsCount; ) {\\n RewardData storage rewardData = dist.rewards[rewardsList[r]];\\n for (uint256 o = 0; o < marketOperation.operations.length; ) {\\n uint256 rewardAmount = rewardData.accounts[sender][marketOperation.operations[o]].accrued;\\n if (rewardAmount != 0) {\\n claimedAmounts[r] += rewardAmount;\\n rewardData.accounts[sender][marketOperation.operations[o]].accrued = 0;\\n }\\n unchecked {\\n ++o;\\n }\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 r = 0; r < rewardsList.length; ) {\\n uint256 claimedAmount = claimedAmounts[r];\\n if (claimedAmount > 0) {\\n rewardsList[r].safeTransfer(to, claimedAmount);\\n emit Claim(sender, rewardsList[r], to, claimedAmount);\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n return (rewardsList, claimedAmounts);\\n }\\n\\n /// @notice Claims `permit.owner` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param permit Arguments and signature from `permit.owner`.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n ClaimPermit calldata permit\\n ) external permitSender(permit) returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n return claim(marketOps, msg.sender, permit.assets);\\n }\\n\\n /// @notice Gets the configuration of a given distribution.\\n /// @param market The market to get the distribution configuration for.\\n /// @param reward The reward asset.\\n /// @return The distribution configuration.\\n function rewardConfig(Market market, ERC20 reward) external view returns (Config memory) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return\\n Config({\\n market: market,\\n reward: reward,\\n priceFeed: rewardData.priceFeed,\\n start: rewardData.start,\\n distributionPeriod: rewardData.end - rewardData.start,\\n targetDebt: rewardData.targetDebt,\\n totalDistribution: rewardData.totalDistribution,\\n undistributedFactor: rewardData.undistributedFactor,\\n flipSpeed: rewardData.flipSpeed,\\n compensationFactor: rewardData.compensationFactor,\\n transitionFactor: rewardData.transitionFactor,\\n borrowAllocationWeightFactor: rewardData.borrowAllocationWeightFactor,\\n depositAllocationWeightAddend: rewardData.depositAllocationWeightAddend,\\n depositAllocationWeightFactor: rewardData.depositAllocationWeightFactor\\n });\\n }\\n\\n /// @notice Gets the amount of reward assets that are being distributed for a Market.\\n /// @param market Market to get the number of available rewards to distribute.\\n /// @return The amount reward assets set to a Market.\\n function availableRewardsCount(Market market) external view returns (uint256) {\\n return distribution[market].availableRewardsCount;\\n }\\n\\n /// @notice Gets the account data of a given account, Market, operation and reward asset.\\n /// @param account The account to get the operation data from.\\n /// @param market The market in which the operation was made.\\n /// @param operation True if the operation was a borrow, false if it was a deposit.\\n /// @param reward The reward asset.\\n /// @return accrued The accrued amount.\\n /// @return index The account index.\\n function accountOperation(\\n address account,\\n Market market,\\n bool operation,\\n ERC20 reward\\n ) external view returns (uint256, uint256) {\\n Account storage operationAccount = distribution[market].rewards[reward].accounts[account][operation];\\n return (operationAccount.accrued, operationAccount.index);\\n }\\n\\n /// @notice Gets the distribution `start`, `end` and `lastUpdate` value of a given market and reward.\\n /// @param market The market to get the distribution times.\\n /// @param reward The reward asset.\\n /// @return The distribution `start`, `end` and `lastUpdate` time.\\n function distributionTime(Market market, ERC20 reward) external view returns (uint32, uint32, uint32) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.start, rewardData.end, rewardData.lastUpdate);\\n }\\n\\n /// @notice Retrieves all rewards addresses.\\n function allRewards() external view returns (ERC20[] memory) {\\n return rewardList;\\n }\\n\\n /// @notice Gets all market and operations.\\n /// @return marketOps The list of market operations.\\n function allMarketsOperations() public view returns (MarketOperation[] memory marketOps) {\\n Market[] memory markets = marketList;\\n marketOps = new MarketOperation[](markets.length);\\n for (uint256 m = 0; m < markets.length; ) {\\n bool[] memory ops = new bool[](2);\\n ops[0] = true;\\n ops[1] = false;\\n marketOps[m] = MarketOperation({ market: markets[m], operations: ops });\\n unchecked {\\n ++m;\\n }\\n }\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account and reward asset.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function allClaimable(address account, ERC20 reward) external view returns (uint256 unclaimedRewards) {\\n return claimable(allMarketsOperations(), account, reward);\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account, Market operations and reward asset.\\n /// @param marketOps The list of Market operations to get the accrued and pending rewards from.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function claimable(\\n MarketOperation[] memory marketOps,\\n address account,\\n ERC20 reward\\n ) public view returns (uint256 unclaimedRewards) {\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n RewardData storage rewardData = dist.rewards[reward];\\n if (dist.availableRewardsCount == 0) {\\n unchecked {\\n ++i;\\n }\\n continue;\\n }\\n\\n AccountOperation[] memory ops = accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n account,\\n rewardData.start\\n );\\n uint256 balance;\\n for (uint256 o = 0; o < ops.length; ) {\\n unclaimedRewards += rewardData.accounts[account][ops[o].operation].accrued;\\n balance += ops[o].balance;\\n unchecked {\\n ++o;\\n }\\n }\\n if (balance > 0) {\\n unclaimedRewards += pendingRewards(\\n account,\\n reward,\\n AccountMarketOperation({ market: marketOperation.market, accountOperations: ops })\\n );\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Iterates and accrues all rewards for the operations of the given account in the given market.\\n /// @param account The account to accrue the rewards for.\\n /// @param market The Market in which the operations where made.\\n /// @param reward The reward asset.\\n /// @param ops The operations to accrue the rewards for.\\n function update(address account, Market market, ERC20 reward, AccountOperation[] memory ops) internal {\\n uint256 baseUnit = distribution[market].baseUnit;\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n {\\n uint256 lastUpdate = rewardData.lastUpdate;\\n // `lastUpdate` can be greater than `block.timestamp` if distribution is set to start on a future date\\n if (block.timestamp > lastUpdate) {\\n (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) = previewAllocation(\\n rewardData,\\n market,\\n block.timestamp - lastUpdate\\n );\\n if (borrowIndex > type(uint128).max || depositIndex > type(uint128).max) revert IndexOverflow();\\n rewardData.borrowIndex = uint128(borrowIndex);\\n rewardData.depositIndex = uint128(depositIndex);\\n rewardData.lastUpdate = uint32(block.timestamp);\\n rewardData.lastUndistributed = newUndistributed;\\n emit IndexUpdate(market, reward, borrowIndex, depositIndex, newUndistributed, block.timestamp);\\n }\\n }\\n\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 i = 0; i < ops.length; ) {\\n AccountOperation memory op = ops[i];\\n Account storage accountData = operationAccount[op.operation];\\n uint256 accountIndex = accountData.index;\\n uint256 newAccountIndex;\\n if (op.operation) {\\n newAccountIndex = rewardData.borrowIndex;\\n } else {\\n newAccountIndex = rewardData.depositIndex;\\n }\\n if (accountIndex != newAccountIndex) {\\n accountData.index = uint128(newAccountIndex);\\n if (op.balance != 0) {\\n uint256 rewardsAccrued = accountRewards(op.balance, newAccountIndex, accountIndex, baseUnit);\\n accountData.accrued += uint128(rewardsAccrued);\\n emit Accrue(market, reward, account, op.operation, accountIndex, newAccountIndex, rewardsAccrued);\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the equivalent of borrow shares from fixed pool principal borrows of an account.\\n /// @param market The Market to get the fixed borrows from.\\n /// @param account The account that borrowed from fixed pools.\\n /// @return fixedDebt The fixed borrow shares.\\n function accountFixedBorrowShares(\\n Market market,\\n address account,\\n uint32 start\\n ) internal view returns (uint256 fixedDebt) {\\n uint256 firstMaturity = start - (start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 principal, ) = market.fixedBorrowPositions(maturity, account);\\n fixedDebt += principal;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n fixedDebt = market.previewRepay(fixedDebt);\\n }\\n\\n /// @notice Gets the reward indexes and last amount of undistributed rewards for a given market and reward asset.\\n /// @param market The market to get the reward indexes for.\\n /// @param reward The reward asset to get the reward indexes for.\\n /// @return borrowIndex The index for the floating and fixed borrow operation.\\n /// @return depositIndex The index for the floating deposit operation.\\n /// @return lastUndistributed The last amount of undistributed rewards.\\n function rewardIndexes(Market market, ERC20 reward) external view returns (uint256, uint256, uint256) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.borrowIndex, rewardData.depositIndex, rewardData.lastUndistributed);\\n }\\n\\n /// @notice Calculates the rewards not accrued yet for the given operations of a given account and reward asset.\\n /// @param account The account to get the pending rewards for.\\n /// @param reward The reward asset to get the pending rewards for.\\n /// @param ops The operations to get the pending rewards for.\\n /// @return rewards The pending rewards for the given operations.\\n function pendingRewards(\\n address account,\\n ERC20 reward,\\n AccountMarketOperation memory ops\\n ) internal view returns (uint256 rewards) {\\n RewardData storage rewardData = distribution[ops.market].rewards[reward];\\n uint256 baseUnit = distribution[ops.market].baseUnit;\\n uint256 lastUpdate = rewardData.lastUpdate;\\n (uint256 borrowIndex, uint256 depositIndex, ) = previewAllocation(\\n rewardData,\\n ops.market,\\n block.timestamp > lastUpdate ? block.timestamp - lastUpdate : 0\\n );\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 o = 0; o < ops.accountOperations.length; ) {\\n uint256 nextIndex;\\n if (ops.accountOperations[o].operation) {\\n nextIndex = borrowIndex;\\n } else {\\n nextIndex = depositIndex;\\n }\\n\\n rewards += accountRewards(\\n ops.accountOperations[o].balance,\\n nextIndex,\\n operationAccount[ops.accountOperations[o].operation].index,\\n baseUnit\\n );\\n unchecked {\\n ++o;\\n }\\n }\\n }\\n\\n /// @notice Calculates and returns the new amount of rewards given by the difference between the `accountIndex` and\\n /// the `globalIndex`.\\n /// @param balance The account's balance in the operation's pool.\\n /// @param globalIndex Current index of the distribution.\\n /// @param accountIndex Last index stored for the account.\\n /// @param baseUnit One unit of the Market's asset (10**decimals).\\n /// @return The amount of new rewards to be accrued by the account.\\n function accountRewards(\\n uint256 balance,\\n uint256 globalIndex,\\n uint256 accountIndex,\\n uint256 baseUnit\\n ) internal pure returns (uint256) {\\n return balance.mulDivDown(globalIndex - accountIndex, baseUnit);\\n }\\n\\n /// @notice Retrieves projected distribution indexes and new undistributed amount for a given `deltaTime`.\\n /// @param market The market to calculate the indexes for.\\n /// @param reward The reward asset to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n Market market,\\n ERC20 reward,\\n uint256 deltaTime\\n ) external view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n return previewAllocation(distribution[market].rewards[reward], market, deltaTime);\\n }\\n\\n /// @notice Calculates and returns the distribution indexes and new undistributed tokens for a given `rewardData`.\\n /// @param rewardData The distribution's data.\\n /// @param market The market to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n RewardData storage rewardData,\\n Market market,\\n uint256 deltaTime\\n ) internal view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n TotalMarketBalance memory m;\\n m.floatingDebt = market.floatingDebt();\\n m.floatingAssets = market.floatingAssets();\\n TimeVars memory t;\\n t.start = rewardData.start;\\n t.end = rewardData.end;\\n {\\n uint256 firstMaturity = t.start - (t.start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n uint256 fixedDebt;\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 borrowed, ) = market.fixedPoolBalance(maturity);\\n fixedDebt += borrowed;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n m.debt = m.floatingDebt + fixedDebt;\\n m.fixedBorrowShares = market.previewRepay(fixedDebt);\\n }\\n uint256 target;\\n {\\n uint256 targetDebt = rewardData.targetDebt;\\n target = m.debt < targetDebt ? m.debt.divWadDown(targetDebt) : 1e18;\\n }\\n uint256 rewards;\\n {\\n uint256 releaseRate = rewardData.releaseRate;\\n uint256 lastUndistributed = rewardData.lastUndistributed;\\n t.period = t.end - t.start;\\n uint256 distributionFactor = t.period > 0\\n ? rewardData.undistributedFactor.mulDivDown(target, t.period * 1e18)\\n : 0;\\n if (block.timestamp <= t.end) {\\n if (distributionFactor > 0) {\\n uint256 exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n } else if (rewardData.lastUpdate > t.end) {\\n newUndistributed =\\n lastUndistributed -\\n lastUndistributed.mulWadUp(1e18 - uint256((-int256(distributionFactor * deltaTime)).expWad()));\\n rewards = uint256(-(int256(newUndistributed) - int256(lastUndistributed)));\\n } else {\\n uint256 exponential;\\n deltaTime = t.end - rewardData.lastUpdate;\\n if (distributionFactor > 0) {\\n exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n exponential = uint256((-int256(distributionFactor * (block.timestamp - t.end))).expWad());\\n newUndistributed = newUndistributed - newUndistributed.mulWadUp(1e18 - exponential);\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n }\\n if (rewards == 0) return (rewardData.borrowIndex, rewardData.depositIndex, newUndistributed);\\n }\\n {\\n AllocationVars memory v;\\n v.globalUtilization = Math.min(\\n m.floatingAssets != 0\\n ? 1e18 - (m.floatingAssets - m.floatingDebt - market.floatingBackupBorrowed()).divWadDown(m.floatingAssets)\\n : 0,\\n UTILIZATION_CAP\\n );\\n v.transitionFactor = rewardData.transitionFactor;\\n v.flipSpeed = rewardData.flipSpeed;\\n v.borrowAllocationWeightFactor = rewardData.borrowAllocationWeightFactor;\\n v.sigmoid = v.globalUtilization > 0\\n ? uint256(1e18).divWadDown(\\n 1e18 +\\n uint256(\\n (-(v.flipSpeed *\\n (int256(v.globalUtilization.divWadDown(1e18 - v.globalUtilization)).lnWad() -\\n int256(v.transitionFactor.divWadDown(1e18 - v.transitionFactor)).lnWad())) / 1e18).expWad()\\n )\\n )\\n : 0;\\n v.borrowRewardRule = rewardData\\n .compensationFactor\\n .mulWadDown(\\n market\\n .interestRateModel()\\n .floatingRate(m.floatingAssets != 0 ? m.floatingDebt.divWadDown(m.floatingAssets) : 0, v.globalUtilization)\\n .mulWadDown(1e18 - v.globalUtilization.mulWadUp(1e18 - market.treasuryFeeRate())) +\\n v.borrowAllocationWeightFactor\\n )\\n .mulWadDown(1e18 - v.sigmoid);\\n v.depositRewardRule =\\n rewardData.depositAllocationWeightAddend.mulWadDown(1e18 - v.sigmoid) +\\n rewardData.depositAllocationWeightFactor.mulWadDown(v.sigmoid);\\n v.borrowAllocation = v.borrowRewardRule.divWadDown(v.borrowRewardRule + v.depositRewardRule);\\n v.depositAllocation = 1e18 - v.borrowAllocation;\\n {\\n uint256 totalDepositSupply = market.totalSupply();\\n uint256 totalBorrowSupply = market.totalFloatingBorrowShares() + m.fixedBorrowShares;\\n uint256 baseUnit = distribution[market].baseUnit;\\n borrowIndex =\\n rewardData.borrowIndex +\\n (totalBorrowSupply > 0 ? rewards.mulWadDown(v.borrowAllocation).mulDivDown(baseUnit, totalBorrowSupply) : 0);\\n depositIndex =\\n rewardData.depositIndex +\\n (\\n totalDepositSupply > 0\\n ? rewards.mulWadDown(v.depositAllocation).mulDivDown(baseUnit, totalDepositSupply)\\n : 0\\n );\\n }\\n }\\n }\\n\\n /// @notice Get account balances of the given Market operations.\\n /// @param market The address of the Market.\\n /// @param ops List of operations to retrieve account balance.\\n /// @param account Account to get the balance from.\\n /// @param distributionStart Timestamp of the start of the distribution to correctly get the rewarded fixed pools.\\n /// @return accountBalanceOps contains a list with account balance per each operation.\\n function accountBalanceOperations(\\n Market market,\\n bool[] memory ops,\\n address account,\\n uint32 distributionStart\\n ) internal view returns (AccountOperation[] memory accountBalanceOps) {\\n accountBalanceOps = new AccountOperation[](ops.length);\\n for (uint256 i = 0; i < ops.length; ) {\\n if (ops[i]) {\\n (, , uint256 floatingBorrowShares) = market.accounts(account);\\n accountBalanceOps[i] = AccountOperation({\\n operation: true,\\n balance: floatingBorrowShares + accountFixedBorrowShares(market, account, distributionStart)\\n });\\n } else {\\n accountBalanceOps[i] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Withdraws the contract's balance of the given asset to the given address.\\n /// @param asset The asset to withdraw.\\n /// @param to The address to withdraw the asset to.\\n function withdraw(ERC20 asset, address to) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n asset.safeTransfer(to, asset.balanceOf(address(this)));\\n }\\n\\n /// @notice Enables or updates the reward distribution for the given markets and rewards.\\n /// @param configs The configurations to update each RewardData with.\\n function config(Config[] memory configs) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n for (uint256 i = 0; i < configs.length; ) {\\n // transitionFactor cannot be eq or higher than 1e18 to avoid division by zero or underflow\\n if (configs[i].transitionFactor >= 1e18) revert InvalidConfig();\\n // depositAllocationWeightFactor cannot be zero to avoid division by zero when sigmoid equals 1e18\\n if (configs[i].depositAllocationWeightFactor == 0) revert InvalidConfig();\\n\\n Distribution storage dist = distribution[configs[i].market];\\n RewardData storage rewardData = dist.rewards[configs[i].reward];\\n\\n if (dist.baseUnit == 0) {\\n // never initialized before, adding to the list of markets\\n marketList.push(configs[i].market);\\n }\\n if (!rewardEnabled[configs[i].reward]) {\\n // add reward address to global rewards list if still not enabled\\n rewardEnabled[configs[i].reward] = true;\\n rewardList.push(configs[i].reward);\\n }\\n if (rewardData.lastUpdate == 0) {\\n // add reward address to distribution data's available rewards if distribution is new\\n dist.availableRewards[dist.availableRewardsCount++] = configs[i].reward;\\n dist.baseUnit = 10 ** configs[i].market.decimals();\\n // set initial parameters if distribution is new\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n } else {\\n uint32 start = rewardData.start;\\n uint32 end = rewardData.end;\\n // update global indexes before updating distribution values\\n bool[] memory ops = new bool[](1);\\n ops[0] = true;\\n update(\\n address(0),\\n configs[i].market,\\n configs[i].reward,\\n accountBalanceOperations(configs[i].market, ops, address(0), start)\\n );\\n // properly update release rate\\n if (block.timestamp < end) {\\n uint256 released = 0;\\n uint256 elapsed = 0;\\n if (block.timestamp > start) {\\n released =\\n rewardData.lastConfigReleased +\\n rewardData.releaseRate *\\n (block.timestamp - rewardData.lastConfig);\\n elapsed = block.timestamp - start;\\n if (configs[i].totalDistribution <= released || configs[i].distributionPeriod <= elapsed) {\\n revert InvalidConfig();\\n }\\n rewardData.lastConfigReleased = released;\\n }\\n\\n rewardData.releaseRate =\\n (configs[i].totalDistribution - released) /\\n (configs[i].distributionPeriod - elapsed);\\n } else if (rewardData.start != configs[i].start) {\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n rewardData.lastConfigReleased = 0;\\n }\\n }\\n rewardData.lastConfig = uint32(block.timestamp);\\n rewardData.end = rewardData.start + uint32(configs[i].distributionPeriod);\\n rewardData.priceFeed = configs[i].priceFeed;\\n // set emission and distribution parameters\\n rewardData.totalDistribution = configs[i].totalDistribution;\\n rewardData.targetDebt = configs[i].targetDebt;\\n rewardData.undistributedFactor = configs[i].undistributedFactor;\\n rewardData.flipSpeed = configs[i].flipSpeed;\\n rewardData.compensationFactor = configs[i].compensationFactor;\\n rewardData.borrowAllocationWeightFactor = configs[i].borrowAllocationWeightFactor;\\n rewardData.depositAllocationWeightAddend = configs[i].depositAllocationWeightAddend;\\n rewardData.transitionFactor = configs[i].transitionFactor;\\n rewardData.depositAllocationWeightFactor = configs[i].depositAllocationWeightFactor;\\n\\n emit DistributionSet(configs[i].market, configs[i].reward, configs[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n mapping(address => uint256) public nonces;\\n\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(\\\"RewardsController\\\"),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n address private _claimSender;\\n modifier claimSender() {\\n if (_claimSender == address(0)) _claimSender = msg.sender;\\n _;\\n delete _claimSender;\\n }\\n\\n modifier permitSender(ClaimPermit calldata permit) {\\n assert(_claimSender == address(0));\\n assert(permit.deadline >= block.timestamp);\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\\"ClaimPermit(address owner,address spender,address[] assets,uint256 deadline)\\\"),\\n permit.owner,\\n msg.sender,\\n permit.assets,\\n nonces[permit.owner]++,\\n permit.deadline\\n )\\n )\\n )\\n ),\\n permit.v,\\n permit.r,\\n permit.s\\n );\\n assert(recoveredAddress != address(0) && recoveredAddress == permit.owner);\\n _claimSender = permit.owner;\\n }\\n _;\\n assert(_claimSender == address(0));\\n }\\n\\n struct TotalMarketBalance {\\n uint256 debt;\\n uint256 fixedBorrowShares;\\n uint256 floatingDebt;\\n uint256 floatingAssets;\\n }\\n\\n struct TimeVars {\\n uint256 start;\\n uint256 end;\\n uint256 period;\\n }\\n\\n struct AllocationVars {\\n uint256 globalUtilization;\\n uint256 sigmoid;\\n uint256 borrowRewardRule;\\n uint256 depositRewardRule;\\n uint256 borrowAllocation;\\n uint256 depositAllocation;\\n uint256 transitionFactor;\\n int256 flipSpeed;\\n uint256 borrowAllocationWeightFactor;\\n }\\n\\n struct AccountOperation {\\n bool operation;\\n uint256 balance;\\n }\\n\\n struct MarketOperation {\\n Market market;\\n bool[] operations;\\n }\\n\\n struct AccountMarketOperation {\\n Market market;\\n AccountOperation[] accountOperations;\\n }\\n\\n struct Account {\\n // liquidity index of the reward distribution for the account\\n uint128 index;\\n // amount of accrued rewards for the account since last account index update\\n uint128 accrued;\\n }\\n\\n struct Config {\\n Market market;\\n ERC20 reward;\\n IPriceFeed priceFeed;\\n uint32 start;\\n uint256 distributionPeriod;\\n uint256 targetDebt;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n }\\n\\n struct RewardData {\\n // distribution model\\n uint256 targetDebt;\\n uint256 releaseRate;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n uint256 lastUndistributed;\\n // allocation model\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n // liquidity indexes of the reward distribution\\n uint128 borrowIndex;\\n uint128 depositIndex;\\n // distribution timestamps\\n uint32 start;\\n uint32 end;\\n uint32 lastUpdate;\\n // config helpers\\n uint32 lastConfig;\\n uint256 lastConfigReleased;\\n // price feed\\n IPriceFeed priceFeed;\\n // account addresses and their rewards data (index & accrued)\\n mapping(address => mapping(bool => Account)) accounts;\\n }\\n\\n struct Distribution {\\n // reward assets and their data\\n mapping(ERC20 => RewardData) rewards;\\n // list of reward asset addresses for the market\\n mapping(uint128 => ERC20) availableRewards;\\n // count of reward tokens for the market\\n uint8 availableRewardsCount;\\n // base unit of the market\\n uint256 baseUnit;\\n }\\n\\n /// @notice Emitted when rewards are accrued by an account.\\n /// @param market Market where the operation was made.\\n /// @param reward reward asset.\\n /// @param account account that accrued the rewards.\\n /// @param operation true if the operation was a borrow, false if it was a deposit.\\n /// @param accountIndex previous account index.\\n /// @param operationIndex new operation index that is assigned to the `accountIndex`.\\n /// @param rewardsAccrued amount of rewards accrued.\\n event Accrue(\\n Market indexed market,\\n ERC20 indexed reward,\\n address indexed account,\\n bool operation,\\n uint256 accountIndex,\\n uint256 operationIndex,\\n uint256 rewardsAccrued\\n );\\n\\n /// @notice Emitted when rewards are claimed by an account.\\n /// @param account account that claimed the rewards.\\n /// @param reward reward asset.\\n /// @param to account that received the rewards.\\n /// @param amount amount of rewards claimed.\\n event Claim(address indexed account, ERC20 indexed reward, address indexed to, uint256 amount);\\n\\n /// @notice Emitted when a distribution is set.\\n /// @param market Market whose distribution was set.\\n /// @param reward reward asset to be distributed when operating with the Market.\\n /// @param config configuration struct containing the distribution parameters.\\n event DistributionSet(Market indexed market, ERC20 indexed reward, Config config);\\n\\n /// @notice Emitted when the distribution indexes are updated.\\n /// @param market Market of the distribution.\\n /// @param reward reward asset.\\n /// @param borrowIndex index of the borrow operations of a distribution.\\n /// @param depositIndex index of the deposit operations of a distribution.\\n /// @param newUndistributed amount of undistributed rewards.\\n /// @param lastUpdate current timestamp.\\n event IndexUpdate(\\n Market indexed market,\\n ERC20 indexed reward,\\n uint256 borrowIndex,\\n uint256 depositIndex,\\n uint256 newUndistributed,\\n uint256 lastUpdate\\n );\\n}\\n\\nerror IndexOverflow();\\nerror InvalidConfig();\\n\\nstruct ClaimPermit {\\n address owner;\\n ERC20[] assets;\\n uint256 deadline;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n}\\n\",\"keccak256\":\"0xb49f89a25450c5d31384afa51595c7e2cf0b32ea73d6e8fd2b2c937cc60c7b5f\",\"license\":\"BUSL-1.1\"},\"contracts/utils/FixedLib.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\nlibrary FixedLib {\\n using FixedPointMathLib for uint256;\\n\\n uint256 internal constant INTERVAL = 4 weeks;\\n\\n /// @notice Gets the amount of revenue sharing between the backup supplier and the new fixed pool supplier.\\n /// @param pool fixed rate pool.\\n /// @param amount amount being provided by the fixed pool supplier.\\n /// @param backupFeeRate rate charged to the fixed pool supplier to be accrued by the backup supplier.\\n /// @return yield amount to be offered to the fixed pool supplier.\\n /// @return backupFee yield to be accrued by the backup supplier for initially providing the liquidity.\\n function calculateDeposit(\\n Pool memory pool,\\n uint256 amount,\\n uint256 backupFeeRate\\n ) internal pure returns (uint256 yield, uint256 backupFee) {\\n uint256 memBackupSupplied = backupSupplied(pool);\\n if (memBackupSupplied != 0) {\\n yield = pool.unassignedEarnings.mulDivDown(Math.min(amount, memBackupSupplied), memBackupSupplied);\\n backupFee = yield.mulWadDown(backupFeeRate);\\n yield -= backupFee;\\n }\\n }\\n\\n /// @notice Registers an operation to add supply to a fixed rate pool and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be added to the supply.\\n /// @param amount amount to be added to the supply.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function deposit(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.supplied = supplied + amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to reduce borrowed amount from a fixed rate pool\\n /// and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be repaid.\\n /// @param amount amount to be added to the fixed rate pool.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function repay(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.borrowed = borrowed - amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to increase borrowed amount of a fixed rate pool\\n /// and potentially increase backup debt.\\n /// @param pool fixed rate pool where an amount will be borrowed.\\n /// @param amount amount to be borrowed from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function borrow(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 newBorrowed = borrowed + amount;\\n\\n backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, pool.supplied), newBorrowed);\\n pool.borrowed = newBorrowed;\\n }\\n\\n /// @notice Registers an operation to reduce supply from a fixed rate pool and potentially increase backup debt.\\n /// @param pool fixed rate pool where amount will be withdrawn.\\n /// @param amountToDiscount amount to be withdrawn from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function withdraw(Pool storage pool, uint256 amountToDiscount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n uint256 newSupply = supplied - amountToDiscount;\\n\\n backupDebtAddition = Math.min(supplied, borrowed) - Math.min(newSupply, borrowed);\\n pool.supplied = newSupply;\\n }\\n\\n /// @notice Accrues backup earnings from `unassignedEarnings` based on the `lastAccrual` time.\\n /// @param pool fixed rate pool where earnings will be accrued.\\n /// @param maturity maturity date of the pool.\\n /// @return backupEarnings amount of earnings to be distributed to the backup supplier.\\n function accrueEarnings(Pool storage pool, uint256 maturity) internal returns (uint256 backupEarnings) {\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (block.timestamp < maturity) {\\n uint256 unassignedEarnings = pool.unassignedEarnings;\\n pool.lastAccrual = block.timestamp;\\n backupEarnings = unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual);\\n pool.unassignedEarnings = unassignedEarnings - backupEarnings;\\n } else if (lastAccrual == maturity) {\\n backupEarnings = 0;\\n } else {\\n pool.lastAccrual = maturity;\\n backupEarnings = pool.unassignedEarnings;\\n pool.unassignedEarnings = 0;\\n }\\n }\\n\\n /// @notice Calculates the amount that a fixed rate pool borrowed from the backup supplier.\\n /// @param pool fixed rate pool.\\n /// @return amount borrowed from the fixed rate pool.\\n function backupSupplied(Pool memory pool) internal pure returns (uint256) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n return borrowed - Math.min(borrowed, supplied);\\n }\\n\\n /// @notice Modify positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it. Needs for the amount to be less than the principal and the fee\\n /// @param position original position to be scaled.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return scaled position.\\n function scaleProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 principal = amount.mulDivDown(position.principal, position.principal + position.fee);\\n position.principal = principal;\\n position.fee = amount - principal;\\n return position;\\n }\\n\\n /// @notice Reduce positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it.\\n /// @param position original position to be reduced.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return reduced position.\\n function reduceProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 positionAssets = position.principal + position.fee;\\n uint256 newPositionAssets = positionAssets - amount;\\n position.principal = newPositionAssets.mulDivDown(position.principal, positionAssets);\\n position.fee = newPositionAssets - position.principal;\\n return position;\\n }\\n\\n /// @notice Calculates what proportion of earnings would `borrowAmount` represent considering `backupSupplied`.\\n /// @param earnings amount to be distributed.\\n /// @param borrowAmount amount that will be checked if came from the backup supplier or fixed rate pool.\\n /// @return unassignedEarnings earnings to be added to `unassignedEarnings`.\\n /// @return backupEarnings earnings to be distributed to the backup supplier.\\n function distributeEarnings(\\n Pool memory pool,\\n uint256 earnings,\\n uint256 borrowAmount\\n ) internal pure returns (uint256 unassignedEarnings, uint256 backupEarnings) {\\n backupEarnings = borrowAmount == 0\\n ? 0\\n : earnings.mulDivDown(borrowAmount - Math.min(backupSupplied(pool), borrowAmount), borrowAmount);\\n unassignedEarnings = earnings - backupEarnings;\\n }\\n\\n /// @notice Adds a maturity date to the borrow or supply positions of the account.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity the new maturity where the account will borrow or supply to.\\n /// @return updated encoded maturity dates.\\n function setMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n // initialize the maturity with also the 1st bit on the 33th position set\\n if (encoded == 0) return maturity | (1 << 32);\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n if (maturity < baseMaturity) {\\n // if the new maturity is lower than the base, set it as the new base\\n // wipe clean the last 32 bits, shift the amount of `INTERVAL` and set the new value with the 33rd bit set\\n uint256 range = (baseMaturity - maturity) / INTERVAL;\\n if (encoded >> (256 - range) != 0) revert MaturityOverflow();\\n encoded = ((encoded >> 32) << (32 + range));\\n return maturity | encoded | (1 << 32);\\n } else {\\n uint256 range = (maturity - baseMaturity) / INTERVAL;\\n if (range > 223) revert MaturityOverflow();\\n return encoded | (1 << (32 + range));\\n }\\n }\\n\\n /// @notice Remove maturity from account's borrow or supplied positions.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity maturity date to be removed.\\n /// @return updated encoded maturity dates.\\n function clearMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n if (encoded == 0 || encoded == maturity | (1 << 32)) return 0;\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n // if the baseMaturity is the one being cleaned\\n if (maturity == baseMaturity) {\\n // wipe 32 bytes + 1 for the old base flag\\n uint256 packed = encoded >> 33;\\n uint256 range = 1;\\n while ((packed & 1) == 0 && packed != 0) {\\n unchecked {\\n ++range;\\n }\\n packed >>= 1;\\n }\\n encoded = ((encoded >> (32 + range)) << 32);\\n return (maturity + (range * INTERVAL)) | encoded;\\n } else {\\n // otherwise just clear the bit\\n return encoded & ~(1 << (32 + ((maturity - baseMaturity) / INTERVAL)));\\n }\\n }\\n\\n /// @notice Verifies that a maturity is `VALID`, `MATURED`, `NOT_READY` or `INVALID`.\\n /// @dev if expected state doesn't match the calculated one, it reverts with a custom error `UnmatchedPoolState`.\\n /// @param maturity timestamp of the maturity date to be verified.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param requiredState state required by the caller to be verified (see `State` for description).\\n /// @param alternativeState state required by the caller to be verified (see `State` for description).\\n function checkPoolState(uint256 maturity, uint8 maxPools, State requiredState, State alternativeState) internal view {\\n State state;\\n if (maturity % INTERVAL != 0) {\\n state = State.INVALID;\\n } else if (maturity <= block.timestamp) {\\n state = State.MATURED;\\n } else if (maturity > block.timestamp - (block.timestamp % INTERVAL) + (INTERVAL * maxPools)) {\\n state = State.NOT_READY;\\n } else {\\n state = State.VALID;\\n }\\n\\n if (state != requiredState && state != alternativeState) {\\n if (alternativeState == State.NONE) revert UnmatchedPoolState(uint8(state), uint8(requiredState));\\n\\n revert UnmatchedPoolStates(uint8(state), uint8(requiredState), uint8(alternativeState));\\n }\\n }\\n\\n /// @notice Stores the accountability of a fixed interest rate pool.\\n /// @param borrowed total amount borrowed from the pool.\\n /// @param supplied total amount supplied to the pool.\\n /// @param unassignedEarnings total amount of earnings not yet distributed and accrued.\\n /// @param lastAccrual timestamp for the last time that some earnings have been distributed to the backup supplier.\\n struct Pool {\\n uint256 borrowed;\\n uint256 supplied;\\n uint256 unassignedEarnings;\\n uint256 lastAccrual;\\n }\\n\\n /// @notice Stores principal and fee of a borrow or a supply position of a account in a fixed rate pool.\\n /// @param principal amount borrowed or supplied to the fixed rate pool.\\n /// @param fee amount of fees to be repaid or earned at the maturity of the fixed rate pool.\\n struct Position {\\n uint256 principal;\\n uint256 fee;\\n }\\n\\n enum State {\\n NONE,\\n INVALID,\\n MATURED,\\n VALID,\\n NOT_READY\\n }\\n}\\n\\nerror MaturityOverflow();\\nerror UnmatchedPoolState(uint8 state, uint8 requiredState);\\nerror UnmatchedPoolStates(uint8 state, uint8 requiredState, uint8 alternativeState);\\n\",\"keccak256\":\"0xb959d7d8c709c18ad668f58ab3d622b942ef36d72e6268e925e632b56a80ddc1\",\"license\":\"BUSL-1.1\"},\"contracts/utils/IPriceFeed.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\ninterface IPriceFeed {\\n function decimals() external view returns (uint8);\\n\\n function latestAnswer() external view returns (int256);\\n}\\n\",\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\"},\"solmate/src/mixins/ERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\nimport {SafeTransferLib} from \\\"../utils/SafeTransferLib.sol\\\";\\nimport {FixedPointMathLib} from \\\"../utils/FixedPointMathLib.sol\\\";\\n\\n/// @notice Minimal ERC4626 tokenized Vault implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)\\nabstract contract ERC4626 is ERC20 {\\n using SafeTransferLib for ERC20;\\n using FixedPointMathLib for uint256;\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /*//////////////////////////////////////////////////////////////\\n IMMUTABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n ERC20 public immutable asset;\\n\\n constructor(\\n ERC20 _asset,\\n string memory _name,\\n string memory _symbol\\n ) ERC20(_name, _symbol, _asset.decimals()) {\\n asset = _asset;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {\\n // Check for rounding error since we round down in previewDeposit.\\n require((shares = previewDeposit(assets)) != 0, \\\"ZERO_SHARES\\\");\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {\\n assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up.\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 shares) {\\n shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up.\\n\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 assets) {\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n // Check for rounding error since we round down in previewRedeem.\\n require((assets = previewRedeem(shares)) != 0, \\\"ZERO_ASSETS\\\");\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ACCOUNTING LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function totalAssets() public view virtual returns (uint256);\\n\\n function convertToShares(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets());\\n }\\n\\n function convertToAssets(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply);\\n }\\n\\n function previewDeposit(uint256 assets) public view virtual returns (uint256) {\\n return convertToShares(assets);\\n }\\n\\n function previewMint(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply);\\n }\\n\\n function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\\n }\\n\\n function previewRedeem(uint256 shares) public view virtual returns (uint256) {\\n return convertToAssets(shares);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LIMIT LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function maxDeposit(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxMint(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxWithdraw(address owner) public view virtual returns (uint256) {\\n return convertToAssets(balanceOf[owner]);\\n }\\n\\n function maxRedeem(address owner) public view virtual returns (uint256) {\\n return balanceOf[owner];\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL HOOKS LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {}\\n\\n function afterDeposit(uint256 assets, uint256 shares) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\"},\"solmate/src/tokens/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\\nabstract contract ERC20 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n uint8 public immutable decimals;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) public balanceOf;\\n\\n mapping(address => mapping(address => uint256)) public allowance;\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal immutable INITIAL_CHAIN_ID;\\n\\n bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\\n\\n mapping(address => uint256) public nonces;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint8 _decimals\\n ) {\\n name = _name;\\n symbol = _symbol;\\n decimals = _decimals;\\n\\n INITIAL_CHAIN_ID = block.chainid;\\n INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 amount) public virtual returns (bool) {\\n allowance[msg.sender][spender] = amount;\\n\\n emit Approval(msg.sender, spender, amount);\\n\\n return true;\\n }\\n\\n function transfer(address to, uint256 amount) public virtual returns (bool) {\\n balanceOf[msg.sender] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(msg.sender, to, amount);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual returns (bool) {\\n uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\\n\\n balanceOf[from] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n return true;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 LOGIC\\n //////////////////////////////////////////////////////////////*/\\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 ) public virtual {\\n require(deadline >= block.timestamp, \\\"PERMIT_DEADLINE_EXPIRED\\\");\\n\\n // Unchecked because the only math done is incrementing\\n // the owner's nonce which cannot realistically overflow.\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\n \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n ),\\n owner,\\n spender,\\n value,\\n nonces[owner]++,\\n deadline\\n )\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"INVALID_SIGNER\\\");\\n\\n allowance[recoveredAddress][spender] = value;\\n }\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\\n return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\\n }\\n\\n function computeDomainSeparator() internal view virtual returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 amount) internal virtual {\\n totalSupply += amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(address(0), to, amount);\\n }\\n\\n function _burn(address from, uint256 amount) internal virtual {\\n balanceOf[from] -= amount;\\n\\n // Cannot underflow because a user's balance\\n // will never be larger than the total supply.\\n unchecked {\\n totalSupply -= amount;\\n }\\n\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\"},\"solmate/src/utils/FixedPointMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Arithmetic library with operations for fixed-point numbers.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)\\nlibrary FixedPointMathLib {\\n /*//////////////////////////////////////////////////////////////\\n SIMPLIFIED FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.\\n\\n function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.\\n }\\n\\n function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.\\n }\\n\\n function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.\\n }\\n\\n function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.\\n }\\n\\n function powWad(int256 x, int256 y) internal pure returns (int256) {\\n // Equivalent to x to the power of y because x ** y = (e ** ln(x)) ** y = e ** (ln(x) * y)\\n return expWad((lnWad(x) * y) / int256(WAD)); // Using ln(x) means x must be greater than 0.\\n }\\n\\n function expWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n // When the result is < 0.5 we return zero. This happens when\\n // x <= floor(log(0.5e18) * 1e18) ~ -42e18\\n if (x <= -42139678854452767551) return 0;\\n\\n // When the result is > (2**255 - 1) / 1e18 we can not represent it as an\\n // int. This happens when x >= floor(log((2**255 - 1) / 1e18) * 1e18) ~ 135.\\n if (x >= 135305999368893231589) revert(\\\"EXP_OVERFLOW\\\");\\n\\n // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96\\n // for more intermediate precision and a binary basis. This base conversion\\n // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.\\n x = (x << 78) / 5**18;\\n\\n // Reduce range of x to (-\\u00bd ln 2, \\u00bd ln 2) * 2**96 by factoring out powers\\n // of two such that exp(x) = exp(x') * 2**k, where k is an integer.\\n // Solving this gives k = round(x / log(2)) and x' = x - k * log(2).\\n int256 k = ((x << 96) / 54916777467707473351141471128 + 2**95) >> 96;\\n x = x - k * 54916777467707473351141471128;\\n\\n // k is in the range [-61, 195].\\n\\n // Evaluate using a (6, 7)-term rational approximation.\\n // p is made monic, we'll multiply by a scale factor later.\\n int256 y = x + 1346386616545796478920950773328;\\n y = ((y * x) >> 96) + 57155421227552351082224309758442;\\n int256 p = y + x - 94201549194550492254356042504812;\\n p = ((p * y) >> 96) + 28719021644029726153956944680412240;\\n p = p * x + (4385272521454847904659076985693276 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n int256 q = x - 2855989394907223263936484059900;\\n q = ((q * x) >> 96) + 50020603652535783019961831881945;\\n q = ((q * x) >> 96) - 533845033583426703283633433725380;\\n q = ((q * x) >> 96) + 3604857256930695427073651918091429;\\n q = ((q * x) >> 96) - 14423608567350463180887372962807573;\\n q = ((q * x) >> 96) + 26449188498355588339934803723976023;\\n\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial won't have zeros in the domain as all its roots are complex.\\n // No scaling is necessary because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r should be in the range (0.09, 0.25) * 2**96.\\n\\n // We now need to multiply r by:\\n // * the scale factor s = ~6.031367120.\\n // * the 2**k factor from the range reduction.\\n // * the 1e18 / 2**96 factor for base conversion.\\n // We do this all at once, with an intermediate result in 2**213\\n // basis, so the final right shift is always by a positive amount.\\n r = int256((uint256(r) * 3822833074963236453042738258902158003155416615667) >> uint256(195 - k));\\n }\\n }\\n\\n function lnWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n // We want to convert x from 10**18 fixed point to 2**96 fixed point.\\n // We do this by multiplying by 2**96 / 10**18. But since\\n // ln(x * C) = ln(x) + ln(C), we can simply do nothing here\\n // and add ln(2**96 / 10**18) at the end.\\n\\n // Reduce range of x to (1, 2) * 2**96\\n // ln(2^k * x) = k * ln(2) + ln(x)\\n int256 k = int256(log2(uint256(x))) - 96;\\n x <<= uint256(159 - k);\\n x = int256(uint256(x) >> 159);\\n\\n // Evaluate using a (8, 8)-term rational approximation.\\n // p is made monic, we will multiply by a scale factor later.\\n int256 p = x + 3273285459638523848632254066296;\\n p = ((p * x) >> 96) + 24828157081833163892658089445524;\\n p = ((p * x) >> 96) + 43456485725739037958740375743393;\\n p = ((p * x) >> 96) - 11111509109440967052023855526967;\\n p = ((p * x) >> 96) - 45023709667254063763336534515857;\\n p = ((p * x) >> 96) - 14706773417378608786704636184526;\\n p = p * x - (795164235651350426258249787498 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n // q is monic by convention.\\n int256 q = x + 5573035233440673466300451813936;\\n q = ((q * x) >> 96) + 71694874799317883764090561454958;\\n q = ((q * x) >> 96) + 283447036172924575727196451306956;\\n q = ((q * x) >> 96) + 401686690394027663651624208769553;\\n q = ((q * x) >> 96) + 204048457590392012362485061816622;\\n q = ((q * x) >> 96) + 31853899698501571402653359427138;\\n q = ((q * x) >> 96) + 909429971244387300277376558375;\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial is known not to have zeros in the domain.\\n // No scaling required because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r is in the range (0, 0.125) * 2**96\\n\\n // Finalization, we need to:\\n // * multiply by the scale factor s = 5.549\\u2026\\n // * add ln(2**96 / 10**18)\\n // * add k * ln(2)\\n // * multiply by 10**18 / 2**96 = 5**18 >> 78\\n\\n // mul s * 5e18 * 2**96, base is now 5**18 * 2**192\\n r *= 1677202110996718588342820967067443963516166;\\n // add ln(2) * k * 5e18 * 2**192\\n r += 16597577552685614221487285958193947469193820559219878177908093499208371 * k;\\n // add ln(2**96 / 10**18) * 5e18 * 2**192\\n r += 600920179829731861736702779321621459595472258049074101567377883020018308;\\n // base conversion: mul 2**18 / 2**192\\n r >>= 174;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n LOW LEVEL FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function mulDivDown(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // Divide z by the denominator.\\n z := div(z, denominator)\\n }\\n }\\n\\n function mulDivUp(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // First, divide z - 1 by the denominator and add 1.\\n // We allow z - 1 to underflow if z is 0, because we multiply the\\n // end result by 0 if z is zero, ensuring we return 0 if z is zero.\\n z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1))\\n }\\n }\\n\\n function rpow(\\n uint256 x,\\n uint256 n,\\n uint256 scalar\\n ) internal pure returns (uint256 z) {\\n assembly {\\n switch x\\n case 0 {\\n switch n\\n case 0 {\\n // 0 ** 0 = 1\\n z := scalar\\n }\\n default {\\n // 0 ** n = 0\\n z := 0\\n }\\n }\\n default {\\n switch mod(n, 2)\\n case 0 {\\n // If n is even, store scalar in z for now.\\n z := scalar\\n }\\n default {\\n // If n is odd, store x in z for now.\\n z := x\\n }\\n\\n // Shifting right by 1 is like dividing by 2.\\n let half := shr(1, scalar)\\n\\n for {\\n // Shift n right by 1 before looping to halve it.\\n n := shr(1, n)\\n } n {\\n // Shift n right by 1 each iteration to halve it.\\n n := shr(1, n)\\n } {\\n // Revert immediately if x ** 2 would overflow.\\n // Equivalent to iszero(eq(div(xx, x), x)) here.\\n if shr(128, x) {\\n revert(0, 0)\\n }\\n\\n // Store x squared.\\n let xx := mul(x, x)\\n\\n // Round to the nearest number.\\n let xxRound := add(xx, half)\\n\\n // Revert if xx + half overflowed.\\n if lt(xxRound, xx) {\\n revert(0, 0)\\n }\\n\\n // Set x to scaled xxRound.\\n x := div(xxRound, scalar)\\n\\n // If n is even:\\n if mod(n, 2) {\\n // Compute z * x.\\n let zx := mul(z, x)\\n\\n // If z * x overflowed:\\n if iszero(eq(div(zx, x), z)) {\\n // Revert if x is non-zero.\\n if iszero(iszero(x)) {\\n revert(0, 0)\\n }\\n }\\n\\n // Round to the nearest number.\\n let zxRound := add(zx, half)\\n\\n // Revert if zx + half overflowed.\\n if lt(zxRound, zx) {\\n revert(0, 0)\\n }\\n\\n // Return properly scaled zxRound.\\n z := div(zxRound, scalar)\\n }\\n }\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n GENERAL NUMBER UTILITIES\\n //////////////////////////////////////////////////////////////*/\\n\\n function sqrt(uint256 x) internal pure returns (uint256 z) {\\n assembly {\\n let y := x // We start y at x, which will help us make our initial estimate.\\n\\n z := 181 // The \\\"correct\\\" value is 1, but this saves a multiplication later.\\n\\n // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad\\n // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.\\n\\n // We check y >= 2^(k + 8) but shift right by k bits\\n // each branch to ensure that if x >= 256, then y >= 256.\\n if iszero(lt(y, 0x10000000000000000000000000000000000)) {\\n y := shr(128, y)\\n z := shl(64, z)\\n }\\n if iszero(lt(y, 0x1000000000000000000)) {\\n y := shr(64, y)\\n z := shl(32, z)\\n }\\n if iszero(lt(y, 0x10000000000)) {\\n y := shr(32, y)\\n z := shl(16, z)\\n }\\n if iszero(lt(y, 0x1000000)) {\\n y := shr(16, y)\\n z := shl(8, z)\\n }\\n\\n // Goal was to get z*z*y within a small factor of x. More iterations could\\n // get y in a tighter range. Currently, we will have y in [256, 256*2^16).\\n // We ensured y >= 256 so that the relative difference between y and y+1 is small.\\n // That's not possible if x < 256 but we can just verify those cases exhaustively.\\n\\n // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.\\n // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.\\n // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.\\n\\n // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range\\n // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.\\n\\n // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate\\n // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.\\n\\n // There is no overflow risk here since y < 2^136 after the first branch above.\\n z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.\\n\\n // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n\\n // If x+1 is a perfect square, the Babylonian method cycles between\\n // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.\\n // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\\n // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.\\n // If you don't care whether the floor or ceil square root is returned, you can remove this statement.\\n z := sub(z, lt(div(x, z), z))\\n }\\n }\\n\\n function log2(uint256 x) internal pure returns (uint256 r) {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n assembly {\\n r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))\\n r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))\\n r := or(r, shl(5, lt(0xffffffff, shr(r, x))))\\n r := or(r, shl(4, lt(0xffff, shr(r, x))))\\n r := or(r, shl(3, lt(0xff, shr(r, x))))\\n r := or(r, shl(2, lt(0xf, shr(r, x))))\\n r := or(r, shl(1, lt(0x3, shr(r, x))))\\n r := or(r, lt(0x1, shr(r, x)))\\n }\\n }\\n\\n function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := mod(x, y)\\n }\\n }\\n\\n function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := div(x, y)\\n }\\n }\\n\\n /// @dev Will return 0 instead of reverting if y is zero.\\n function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // Add 1 to x * y if x % y > 0.\\n z := add(gt(mod(x, y), 0), div(x, y))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\"},\"solmate/src/utils/SafeTransferLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\n\\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)\\n/// @dev Caution! This library won't check that a token has code, responsibility is delegated to the caller.\\nlibrary SafeTransferLib {\\n /*//////////////////////////////////////////////////////////////\\n ETH OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n bool success;\\n\\n assembly {\\n // Transfer the ETH and store if it succeeded or not.\\n success := call(gas(), to, amount, 0, 0, 0, 0)\\n }\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferFrom(\\n ERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\\n mstore(4, from) // Append the \\\"from\\\" argument.\\n mstore(36, to) // Append the \\\"to\\\" argument.\\n mstore(68, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 100 because that's the total length of our calldata (4 + 32 * 3)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 100, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x095ea7b300000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"APPROVE_FAILED\\\");\\n }\\n}\\n\",\"keccak256\":\"0x5f2e1158c68c1f3d15b80e8a7dd92b6849f873066969562ad33c0abb80e536ff\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x610120604052348015610010575f80fd5b5060405161644938038061644983398101604081905261002f9161021c565b8160405180602001604052805f81525060405180602001604052805f8152508181846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100b09190610254565b60c96100bc8482610313565b5060ca6100c98382610313565b5060ff81166080524660a0526100dd610108565b60c0525050506001600160a01b0392831660e05250508116610100526101016101a1565b5050610444565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c960405161013991906103d2565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f54610100900460ff16156101b4575f80fd5b5f5460ff90811614610203575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610219575f80fd5b50565b5f806040838503121561022d575f80fd5b825161023881610205565b602084015190925061024981610205565b809150509250929050565b5f60208284031215610264575f80fd5b815160ff81168114610274575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102a357607f821691505b6020821081036102c157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561030e57805f5260205f20601f840160051c810160208510156102ec5750805b601f840160051c820191505b8181101561030b575f81556001016102f8565b50505b505050565b81516001600160401b0381111561032c5761032c61027b565b6103408161033a845461028f565b846102c7565b602080601f831160018114610373575f841561035c5750858301515b5f19600386901b1c1916600185901b1785556103ca565b5f85815260208120601f198616915b828110156103a157888601518255948401946001909101908401610382565b50858210156103be57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f8083546103df8161028f565b600182811680156103f7576001811461040c57610438565b60ff1984168752821515830287019450610438565b875f526020805f205f5b8581101561042f5781548a820152908401908201610416565b50505082870194505b50929695505050505050565b60805160a05160c05160e05161010051615f276105225f395f81816108070152818161161c015281816117c001528181611e3e015281816120910152818161220b0152818161257101528181612ed7015281816130800152818161316f015281816136990152614b0501525f81816107ac0152818161168001528181611c2201528181611d160152818161227d01528181612337015281816123fe0152818161286501528181612e59015281816136fd01528181614c92015281816151c001526152d501525f611c8f01525f611c5a01525f6107430152615f275ff3fe608060405234801561000f575f80fd5b5060043610610539575f3560e01c80636e76fc8f116102bf578063b2a02ff111610186578063d5164184116100ef578063e63ab1e9116100a9578063ef8b30f711610084578063ef8b30f714610d5e578063f3fdb15a14610d71578063fb0fc4c314610d84578063fea45d9414610d9b575f80fd5b8063e63ab1e914610d26578063e94b3c2114610d4d578063eee8c9e014610d56575f80fd5b8063d516418414610c92578063d547741f14610ca5578063d6b7494f14610cb8578063d905777e14610cc1578063dd62ed3e14610ce9578063e00b262514610d13575f80fd5b8063c63d75b611610140578063c63d75b614610831578063c6e6f59214610bf7578063ccfd8b1114610c0a578063ce96cb7714610c3b578063d2681a0b14610c4e578063d505accf14610c7f575f80fd5b8063b2a02ff114610b85578063b3d7f6b914610b98578063b460af9414610bab578063ba08765214610bbe578063bee36bb314610bd1578063bf722ca214610be4575f80fd5b806391d1485411610228578063a16a8850116101e2578063a16a885014610b27578063a1bab44714610b3c578063a1e8f02b14610b4f578063a217fddf14610b58578063a9059cbb14610b5f578063acb7081514610b72575f80fd5b806391d1485414610ac0578063926bb63314610ad357806394bf804d14610ae657806395d89b4114610af957806397bce8d014610b01578063a05a091a14610b14575f80fd5b80637ecebe00116102795780637ecebe0014610a6b5780638456cb5914610a8a5780638a1baa4614610a925780638bcd401614610a9b5780638c3cba5a14610aae5780638d0e5f0214610ab7575f80fd5b80636e76fc8f146109c05780636eb9ffeb146109e757806370a0823114610a1357806378007e2314610a325780637ad226dc14610a455780637e932d3214610a58575f80fd5b8063313ce567116104035780634322b7141161036c5780635cc2ef83116103265780635cc2ef83146109225780635e5c06e21461093557806361d027b31461097e57806366601032146109915780636bb65f531461099a5780636e553f65146109ad575f80fd5b80634322b7141461085857806347dffde01461088a5780634914c0081461089d5780634cdad506146108b05780634e7c5059146108c35780635c975abb14610917575f80fd5b80633aa18d6f116103bd5780633aa18d6f146107e65780633c6f317f146107ef5780633ec045a6146108025780633f4ba83a14610829578063402d267d1461083157806342da42bf14610845575f80fd5b8063313ce5671461073e57806333eeb1471461076557806334f7d1f2146107795780633644e5151461078c57806336568abe1461079457806338d52e0f146107a7575f80fd5b806313700101116104a5578063248a9ca31161045f578063248a9ca3146106bb57806325fc07a9146106dd57806328acf2cf146106fc5780632c5dcc771461070f5780632e0af008146107225780632f2ff15d1461072b575f80fd5b8063137001011461065d57806318160ddd146106705780631a5b9e62146106795780631a90f1861461068c5780631d43b30b1461069557806323b872dd146106a8575f80fd5b806307a2d13a116104f657806307a2d13a146105d6578063095ea7b3146105e95780630a28a477146105fc5780630ab69be81461060f5780630e52dbec146106365780630f2b75aa14610655575f80fd5b8063014a296f1461053d57806301e1d1141461056a57806301ffc9a714610580578063022d8af5146105a35780630539fa8c146105b857806306fdde03146105c1575b5f80fd5b61055061054b36600461566a565b610dae565b604080519283526020830191909152015b60405180910390f35b610572610de3565b604051908152602001610561565b61059361058e366004615685565b610e8f565b6040519015158152602001610561565b6105b66105b13660046156c7565b610ec5565b005b61057260d85481565b6105c9610f54565b60405161056191906156e0565b6105726105e4366004615715565b610fe0565b6105936105f736600461572c565b61100c565b61057261060a366004615715565b611077565b61055061061d366004615715565b5f90815260d16020526040902080546001909101549091565b60da546106439060ff1681565b60405160ff9091168152602001610561565b610572611096565b6105b661066b366004615794565b61113b565b61057260cb5481565b6105726106873660046157d3565b6111ac565b61057260d45481565b6105726106a336600461566a565b6116b5565b6105936106b6366004615825565b6117b5565b6105726106c9366004615715565b5f9081526065602052604090206001015490565b6105726106eb366004615715565b5f90815260d1602052604090205490565b6105b661070a366004615873565b611916565b6105b661071d36600461572c565b611962565b61057260dd5481565b6105b661073936600461588c565b6119d2565b6106437f000000000000000000000000000000000000000000000000000000000000000081565b60e35461059390600160a01b900460ff1681565b6105726107873660046158ba565b6119fb565b610572611c57565b6105b66107a236600461588c565b611cb1565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610561565b61057260d95481565b6105726107fd3660046158ba565b611cd3565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6105b6611d46565b61057261083f36600461566a565b505f1990565b6105b6610853366004615715565b611d7b565b60dc5461087290600160801b90046001600160801b031681565b6040516001600160801b039091168152602001610561565b610572610898366004615715565b611dba565b6105726108ab3660046158f8565b611dd8565b6105726108be366004615715565b6122af565b6108f76108d1366004615715565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610561565b60975460ff16610593565b6105b6610930366004615937565b6122b9565b61096361094336600461566a565b60d26020525f908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610561565b60e1546107ce906001600160a01b031681565b61057260e25481565b60e3546107ce906001600160a01b031681565b6105726109bb36600461588c565b612313565b6105727f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da546109fe90600160281b900463ffffffff1681565b60405163ffffffff9091168152602001610561565b610572610a2136600461566a565b60cc6020525f908152604090205481565b610572610a40366004615715565b6123b9565b610550610a5336600461588c565b6123d0565b6105b6610a66366004615957565b61242d565b610572610a7936600461566a565b60ce6020525f908152604090205481565b6105b66124aa565b61057260d55481565b6105b6610aa936600461566a565b6124bc565b61057260d35481565b61057260df5481565b610593610ace36600461588c565b61253c565b6105b6610ae136600461566a565b612566565b610572610af436600461588c565b61284c565b6105c96128e7565b6105b6610b0f366004615976565b6128f4565b610572610b223660046157d3565b612a55565b60da546109fe90610100900463ffffffff1681565b6105b6610b4a366004615715565b612e8d565b61057260d75481565b6105725f81565b610593610b6d36600461572c565b612ecc565b610550610b8036600461588c565b613021565b6105b6610b93366004615825565b61303d565b610572610ba6366004615715565b613051565b610572610bb9366004615a1f565b613067565b610572610bcc366004615a1f565b61316c565b6105b6610bdf36600461566a565b613266565b610572610bf2366004615715565b6132ba565b610572610c05366004615715565b6132d9565b610550610c1836600461588c565b60cf60209081525f92835260408084209091529082529020805460019091015482565b610572610c4936600461566a565b6132f0565b610550610c5c36600461588c565b60d060209081525f92835260408084209091529082529020805460019091015482565b6105b6610c8d366004615a53565b613311565b610572610ca0366004615a1f565b6134d6565b6105b6610cb336600461588c565b61372f565b61057260d65481565b610572610ccf36600461566a565b6001600160a01b03165f90815260cc602052604090205490565b610572610cf7366004615abc565b60cd60209081525f928352604080842090915290825290205481565b6105b6610d213660046156c7565b613753565b6105727f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61057260de5481565b6105726137ab565b610572610d6c366004615715565b61388c565b60db546107ce906001600160a01b031681565b60da546109fe90600160481b900463ffffffff1681565b60dc54610872906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610dd190610fe0565b610dda846116b5565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610e55575f81815260d160205260409020600381015480831115610e4957824210610e2f578160020154610e44565b6002820154610e449042839003838603613896565b860195505b50506224ea0001610dfd565b50610e7860e254670de0b6b3a76400000360d454610e716137ab565b03906138b4565b610e806138c8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610ebf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610ecf8161393e565b610ed7613948565b60dd5f828254610ee79190615b10565b90915550610ef590506139c1565b60dc80546fffffffffffffffffffffffffffffffff19166001600160801b0384169081179091556040519081527f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e906020015b60405180910390a15050565b60c98054610f6190615b23565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8d90615b23565b8015610fd85780601f10610faf57610100808354040283529160200191610fd8565b820191905f5260205f20905b815481529060010190602001808311610fbb57829003601f168201915b505050505081565b60cb545f90801561100357610ffe610ff6610de3565b849083613896565b611005565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110669086815260200190565b60405180910390a350600192915050565b60cb545f90801561100357610ffe8161108e610de3565b859190613a27565b60dd5460de545f9190828183106110af5760d8546110b3565b60d9545b60da549091505f906110ee906110d690600160481b900463ffffffff1642615b5b565b6110e09084615b6e565b6110e990615b85565b613a54565b61110090670de0b6b3a7640000615b9f565b905061110c81856138b4565b61112861112183670de0b6b3a7640000615b5b565b85906138b4565b6111329190615b10565b94505050505090565b5f6111458161393e565b8282604051602001611158929190615bbe565b60405160208183030381529060405260c990816111759190615c39565b508282604051602001611189929190615cf5565b60405160208183030381529060405260ca90816111a69190615c39565b50505050565b5f6111b5613bc7565b6111bd613bd6565b845f036111dd5760405163774257f760e01b815260040160405180910390fd5b60da546111f190879060ff1660035f613c01565b5f86815260d1602052604090206112088188613d9b565b60dd5f8282546112189190615b10565b909155505060e3546001600160a01b0316801561128657604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b15801561126f575f80fd5b505af1158015611281573d5f803e3d5ffd5b505050505b5f6112918389613e19565b90508015611324575f8160d3546112a89190615b10565b90506112ba6112b5613e55565b613f65565b60dc546112f5906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b60dd54906001600160801b03166138b4565b60d4546113029083615b10565b111561132057604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061132f611096565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff1661137d8a600101548b5f015489613fa2565b6113878888613fcf565b611394898960d354613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa1580156113ea573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140e9190615d33565b905061143361142c611420428f615b5b565b83906301e13380613896565b8c906138b4565b935050505080886114449190615b10565b93508684111561146757604051632c1b6b4160e21b815260040160405180910390fd5b6114718585614003565b5f89815260d0602090815260408083206001600160a01b0389168452909152812080549091036114c8576001600160a01b0386165f90815260d26020526040902060018101546114c1908c614079565b6001909101555b5f8061150b6114d685614164565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614190565b91509150815f1461152f5781866002015f8282546115299190615b10565b90915550505b611538816141dc565b60405180604001604052808c855f01546115529190615b10565b81526020018585600101546115679190615b10565b90525f8d815260d0602090815260408083206001600160a01b038d811680865291845293829020855181559483015160019095019490945580513381529182018f905281018790529194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139060600160405180910390a46115ee6139c1565b6115f789614208565b604051637b9d893160e01b81523060048201526001600160a01b0386811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b15801561165d575f80fd5b505af115801561166f573d5f803e3d5ffd5b506116a99250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614256565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b811561178a57600182161561176f575f81815260d0602090815260408083206001600160a01b038a16845290915281206001810154815491929161172a9190615b10565b90506117368188615b10565b96508242111561176c5761175f8561174e8542615b5b565b6117589190615b6e565b82906138b4565b6117699088615b10565b96505b50505b60019190911c906117836224ea0082615b10565b90506116e6565b600284015480156117ab5761179e81611dba565b6117a89087615b10565b95505b5050505050919050565b5f6117be613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530866117f8866122af565b6040518463ffffffff1660e01b815260040161181693929190615d4a565b5f6040518083038186803b15801561182c575f80fd5b505afa15801561183e573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561190257604051630149e46f60e01b81526001600160a01b038681166004830152821690630149e46f906024015f604051808303815f87803b158015611895575f80fd5b505af11580156118a7573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b1580156118eb575f80fd5b505af11580156118fd573d5f803e3d5ffd5b505050505b61190d858585614298565b95945050505050565b5f6119208161393e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610f48565b5f61196c8161393e565b6119776112b5613e55565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119ec8161393e565b6119f68383614372565b505050565b5f611a04613bc7565b611a0c613bd6565b835f03611a2c576040516356316e8760e01b815260040160405180910390fd5b60da54611a4090869060ff1660035f613c01565b5f85815260d16020526040812090611a588288613d9b565b90508060dd5f828254611a6b9190615b10565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f918291611ab0918a906143f7565b9092509050611abf8289615b10565b945086851015611ae257604051632c1b6b4160e21b815260040160405180910390fd5b611aec8489614448565b60d35f828254611afc9190615b5b565b90915550611b0c90508183615b10565b846002015f828254611b1e9190615b5b565b925050819055508060d55f828254611b369190615b10565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611b8b576001600160a01b0387165f90815260d2602052604090208054611b88908c614079565b90555b88815f015f828254611b9d9190615b10565b9250508190555082816001015f828254611bb79190615b10565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611c0c6139c1565b611c158a614208565b611c4a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614478565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611c8c57611c876144be565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611cc5575f80fd5b611ccf8282614557565b5050565b5f611cdc613bc7565b60da54611cf190869060ff1660036002613c01565b611cff8585858560016145bd565b9050611d096139c1565b611d3e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611d708161393e565b611d78614919565b50565b5f611d858161393e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610f48565b60df545f90801561100357610ffe611dd06137ab565b849083613a27565b5f611de1613bc7565b6001600160a01b0384163303611e0a576040516344511af160e01b815260040160405180910390fd5b60405163042dcf6b60e31b81523060048201526001600160a01b0383811660248301528581166044830152606482018590527f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890608401602060405180830381865afa158015611e83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea79190615d33565b9250825f03611ec95760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611f0357508515155b15612010576001821615611ff5575f81421015611f3a57611f278288898b5f6145bd565b9050611f338188615b5b565b9650611fe7565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611f6c9190615b10565b9150505f611f9360d6548542611f829190615b5b565b611f8c9190615b6e565b83906138b4565b611f9d9083615b10565b9050888111611fac5788611fb7565b611fb7898383613896565b9250825f03611fc8575f9850611fe4565b611fd584848b8d5f6145bd565b9250611fe1838a615b5b565b98505b50505b611ff18186615b10565b9450505b60019190911c906120096224ea0082615b10565b9050611ef5565b505083158015906120245750600281015415155b15612059575f612033856132ba565b90508015612057575f6120468288614966565b5090506120538185615b10565b9350505b505b604051636e1b003160e01b81523060048201526001600160a01b0384811660248301528681166044830152606482018490525f9182917f00000000000000000000000000000000000000000000000000000000000000001690636e1b0031906084016040805180830381865afa1580156120d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f99190615d6e565b915091508160d55f82825461210e9190615b10565b9091555050306001600160a01b038616036121345761212f30338984614ac0565b612199565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906121649033908b908690600401615d4a565b5f604051808303815f87803b15801561217b575f80fd5b505af115801561218d573d5f803e3d5ffd5b505050506121996139c1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b0388811660048301527f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906024015f604051808303815f87803b15801561224c575f80fd5b505af115801561225e573d5f803e3d5ffd5b505050506122a5333084876122739190615b10565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614478565b5050509392505050565b5f610ebf82610fe0565b5f6122c38161393e565b6122cb614cb9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61231d8361388c565b9050805f0361232a575f80fd5b61235f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614478565b6123698282614ce4565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8382614d57565b60df545f90801561100357610ffe8161108e6137ab565b5f806123da613bc7565b6123e48484614966565b90925090506123f16139c1565b6124266001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614478565b9250929050565b5f6124378161393e565b60e35460ff600160a01b90910416151582151514611ccf5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee6989061249e90851515815260200190565b60405180910390a25050565b6124b2614db6565b6124ba614e32565b565b5f6124c68161393e565b60db546001600160a01b0316156124e2576124e26112b5613e55565b60db80546001600160a01b0319166001600160a01b0384161790556125056139c1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146125af576040516317568c8f60e21b815260040160405180910390fd5b6125b7613948565b60dd5f8282546125c79190615b10565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b81156127a3576001821615612788575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916126439190615b10565b90508086106127855760e3546001600160a01b031680156126b557604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b15801561269e575f80fd5b505af11580156126b0573d5f803e3d5ffd5b505050505b6126bf8288615b5b565b96506126cb8287615b10565b83545f86815260d1602052604090209197506126e79190614e6f565b60d35f8282546126f79190615b5b565b90915550505f84815260d0602090815260408083206001600160a01b038d16845290915281208181556001908101919091558801546127369085614e92565b600189015560408051838152602081018490526001600160a01b038b1691339187917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a4505b50505b60019190911c9061279c6224ea0082615b10565b90506125ff565b6002850154158015906127c057506127ba846132ba565b93508315155b156127e1575f6127d08588614966565b5090506127dd8185615b10565b9350505b821561283c578260d55f8282546127f89190615b5b565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b6128446139c1565b505050505050565b5f61285683613051565b905061288d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b6128978284614ce4565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8184614d57565b60ca8054610f6190615b23565b5f54610100900460ff161580801561291257505f54600160ff909116105b8061292b5750303b15801561292b57505f5460ff166001145b612933575f80fd5b5f805460ff191660011790558015612954575f805461ff0019166101001790555b61295c614f52565b612964614f64565b60da805468ffffffffffffffff0019166101004263ffffffff1690810268ffffffff0000000000191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129b95f33614372565b6129c38b8b61113b565b6129cc89611916565b6129d588610ec5565b6129de876124bc565b6129e786612e8d565b6129f085611d7b565b6129f984613753565b612a0383836122b9565b8015612a48575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a5e613bc7565b845f03612a7e5760405163b8cb621960e01b815260040160405180910390fd5b60da54612a9390879060ff1660036002613c01565b5f86815260d160205260409020612aaa8188613d9b565b60dd5f828254612aba9190615b10565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612b049190615b10565b871115612b1f5760208101518151612b1c9190615b10565b96505b6040805180820190915281518152602080830151908201525f90612b4f90612b47908a614f7e565b518490614fc4565b60d354612b5c9190615b10565b905060dd5460d45482612b6f9190615b10565b1115612b8d57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612cba575f612ba1611096565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bf58a600101548b5f01548a613fa2565b612bff8989613fcf565b612c0a8a8a8a613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa158015612c60573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c849190615d33565b9050612caf612c96611420428f615b5b565b612ca890670de0b6b3a7640000615b10565b8c90615008565b965050505050612cbe565b8692505b85831015612cdf57604051632c1b6b4160e21b815260040160405180910390fd5b612ce98484614003565b5f80612d35612d00612cfb878c615b5b565b614164565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614190565b9150915081846002015f828254612d4c9190615b10565b90915550612d5b9050816141dc565b612d65838a61501c565b5060208301518351175f03612db8575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612db1908c614e92565b9055612de8565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b60408051338152602081018b90529081018690526001600160a01b0380881691908916908c907fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c9060600160405180910390a4612e436139c1565b612e4c8a614208565b612e806001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614256565b5050505095945050505050565b5f612e978161393e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610f48565b5f612ed5613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612f0f866122af565b6040518463ffffffff1660e01b8152600401612f2d93929190615d4a565b5f6040518083038186803b158015612f43575f80fd5b505afa158015612f55573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561301757604051630149e46f60e01b81523360048201526001600160a01b03821690630149e46f906024015f604051808303815f87803b158015612faa575f80fd5b505af1158015612fbc573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b158015613000575f80fd5b505af1158015613012573d5f803e3d5ffd5b505050505b611d3e848461507a565b5f8061302b613bc7565b6123e4613037856132ba565b84614966565b613045613bc7565b6119f633848484614ac0565b60cb545f90801561100357610ffe611dd0610de3565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db5906130b990309086908990600401615d4a565b5f6040518083038186803b1580156130cf575f80fd5b505afa1580156130e1573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561314f57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613138575f80fd5b505af115801561314a573d5f803e3d5ffd5b505050505b61315a8585856150dd565b91506131646139c1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530846131a7886122af565b6040518463ffffffff1660e01b81526004016131c593929190615d4a565b5f6040518083038186803b1580156131db575f80fd5b505afa1580156131ed573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561325b57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613244575f80fd5b505af1158015613256573d5f803e3d5ffd5b505050505b61315a8585856151e7565b5f6132708161393e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f90801561100357610ffe816132d16137ab565b859190613896565b60cb545f90801561100357610ffe816132d1610de3565b6001600160a01b0381165f90815260cc6020526040812054610ebf90610fe0565b4284101561331d575f80fd5b5f6001613328611c57565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613430573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134665750876001600160a01b0316816001600160a01b0316145b61346e575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134df613bc7565b6134e7613bd6565b6134f18285614003565b60e3546001600160a01b0316801561355a57604051636c912dad60e01b81526001600160a01b038481166004830152821690636c912dad906024015f604051808303815f87803b158015613543575f80fd5b505af1158015613555573d5f803e3d5ffd5b505050505b6135656112b5613e55565b61356e856123b9565b91505f8560d45461357f9190615b10565b60d481905560dc549091506135b0906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b8160d3546135be9190615b10565b11156135dc57604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135ed9190615b10565b90915550506001600160a01b0384165f90815260d260205260408120600201805485929061361c908490615b10565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136746139c1565b604051637b9d893160e01b81523060048201526001600160a01b0385811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b1580156136da575f80fd5b505af11580156136ec573d5f803e3d5ffd5b506137269250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614256565b50509392505050565b5f828152606560205260409020600101546137498161393e565b6119f68383614557565b5f61375d8161393e565b60dc80546001600160801b03908116600160801b918516918202179091556040519081527fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90602001610f48565b60d45460dd5460da545f929190839061387890613871906137d990600160281b900463ffffffff1642615b5b565b60db546301e13380906001600160a01b0316637c21fb1d6137fa888a613fcf565b613807898b60d354613fe7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613846573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061386a9190615d33565b9190613896565b84906138b4565b90506138848184615b10565b935050505090565b5f610ebf826132d9565b8282028115158415858304851417166138ad575f80fd5b0492915050565b5f6110058383670de0b6b3a7640000613896565b60da545f9081906138e490610100900463ffffffff1642615b5b565b9050805f036138f4575f91505090565b60da5461393890829061392490613912906224ea009060ff16615b6e565b60dc546001600160801b0316906138b4565b61392e9084615b10565b60d5549190613896565b91505090565b611d7881336152fc565b5f6139516138c8565b90508060d55f8282546139649190615b5b565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a3e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a6d57505f919050565b680755bf798b4a1bf1e58212613a81575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156124ba575f80fd5b60e354600160a01b900460ff16156124ba5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613c0f6224ea0086615d90565b15613c1c57506001613c6f565b428511613c2b57506002613c6f565b613c3b60ff85166224ea00615b6e565b613c486224ea0042615d90565b613c529042615b5b565b613c5c9190615b10565b851115613c6b57506004613c6f565b5060035b826004811115613c8157613c81615da3565b816004811115613c9357613c93615da3565b14158015613cc35750816004811115613cae57613cae615da3565b816004811115613cc057613cc0615da3565b14155b15613d94575f826004811115613cdb57613cdb615da3565b03613d2f57806004811115613cf257613cf2615da3565b836004811115613d0457613d04615da3565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d4157613d41615da3565b836004811115613d5357613d53615da3565b836004811115613d6557613d65615da3565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d26565b5050505050565b60038201545f9042831115613def5760028401544260038601819055613dd890613dc6908490615b5b565b613dd08487615b5b565b839190613896565b9250613de48382615b5b565b600286015550613e12565b828103613dfe575f9150613e12565b600384018390556002840180545f90915591505b5092915050565b81545f9081613e288483615b10565b9050613e41613e3b838760010154615342565b82615357565b613e4b9082615b5b565b9455509192915050565b60d45460dd545f919082613e698284613fcf565b60da549091505f90613ebb9061112190613e9090600160281b900463ffffffff1642615b5b565b60db5460d3546301e13380916001600160a01b031690637c21fb1d908890613807908b908d90613fe7565b9050613ec78185615b10565b9350613ede60e254826138b490919063ffffffff16565b945084613eeb8285615b10565b613ef59190615b5b565b60dd5560d484905560da805468ffffffff00000000001916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611d785760e154613f89906001600160a01b0316613f848361388c565b614ce4565b8060dd5f828254613f9a9190615b10565b909155505050565b5f8115801590613fb157508383115b613fbb575f611d3e565b611d3e82613fc98686615b5b565b90615365565b5f825f03613fdd575f611005565b6110058284615365565b5f835f03613ff5575f611d3e565b611d3e84613fc98486615b10565b336001600160a01b03831614611ccf576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146119f65761404782611077565b6140519082615b5b565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f0361408f57506401000000008117610ebf565b63ffffffff83168083101561410d575f6224ea006140ad8584615b5b565b6140b79190615db7565b90506140c581610100615b5b565b85901c156140e65760405163293cc41f60e21b815260040160405180910390fd5b6140f1816020615b10565b602086901c901b94508484176401000000001792505050610ebf565b5f6224ea0061411c8386615b5b565b6141269190615db7565b905060df81111561414a5760405163293cc41f60e21b815260040160405180910390fd5b614155816020615b10565b6001901b851792505050610ebf565b5f8061417b60e254846138b490919063ffffffff16565b905061418681613f65565b6110058184615b5b565b5f8082156141c4576141bf6141ad6141a787615379565b85615357565b6141b79085615b5b565b859085613896565b6141c6565b5f5b90506141d28185615b5b565b9150935093915050565b805f036141e65750565b60e254156141f757611d7881613f65565b8060d55f828254613f9a9190615b10565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806111a6575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142f1576142cd8382615b5b565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614318908490615b5b565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615ed28339815191529061435f9087815260200190565b60405180910390a3506001949350505050565b61437c828261253c565b611ccf575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143b33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f61440386615379565b9050801561443f576144246144188683615357565b60408801519083613896565b925061443083856138b4565b915061443c8284615b5b565b92505b50935093915050565b815460018301545f919061445c8482615b10565b600186015561190d61446e8383615357565b6141a79084615b5b565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d94575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144ef9190615dca565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614561828261253c565b15611ccf575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145de5760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906145f68289613d9b565b90508060dd5f8282546146099190615b10565b90915550505f88815260d0602090815260408083206001600160a01b038916845282528083208151808301909252805480835260019091015492820183905290929161465f918b9161465a91615b10565b615357565b6040805180820190915283518152602080850151908201529091505f906146869083614f7e565b5160e3549091506001600160a01b031680156146f357604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b1580156146dc575f80fd5b505af11580156146ee573d5f803e3d5ffd5b505050505b8b42101561479b5787156147935760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147419186906143f7565b90925090506147508183615b10565b886002015f8282546147629190615b5b565b925050819055508060d55f82825461477a9190615b10565b9091555061478a90508286615b5b565b985050506147e2565b8296506147e2565b60d6546147b6906147ac8e42615b5b565b6138719190615b6e565b6147c09084615b10565b96506147cc8388615b5b565b60d55f8282546147dc9190615b10565b90915550505b8987111561480357604051632c1b6b4160e21b815260040160405180910390fd5b61480d8683614e6f565b60d35f82825461481d9190615b5b565b9091555061482d9050848461501c565b5060208401518451175f03614889575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d29092529091209081015461487e908e614e92565b6001909101556148b9565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a461490a8c614208565b50505050505095945050505050565b614921615397565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001613a1d565b60e3545f9081906001600160a01b031680156149d357604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b1580156149bc575f80fd5b505af11580156149ce573d5f803e3d5ffd5b505050505b6149de6112b5613e55565b6001600160a01b0384165f90815260d2602052604090206002810154614a048782615357565b9350614a0f84611dba565b9450845f03614a315760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a429190615b5b565b90915550614a5290508482615b5b565b82600201819055508360df5f828254614a6b9190615b5b565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614ae05760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b0385811660048301523060248301527f0000000000000000000000000000000000000000000000000000000000000000169063e16ee720906044015f6040518083038186803b158015614b45575f80fd5b505afa158015614b57573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bc557604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614bae575f80fd5b505af1158015614bc0573d5f803e3d5ffd5b505050505b5f614bcf83611077565b9050614bdb83826153a5565b614be5848261541e565b60408051848152602081018390526001600160a01b03808716929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c7591815260200190565b60405180910390a3614c856139c1565b6128446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614256565b614cc1611096565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d4d57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614d36575f80fd5b505af1158015614d48573d5f803e3d5ffd5b505050505b6119f68383615485565b614d5f613bc7565b614d67613bd6565b614d6f614cb9565b5f614d78613e55565b90505f614d83613948565b9050614d8f8482615b10565b60dd5f828254614d9f9190615b10565b90915550614dae905082613f65565b6111a66139c1565b614de07f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361253c565b158015614e145750614e127f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361253c565b155b156124ba57604051631d006fdb60e31b815260040160405180910390fd5b614e3a613bc7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861494e3390565b815460018301545f9190614e838483615b5b565b855561190d61446e8383615357565b5f821580614ea65750816401000000001783145b15614eb257505f610ebf565b63ffffffff8316808303614f2057602184901c60015b60018216158015614ed857508115155b15614ee957600191821c9101614ec8565b6020614ef58282615b10565b9690961c90951b9485614f0b6224ea0083615b6e565b614f159087615b10565b179350505050610ebf565b6224ea00614f2e8285615b5b565b614f389190615db7565b614f43906020615b10565b6001901b198416915050610ebf565b5f54610100900460ff166124ba575f80fd5b5f54610100900460ff16614f76575f80fd5b6124ba6154d4565b604080518082019091525f8082526020820152825160208401515f91614fa8916132d19082615b10565b8085529050614fb78184615b5b565b6020850152509192915050565b815460018301545f919082614fd98583615b5b565b9050614fe58184615357565b614fef8385615357565b614ff99190615b5b565b60019096015550929392505050565b5f61100583670de0b6b3a764000084613896565b604080518082019091525f8082526020820152602083015183515f9161504191615b10565b90505f61504e8483615b5b565b855190915061505f90829084613896565b80865261506c9082615b5b565b602086015250929392505050565b335f90815260cc602052604081208054839190839061509a908490615b5b565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615ed2833981519152906110669086815260200190565b5f6150e784611077565b9050336001600160a01b03831614615154576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151525761512e8282615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61515e84826153a5565b615168828261541e565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614256565b5f336001600160a01b03831614615253576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146152515761522d8582615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61525c846122af565b9050805f03615269575f80fd5b61527381856153a5565b61527d828561541e565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614256565b615306828261253c565b611ccf57615313816154f2565b61531e836020615504565b60405160200161532f929190615e53565b6040516020818303038152906040525f80fd5b5f8183116153505781611005565b5090919050565b5f8183106153505781611005565b5f61100583670de0b6b3a764000084613a27565b805160208201515f919061538d8282615357565b611d3e9083615b5b565b60975460ff166124ba575f80fd5b6153ad613bc7565b6153b5614cb9565b6153c06112b5613e55565b5f6153c9613948565b90505f838260dd546153db9190615b10565b6153e59190615b5b565b90508060d45460d3546153f89190615b10565b111561541657604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc602052604081208054839290615445908490615b5b565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615ed2833981519152906020015b60405180910390a35050565b8060cb5f8282546154969190615b10565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615ed28339815191529101615479565b5f54610100900460ff166154e6575f80fd5b6097805460ff19169055565b6060610ebf6001600160a01b03831660145b60605f615512836002615b6e565b61551d906002615b10565b67ffffffffffffffff81111561553557615535615be1565b6040519080825280601f01601f19166020018201604052801561555f576020820181803683370190505b509050600360fc1b815f8151811061557957615579615ea8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106155a7576155a7615ea8565b60200101906001600160f81b03191690815f1a9053505f6155c9846002615b6e565b6155d4906001615b10565b90505b600181111561564b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061560857615608615ea8565b1a60f81b82828151811061561e5761561e615ea8565b60200101906001600160f81b03191690815f1a90535060049490941c9361564481615ebc565b90506155d7565b508315611005575f80fd5b6001600160a01b0381168114611d78575f80fd5b5f6020828403121561567a575f80fd5b813561100581615656565b5f60208284031215615695575f80fd5b81356001600160e01b031981168114611005575f80fd5b80356001600160801b03811681146156c2575f80fd5b919050565b5f602082840312156156d7575f80fd5b611005826156ac565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615725575f80fd5b5035919050565b5f806040838503121561573d575f80fd5b823561574881615656565b946020939093013593505050565b5f8083601f840112615766575f80fd5b50813567ffffffffffffffff81111561577d575f80fd5b602083019150836020828501011115612426575f80fd5b5f80602083850312156157a5575f80fd5b823567ffffffffffffffff8111156157bb575f80fd5b6157c785828601615756565b90969095509350505050565b5f805f805f60a086880312156157e7575f80fd5b853594506020860135935060408601359250606086013561580781615656565b9150608086013561581781615656565b809150509295509295909350565b5f805f60608486031215615837575f80fd5b833561584281615656565b9250602084013561585281615656565b929592945050506040919091013590565b803560ff811681146156c2575f80fd5b5f60208284031215615883575f80fd5b61100582615863565b5f806040838503121561589d575f80fd5b8235915060208301356158af81615656565b809150509250929050565b5f805f80608085870312156158cd575f80fd5b84359350602085013592506040850135915060608501356158ed81615656565b939692955090935050565b5f805f6060848603121561590a575f80fd5b833561591581615656565b925060208401359150604084013561592c81615656565b809150509250925092565b5f8060408385031215615948575f80fd5b50508035926020909101359150565b5f60208284031215615967575f80fd5b81358015158114611005575f80fd5b5f805f805f805f805f806101208b8d031215615990575f80fd5b8a3567ffffffffffffffff8111156159a6575f80fd5b6159b28d828e01615756565b909b5099506159c5905060208c01615863565b97506159d360408c016156ac565b965060608b01356159e381615656565b955060808b0135945060a08b013593506159ff60c08c016156ac565b925060e08b013591506101008b013590509295989b9194979a5092959850565b5f805f60608486031215615a31575f80fd5b833592506020840135615a4381615656565b9150604084013561592c81615656565b5f805f805f805f60e0888a031215615a69575f80fd5b8735615a7481615656565b96506020880135615a8481615656565b95506040880135945060608801359350615aa060808901615863565b925060a0880135915060c0880135905092959891949750929550565b5f8060408385031215615acd575f80fd5b8235615ad881615656565b915060208301356158af81615656565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ebf57610ebf615afc565b600181811c90821680615b3757607f821691505b602082108103615b5557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610ebf57610ebf615afc565b8082028115828204841417610ebf57610ebf615afc565b5f600160ff1b8201615b9957615b99615afc565b505f0390565b8181035f831280158383131683831282161715613e1257613e12615afc565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156119f657805f5260205f20601f840160051c81016020851015615c1a5750805b601f840160051c820191505b81811015613d94575f8155600101615c26565b815167ffffffffffffffff811115615c5357615c53615be1565b615c6781615c618454615b23565b84615bf5565b602080601f831160018114615c9a575f8415615c835750858301515b5f19600386901b1c1916600185901b178555612844565b5f85815260208120601f198616915b82811015615cc857888601518255948401946001909101908401615ca9565b5085821015615ce557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b03828116828216039080821115613e1257613e12615afc565b5f60208284031215615d43575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215615d7f575f80fd5b505080516020909101519092909150565b5f82615d9e57615d9e615ae8565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615dc557615dc5615ae8565b500490565b5f808354615dd781615b23565b60018281168015615def5760018114615e0457615e30565b60ff1984168752821515830287019450615e30565b875f526020805f205f5b85811015615e275781548a820152908401908201615e0e565b50505082870194505b50929695505050505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f615e846017830185615e3c565b7001034b99036b4b9b9b4b733903937b6329607d1b815261190d6011820185615e3c565b634e487b7160e01b5f52603260045260245ffd5b5f81615eca57615eca615afc565b505f19019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204485d3d9d92eeb57ec453d55009460985e73455784e22d97a9959ce3f189d91364736f6c63430008190033", - "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610539575f3560e01c80636e76fc8f116102bf578063b2a02ff111610186578063d5164184116100ef578063e63ab1e9116100a9578063ef8b30f711610084578063ef8b30f714610d5e578063f3fdb15a14610d71578063fb0fc4c314610d84578063fea45d9414610d9b575f80fd5b8063e63ab1e914610d26578063e94b3c2114610d4d578063eee8c9e014610d56575f80fd5b8063d516418414610c92578063d547741f14610ca5578063d6b7494f14610cb8578063d905777e14610cc1578063dd62ed3e14610ce9578063e00b262514610d13575f80fd5b8063c63d75b611610140578063c63d75b614610831578063c6e6f59214610bf7578063ccfd8b1114610c0a578063ce96cb7714610c3b578063d2681a0b14610c4e578063d505accf14610c7f575f80fd5b8063b2a02ff114610b85578063b3d7f6b914610b98578063b460af9414610bab578063ba08765214610bbe578063bee36bb314610bd1578063bf722ca214610be4575f80fd5b806391d1485411610228578063a16a8850116101e2578063a16a885014610b27578063a1bab44714610b3c578063a1e8f02b14610b4f578063a217fddf14610b58578063a9059cbb14610b5f578063acb7081514610b72575f80fd5b806391d1485414610ac0578063926bb63314610ad357806394bf804d14610ae657806395d89b4114610af957806397bce8d014610b01578063a05a091a14610b14575f80fd5b80637ecebe00116102795780637ecebe0014610a6b5780638456cb5914610a8a5780638a1baa4614610a925780638bcd401614610a9b5780638c3cba5a14610aae5780638d0e5f0214610ab7575f80fd5b80636e76fc8f146109c05780636eb9ffeb146109e757806370a0823114610a1357806378007e2314610a325780637ad226dc14610a455780637e932d3214610a58575f80fd5b8063313ce567116104035780634322b7141161036c5780635cc2ef83116103265780635cc2ef83146109225780635e5c06e21461093557806361d027b31461097e57806366601032146109915780636bb65f531461099a5780636e553f65146109ad575f80fd5b80634322b7141461085857806347dffde01461088a5780634914c0081461089d5780634cdad506146108b05780634e7c5059146108c35780635c975abb14610917575f80fd5b80633aa18d6f116103bd5780633aa18d6f146107e65780633c6f317f146107ef5780633ec045a6146108025780633f4ba83a14610829578063402d267d1461083157806342da42bf14610845575f80fd5b8063313ce5671461073e57806333eeb1471461076557806334f7d1f2146107795780633644e5151461078c57806336568abe1461079457806338d52e0f146107a7575f80fd5b806313700101116104a5578063248a9ca31161045f578063248a9ca3146106bb57806325fc07a9146106dd57806328acf2cf146106fc5780632c5dcc771461070f5780632e0af008146107225780632f2ff15d1461072b575f80fd5b8063137001011461065d57806318160ddd146106705780631a5b9e62146106795780631a90f1861461068c5780631d43b30b1461069557806323b872dd146106a8575f80fd5b806307a2d13a116104f657806307a2d13a146105d6578063095ea7b3146105e95780630a28a477146105fc5780630ab69be81461060f5780630e52dbec146106365780630f2b75aa14610655575f80fd5b8063014a296f1461053d57806301e1d1141461056a57806301ffc9a714610580578063022d8af5146105a35780630539fa8c146105b857806306fdde03146105c1575b5f80fd5b61055061054b36600461566a565b610dae565b604080519283526020830191909152015b60405180910390f35b610572610de3565b604051908152602001610561565b61059361058e366004615685565b610e8f565b6040519015158152602001610561565b6105b66105b13660046156c7565b610ec5565b005b61057260d85481565b6105c9610f54565b60405161056191906156e0565b6105726105e4366004615715565b610fe0565b6105936105f736600461572c565b61100c565b61057261060a366004615715565b611077565b61055061061d366004615715565b5f90815260d16020526040902080546001909101549091565b60da546106439060ff1681565b60405160ff9091168152602001610561565b610572611096565b6105b661066b366004615794565b61113b565b61057260cb5481565b6105726106873660046157d3565b6111ac565b61057260d45481565b6105726106a336600461566a565b6116b5565b6105936106b6366004615825565b6117b5565b6105726106c9366004615715565b5f9081526065602052604090206001015490565b6105726106eb366004615715565b5f90815260d1602052604090205490565b6105b661070a366004615873565b611916565b6105b661071d36600461572c565b611962565b61057260dd5481565b6105b661073936600461588c565b6119d2565b6106437f000000000000000000000000000000000000000000000000000000000000000081565b60e35461059390600160a01b900460ff1681565b6105726107873660046158ba565b6119fb565b610572611c57565b6105b66107a236600461588c565b611cb1565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610561565b61057260d95481565b6105726107fd3660046158ba565b611cd3565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6105b6611d46565b61057261083f36600461566a565b505f1990565b6105b6610853366004615715565b611d7b565b60dc5461087290600160801b90046001600160801b031681565b6040516001600160801b039091168152602001610561565b610572610898366004615715565b611dba565b6105726108ab3660046158f8565b611dd8565b6105726108be366004615715565b6122af565b6108f76108d1366004615715565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610561565b60975460ff16610593565b6105b6610930366004615937565b6122b9565b61096361094336600461566a565b60d26020525f908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610561565b60e1546107ce906001600160a01b031681565b61057260e25481565b60e3546107ce906001600160a01b031681565b6105726109bb36600461588c565b612313565b6105727f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da546109fe90600160281b900463ffffffff1681565b60405163ffffffff9091168152602001610561565b610572610a2136600461566a565b60cc6020525f908152604090205481565b610572610a40366004615715565b6123b9565b610550610a5336600461588c565b6123d0565b6105b6610a66366004615957565b61242d565b610572610a7936600461566a565b60ce6020525f908152604090205481565b6105b66124aa565b61057260d55481565b6105b6610aa936600461566a565b6124bc565b61057260d35481565b61057260df5481565b610593610ace36600461588c565b61253c565b6105b6610ae136600461566a565b612566565b610572610af436600461588c565b61284c565b6105c96128e7565b6105b6610b0f366004615976565b6128f4565b610572610b223660046157d3565b612a55565b60da546109fe90610100900463ffffffff1681565b6105b6610b4a366004615715565b612e8d565b61057260d75481565b6105725f81565b610593610b6d36600461572c565b612ecc565b610550610b8036600461588c565b613021565b6105b6610b93366004615825565b61303d565b610572610ba6366004615715565b613051565b610572610bb9366004615a1f565b613067565b610572610bcc366004615a1f565b61316c565b6105b6610bdf36600461566a565b613266565b610572610bf2366004615715565b6132ba565b610572610c05366004615715565b6132d9565b610550610c1836600461588c565b60cf60209081525f92835260408084209091529082529020805460019091015482565b610572610c4936600461566a565b6132f0565b610550610c5c36600461588c565b60d060209081525f92835260408084209091529082529020805460019091015482565b6105b6610c8d366004615a53565b613311565b610572610ca0366004615a1f565b6134d6565b6105b6610cb336600461588c565b61372f565b61057260d65481565b610572610ccf36600461566a565b6001600160a01b03165f90815260cc602052604090205490565b610572610cf7366004615abc565b60cd60209081525f928352604080842090915290825290205481565b6105b6610d213660046156c7565b613753565b6105727f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61057260de5481565b6105726137ab565b610572610d6c366004615715565b61388c565b60db546107ce906001600160a01b031681565b60da546109fe90600160481b900463ffffffff1681565b60dc54610872906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610dd190610fe0565b610dda846116b5565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610e55575f81815260d160205260409020600381015480831115610e4957824210610e2f578160020154610e44565b6002820154610e449042839003838603613896565b860195505b50506224ea0001610dfd565b50610e7860e254670de0b6b3a76400000360d454610e716137ab565b03906138b4565b610e806138c8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610ebf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610ecf8161393e565b610ed7613948565b60dd5f828254610ee79190615b10565b90915550610ef590506139c1565b60dc80546fffffffffffffffffffffffffffffffff19166001600160801b0384169081179091556040519081527f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e906020015b60405180910390a15050565b60c98054610f6190615b23565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8d90615b23565b8015610fd85780601f10610faf57610100808354040283529160200191610fd8565b820191905f5260205f20905b815481529060010190602001808311610fbb57829003601f168201915b505050505081565b60cb545f90801561100357610ffe610ff6610de3565b849083613896565b611005565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110669086815260200190565b60405180910390a350600192915050565b60cb545f90801561100357610ffe8161108e610de3565b859190613a27565b60dd5460de545f9190828183106110af5760d8546110b3565b60d9545b60da549091505f906110ee906110d690600160481b900463ffffffff1642615b5b565b6110e09084615b6e565b6110e990615b85565b613a54565b61110090670de0b6b3a7640000615b9f565b905061110c81856138b4565b61112861112183670de0b6b3a7640000615b5b565b85906138b4565b6111329190615b10565b94505050505090565b5f6111458161393e565b8282604051602001611158929190615bbe565b60405160208183030381529060405260c990816111759190615c39565b508282604051602001611189929190615cf5565b60405160208183030381529060405260ca90816111a69190615c39565b50505050565b5f6111b5613bc7565b6111bd613bd6565b845f036111dd5760405163774257f760e01b815260040160405180910390fd5b60da546111f190879060ff1660035f613c01565b5f86815260d1602052604090206112088188613d9b565b60dd5f8282546112189190615b10565b909155505060e3546001600160a01b0316801561128657604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b15801561126f575f80fd5b505af1158015611281573d5f803e3d5ffd5b505050505b5f6112918389613e19565b90508015611324575f8160d3546112a89190615b10565b90506112ba6112b5613e55565b613f65565b60dc546112f5906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b60dd54906001600160801b03166138b4565b60d4546113029083615b10565b111561132057604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061132f611096565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff1661137d8a600101548b5f015489613fa2565b6113878888613fcf565b611394898960d354613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa1580156113ea573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140e9190615d33565b905061143361142c611420428f615b5b565b83906301e13380613896565b8c906138b4565b935050505080886114449190615b10565b93508684111561146757604051632c1b6b4160e21b815260040160405180910390fd5b6114718585614003565b5f89815260d0602090815260408083206001600160a01b0389168452909152812080549091036114c8576001600160a01b0386165f90815260d26020526040902060018101546114c1908c614079565b6001909101555b5f8061150b6114d685614164565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614190565b91509150815f1461152f5781866002015f8282546115299190615b10565b90915550505b611538816141dc565b60405180604001604052808c855f01546115529190615b10565b81526020018585600101546115679190615b10565b90525f8d815260d0602090815260408083206001600160a01b038d811680865291845293829020855181559483015160019095019490945580513381529182018f905281018790529194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139060600160405180910390a46115ee6139c1565b6115f789614208565b604051637b9d893160e01b81523060048201526001600160a01b0386811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b15801561165d575f80fd5b505af115801561166f573d5f803e3d5ffd5b506116a99250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614256565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b811561178a57600182161561176f575f81815260d0602090815260408083206001600160a01b038a16845290915281206001810154815491929161172a9190615b10565b90506117368188615b10565b96508242111561176c5761175f8561174e8542615b5b565b6117589190615b6e565b82906138b4565b6117699088615b10565b96505b50505b60019190911c906117836224ea0082615b10565b90506116e6565b600284015480156117ab5761179e81611dba565b6117a89087615b10565b95505b5050505050919050565b5f6117be613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530866117f8866122af565b6040518463ffffffff1660e01b815260040161181693929190615d4a565b5f6040518083038186803b15801561182c575f80fd5b505afa15801561183e573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561190257604051630149e46f60e01b81526001600160a01b038681166004830152821690630149e46f906024015f604051808303815f87803b158015611895575f80fd5b505af11580156118a7573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b1580156118eb575f80fd5b505af11580156118fd573d5f803e3d5ffd5b505050505b61190d858585614298565b95945050505050565b5f6119208161393e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610f48565b5f61196c8161393e565b6119776112b5613e55565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119ec8161393e565b6119f68383614372565b505050565b5f611a04613bc7565b611a0c613bd6565b835f03611a2c576040516356316e8760e01b815260040160405180910390fd5b60da54611a4090869060ff1660035f613c01565b5f85815260d16020526040812090611a588288613d9b565b90508060dd5f828254611a6b9190615b10565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f918291611ab0918a906143f7565b9092509050611abf8289615b10565b945086851015611ae257604051632c1b6b4160e21b815260040160405180910390fd5b611aec8489614448565b60d35f828254611afc9190615b5b565b90915550611b0c90508183615b10565b846002015f828254611b1e9190615b5b565b925050819055508060d55f828254611b369190615b10565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611b8b576001600160a01b0387165f90815260d2602052604090208054611b88908c614079565b90555b88815f015f828254611b9d9190615b10565b9250508190555082816001015f828254611bb79190615b10565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611c0c6139c1565b611c158a614208565b611c4a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614478565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611c8c57611c876144be565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611cc5575f80fd5b611ccf8282614557565b5050565b5f611cdc613bc7565b60da54611cf190869060ff1660036002613c01565b611cff8585858560016145bd565b9050611d096139c1565b611d3e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611d708161393e565b611d78614919565b50565b5f611d858161393e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610f48565b60df545f90801561100357610ffe611dd06137ab565b849083613a27565b5f611de1613bc7565b6001600160a01b0384163303611e0a576040516344511af160e01b815260040160405180910390fd5b60405163042dcf6b60e31b81523060048201526001600160a01b0383811660248301528581166044830152606482018590527f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890608401602060405180830381865afa158015611e83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea79190615d33565b9250825f03611ec95760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611f0357508515155b15612010576001821615611ff5575f81421015611f3a57611f278288898b5f6145bd565b9050611f338188615b5b565b9650611fe7565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611f6c9190615b10565b9150505f611f9360d6548542611f829190615b5b565b611f8c9190615b6e565b83906138b4565b611f9d9083615b10565b9050888111611fac5788611fb7565b611fb7898383613896565b9250825f03611fc8575f9850611fe4565b611fd584848b8d5f6145bd565b9250611fe1838a615b5b565b98505b50505b611ff18186615b10565b9450505b60019190911c906120096224ea0082615b10565b9050611ef5565b505083158015906120245750600281015415155b15612059575f612033856132ba565b90508015612057575f6120468288614966565b5090506120538185615b10565b9350505b505b604051636e1b003160e01b81523060048201526001600160a01b0384811660248301528681166044830152606482018490525f9182917f00000000000000000000000000000000000000000000000000000000000000001690636e1b0031906084016040805180830381865afa1580156120d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f99190615d6e565b915091508160d55f82825461210e9190615b10565b9091555050306001600160a01b038616036121345761212f30338984614ac0565b612199565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906121649033908b908690600401615d4a565b5f604051808303815f87803b15801561217b575f80fd5b505af115801561218d573d5f803e3d5ffd5b505050506121996139c1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b0388811660048301527f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906024015f604051808303815f87803b15801561224c575f80fd5b505af115801561225e573d5f803e3d5ffd5b505050506122a5333084876122739190615b10565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614478565b5050509392505050565b5f610ebf82610fe0565b5f6122c38161393e565b6122cb614cb9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61231d8361388c565b9050805f0361232a575f80fd5b61235f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614478565b6123698282614ce4565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8382614d57565b60df545f90801561100357610ffe8161108e6137ab565b5f806123da613bc7565b6123e48484614966565b90925090506123f16139c1565b6124266001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614478565b9250929050565b5f6124378161393e565b60e35460ff600160a01b90910416151582151514611ccf5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee6989061249e90851515815260200190565b60405180910390a25050565b6124b2614db6565b6124ba614e32565b565b5f6124c68161393e565b60db546001600160a01b0316156124e2576124e26112b5613e55565b60db80546001600160a01b0319166001600160a01b0384161790556125056139c1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146125af576040516317568c8f60e21b815260040160405180910390fd5b6125b7613948565b60dd5f8282546125c79190615b10565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b81156127a3576001821615612788575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916126439190615b10565b90508086106127855760e3546001600160a01b031680156126b557604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b15801561269e575f80fd5b505af11580156126b0573d5f803e3d5ffd5b505050505b6126bf8288615b5b565b96506126cb8287615b10565b83545f86815260d1602052604090209197506126e79190614e6f565b60d35f8282546126f79190615b5b565b90915550505f84815260d0602090815260408083206001600160a01b038d16845290915281208181556001908101919091558801546127369085614e92565b600189015560408051838152602081018490526001600160a01b038b1691339187917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a4505b50505b60019190911c9061279c6224ea0082615b10565b90506125ff565b6002850154158015906127c057506127ba846132ba565b93508315155b156127e1575f6127d08588614966565b5090506127dd8185615b10565b9350505b821561283c578260d55f8282546127f89190615b5b565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b6128446139c1565b505050505050565b5f61285683613051565b905061288d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b6128978284614ce4565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8184614d57565b60ca8054610f6190615b23565b5f54610100900460ff161580801561291257505f54600160ff909116105b8061292b5750303b15801561292b57505f5460ff166001145b612933575f80fd5b5f805460ff191660011790558015612954575f805461ff0019166101001790555b61295c614f52565b612964614f64565b60da805468ffffffffffffffff0019166101004263ffffffff1690810268ffffffff0000000000191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129b95f33614372565b6129c38b8b61113b565b6129cc89611916565b6129d588610ec5565b6129de876124bc565b6129e786612e8d565b6129f085611d7b565b6129f984613753565b612a0383836122b9565b8015612a48575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a5e613bc7565b845f03612a7e5760405163b8cb621960e01b815260040160405180910390fd5b60da54612a9390879060ff1660036002613c01565b5f86815260d160205260409020612aaa8188613d9b565b60dd5f828254612aba9190615b10565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612b049190615b10565b871115612b1f5760208101518151612b1c9190615b10565b96505b6040805180820190915281518152602080830151908201525f90612b4f90612b47908a614f7e565b518490614fc4565b60d354612b5c9190615b10565b905060dd5460d45482612b6f9190615b10565b1115612b8d57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612cba575f612ba1611096565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bf58a600101548b5f01548a613fa2565b612bff8989613fcf565b612c0a8a8a8a613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa158015612c60573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c849190615d33565b9050612caf612c96611420428f615b5b565b612ca890670de0b6b3a7640000615b10565b8c90615008565b965050505050612cbe565b8692505b85831015612cdf57604051632c1b6b4160e21b815260040160405180910390fd5b612ce98484614003565b5f80612d35612d00612cfb878c615b5b565b614164565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614190565b9150915081846002015f828254612d4c9190615b10565b90915550612d5b9050816141dc565b612d65838a61501c565b5060208301518351175f03612db8575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612db1908c614e92565b9055612de8565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b60408051338152602081018b90529081018690526001600160a01b0380881691908916908c907fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c9060600160405180910390a4612e436139c1565b612e4c8a614208565b612e806001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614256565b5050505095945050505050565b5f612e978161393e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610f48565b5f612ed5613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612f0f866122af565b6040518463ffffffff1660e01b8152600401612f2d93929190615d4a565b5f6040518083038186803b158015612f43575f80fd5b505afa158015612f55573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561301757604051630149e46f60e01b81523360048201526001600160a01b03821690630149e46f906024015f604051808303815f87803b158015612faa575f80fd5b505af1158015612fbc573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b158015613000575f80fd5b505af1158015613012573d5f803e3d5ffd5b505050505b611d3e848461507a565b5f8061302b613bc7565b6123e4613037856132ba565b84614966565b613045613bc7565b6119f633848484614ac0565b60cb545f90801561100357610ffe611dd0610de3565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db5906130b990309086908990600401615d4a565b5f6040518083038186803b1580156130cf575f80fd5b505afa1580156130e1573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561314f57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613138575f80fd5b505af115801561314a573d5f803e3d5ffd5b505050505b61315a8585856150dd565b91506131646139c1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530846131a7886122af565b6040518463ffffffff1660e01b81526004016131c593929190615d4a565b5f6040518083038186803b1580156131db575f80fd5b505afa1580156131ed573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561325b57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613244575f80fd5b505af1158015613256573d5f803e3d5ffd5b505050505b61315a8585856151e7565b5f6132708161393e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f90801561100357610ffe816132d16137ab565b859190613896565b60cb545f90801561100357610ffe816132d1610de3565b6001600160a01b0381165f90815260cc6020526040812054610ebf90610fe0565b4284101561331d575f80fd5b5f6001613328611c57565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613430573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134665750876001600160a01b0316816001600160a01b0316145b61346e575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134df613bc7565b6134e7613bd6565b6134f18285614003565b60e3546001600160a01b0316801561355a57604051636c912dad60e01b81526001600160a01b038481166004830152821690636c912dad906024015f604051808303815f87803b158015613543575f80fd5b505af1158015613555573d5f803e3d5ffd5b505050505b6135656112b5613e55565b61356e856123b9565b91505f8560d45461357f9190615b10565b60d481905560dc549091506135b0906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b8160d3546135be9190615b10565b11156135dc57604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135ed9190615b10565b90915550506001600160a01b0384165f90815260d260205260408120600201805485929061361c908490615b10565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136746139c1565b604051637b9d893160e01b81523060048201526001600160a01b0385811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b1580156136da575f80fd5b505af11580156136ec573d5f803e3d5ffd5b506137269250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614256565b50509392505050565b5f828152606560205260409020600101546137498161393e565b6119f68383614557565b5f61375d8161393e565b60dc80546001600160801b03908116600160801b918516918202179091556040519081527fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90602001610f48565b60d45460dd5460da545f929190839061387890613871906137d990600160281b900463ffffffff1642615b5b565b60db546301e13380906001600160a01b0316637c21fb1d6137fa888a613fcf565b613807898b60d354613fe7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613846573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061386a9190615d33565b9190613896565b84906138b4565b90506138848184615b10565b935050505090565b5f610ebf826132d9565b8282028115158415858304851417166138ad575f80fd5b0492915050565b5f6110058383670de0b6b3a7640000613896565b60da545f9081906138e490610100900463ffffffff1642615b5b565b9050805f036138f4575f91505090565b60da5461393890829061392490613912906224ea009060ff16615b6e565b60dc546001600160801b0316906138b4565b61392e9084615b10565b60d5549190613896565b91505090565b611d7881336152fc565b5f6139516138c8565b90508060d55f8282546139649190615b5b565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a3e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a6d57505f919050565b680755bf798b4a1bf1e58212613a81575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156124ba575f80fd5b60e354600160a01b900460ff16156124ba5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613c0f6224ea0086615d90565b15613c1c57506001613c6f565b428511613c2b57506002613c6f565b613c3b60ff85166224ea00615b6e565b613c486224ea0042615d90565b613c529042615b5b565b613c5c9190615b10565b851115613c6b57506004613c6f565b5060035b826004811115613c8157613c81615da3565b816004811115613c9357613c93615da3565b14158015613cc35750816004811115613cae57613cae615da3565b816004811115613cc057613cc0615da3565b14155b15613d94575f826004811115613cdb57613cdb615da3565b03613d2f57806004811115613cf257613cf2615da3565b836004811115613d0457613d04615da3565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d4157613d41615da3565b836004811115613d5357613d53615da3565b836004811115613d6557613d65615da3565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d26565b5050505050565b60038201545f9042831115613def5760028401544260038601819055613dd890613dc6908490615b5b565b613dd08487615b5b565b839190613896565b9250613de48382615b5b565b600286015550613e12565b828103613dfe575f9150613e12565b600384018390556002840180545f90915591505b5092915050565b81545f9081613e288483615b10565b9050613e41613e3b838760010154615342565b82615357565b613e4b9082615b5b565b9455509192915050565b60d45460dd545f919082613e698284613fcf565b60da549091505f90613ebb9061112190613e9090600160281b900463ffffffff1642615b5b565b60db5460d3546301e13380916001600160a01b031690637c21fb1d908890613807908b908d90613fe7565b9050613ec78185615b10565b9350613ede60e254826138b490919063ffffffff16565b945084613eeb8285615b10565b613ef59190615b5b565b60dd5560d484905560da805468ffffffff00000000001916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611d785760e154613f89906001600160a01b0316613f848361388c565b614ce4565b8060dd5f828254613f9a9190615b10565b909155505050565b5f8115801590613fb157508383115b613fbb575f611d3e565b611d3e82613fc98686615b5b565b90615365565b5f825f03613fdd575f611005565b6110058284615365565b5f835f03613ff5575f611d3e565b611d3e84613fc98486615b10565b336001600160a01b03831614611ccf576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146119f65761404782611077565b6140519082615b5b565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f0361408f57506401000000008117610ebf565b63ffffffff83168083101561410d575f6224ea006140ad8584615b5b565b6140b79190615db7565b90506140c581610100615b5b565b85901c156140e65760405163293cc41f60e21b815260040160405180910390fd5b6140f1816020615b10565b602086901c901b94508484176401000000001792505050610ebf565b5f6224ea0061411c8386615b5b565b6141269190615db7565b905060df81111561414a5760405163293cc41f60e21b815260040160405180910390fd5b614155816020615b10565b6001901b851792505050610ebf565b5f8061417b60e254846138b490919063ffffffff16565b905061418681613f65565b6110058184615b5b565b5f8082156141c4576141bf6141ad6141a787615379565b85615357565b6141b79085615b5b565b859085613896565b6141c6565b5f5b90506141d28185615b5b565b9150935093915050565b805f036141e65750565b60e254156141f757611d7881613f65565b8060d55f828254613f9a9190615b10565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806111a6575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142f1576142cd8382615b5b565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614318908490615b5b565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615ed28339815191529061435f9087815260200190565b60405180910390a3506001949350505050565b61437c828261253c565b611ccf575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143b33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f61440386615379565b9050801561443f576144246144188683615357565b60408801519083613896565b925061443083856138b4565b915061443c8284615b5b565b92505b50935093915050565b815460018301545f919061445c8482615b10565b600186015561190d61446e8383615357565b6141a79084615b5b565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d94575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144ef9190615dca565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614561828261253c565b15611ccf575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145de5760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906145f68289613d9b565b90508060dd5f8282546146099190615b10565b90915550505f88815260d0602090815260408083206001600160a01b038916845282528083208151808301909252805480835260019091015492820183905290929161465f918b9161465a91615b10565b615357565b6040805180820190915283518152602080850151908201529091505f906146869083614f7e565b5160e3549091506001600160a01b031680156146f357604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b1580156146dc575f80fd5b505af11580156146ee573d5f803e3d5ffd5b505050505b8b42101561479b5787156147935760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147419186906143f7565b90925090506147508183615b10565b886002015f8282546147629190615b5b565b925050819055508060d55f82825461477a9190615b10565b9091555061478a90508286615b5b565b985050506147e2565b8296506147e2565b60d6546147b6906147ac8e42615b5b565b6138719190615b6e565b6147c09084615b10565b96506147cc8388615b5b565b60d55f8282546147dc9190615b10565b90915550505b8987111561480357604051632c1b6b4160e21b815260040160405180910390fd5b61480d8683614e6f565b60d35f82825461481d9190615b5b565b9091555061482d9050848461501c565b5060208401518451175f03614889575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d29092529091209081015461487e908e614e92565b6001909101556148b9565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a461490a8c614208565b50505050505095945050505050565b614921615397565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001613a1d565b60e3545f9081906001600160a01b031680156149d357604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b1580156149bc575f80fd5b505af11580156149ce573d5f803e3d5ffd5b505050505b6149de6112b5613e55565b6001600160a01b0384165f90815260d2602052604090206002810154614a048782615357565b9350614a0f84611dba565b9450845f03614a315760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a429190615b5b565b90915550614a5290508482615b5b565b82600201819055508360df5f828254614a6b9190615b5b565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614ae05760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b0385811660048301523060248301527f0000000000000000000000000000000000000000000000000000000000000000169063e16ee720906044015f6040518083038186803b158015614b45575f80fd5b505afa158015614b57573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bc557604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614bae575f80fd5b505af1158015614bc0573d5f803e3d5ffd5b505050505b5f614bcf83611077565b9050614bdb83826153a5565b614be5848261541e565b60408051848152602081018390526001600160a01b03808716929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c7591815260200190565b60405180910390a3614c856139c1565b6128446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614256565b614cc1611096565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d4d57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614d36575f80fd5b505af1158015614d48573d5f803e3d5ffd5b505050505b6119f68383615485565b614d5f613bc7565b614d67613bd6565b614d6f614cb9565b5f614d78613e55565b90505f614d83613948565b9050614d8f8482615b10565b60dd5f828254614d9f9190615b10565b90915550614dae905082613f65565b6111a66139c1565b614de07f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361253c565b158015614e145750614e127f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361253c565b155b156124ba57604051631d006fdb60e31b815260040160405180910390fd5b614e3a613bc7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861494e3390565b815460018301545f9190614e838483615b5b565b855561190d61446e8383615357565b5f821580614ea65750816401000000001783145b15614eb257505f610ebf565b63ffffffff8316808303614f2057602184901c60015b60018216158015614ed857508115155b15614ee957600191821c9101614ec8565b6020614ef58282615b10565b9690961c90951b9485614f0b6224ea0083615b6e565b614f159087615b10565b179350505050610ebf565b6224ea00614f2e8285615b5b565b614f389190615db7565b614f43906020615b10565b6001901b198416915050610ebf565b5f54610100900460ff166124ba575f80fd5b5f54610100900460ff16614f76575f80fd5b6124ba6154d4565b604080518082019091525f8082526020820152825160208401515f91614fa8916132d19082615b10565b8085529050614fb78184615b5b565b6020850152509192915050565b815460018301545f919082614fd98583615b5b565b9050614fe58184615357565b614fef8385615357565b614ff99190615b5b565b60019096015550929392505050565b5f61100583670de0b6b3a764000084613896565b604080518082019091525f8082526020820152602083015183515f9161504191615b10565b90505f61504e8483615b5b565b855190915061505f90829084613896565b80865261506c9082615b5b565b602086015250929392505050565b335f90815260cc602052604081208054839190839061509a908490615b5b565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615ed2833981519152906110669086815260200190565b5f6150e784611077565b9050336001600160a01b03831614615154576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151525761512e8282615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61515e84826153a5565b615168828261541e565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614256565b5f336001600160a01b03831614615253576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146152515761522d8582615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61525c846122af565b9050805f03615269575f80fd5b61527381856153a5565b61527d828561541e565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614256565b615306828261253c565b611ccf57615313816154f2565b61531e836020615504565b60405160200161532f929190615e53565b6040516020818303038152906040525f80fd5b5f8183116153505781611005565b5090919050565b5f8183106153505781611005565b5f61100583670de0b6b3a764000084613a27565b805160208201515f919061538d8282615357565b611d3e9083615b5b565b60975460ff166124ba575f80fd5b6153ad613bc7565b6153b5614cb9565b6153c06112b5613e55565b5f6153c9613948565b90505f838260dd546153db9190615b10565b6153e59190615b5b565b90508060d45460d3546153f89190615b10565b111561541657604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc602052604081208054839290615445908490615b5b565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615ed2833981519152906020015b60405180910390a35050565b8060cb5f8282546154969190615b10565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615ed28339815191529101615479565b5f54610100900460ff166154e6575f80fd5b6097805460ff19169055565b6060610ebf6001600160a01b03831660145b60605f615512836002615b6e565b61551d906002615b10565b67ffffffffffffffff81111561553557615535615be1565b6040519080825280601f01601f19166020018201604052801561555f576020820181803683370190505b509050600360fc1b815f8151811061557957615579615ea8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106155a7576155a7615ea8565b60200101906001600160f81b03191690815f1a9053505f6155c9846002615b6e565b6155d4906001615b10565b90505b600181111561564b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061560857615608615ea8565b1a60f81b82828151811061561e5761561e615ea8565b60200101906001600160f81b03191690815f1a90535060049490941c9361564481615ebc565b90506155d7565b508315611005575f80fd5b6001600160a01b0381168114611d78575f80fd5b5f6020828403121561567a575f80fd5b813561100581615656565b5f60208284031215615695575f80fd5b81356001600160e01b031981168114611005575f80fd5b80356001600160801b03811681146156c2575f80fd5b919050565b5f602082840312156156d7575f80fd5b611005826156ac565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615725575f80fd5b5035919050565b5f806040838503121561573d575f80fd5b823561574881615656565b946020939093013593505050565b5f8083601f840112615766575f80fd5b50813567ffffffffffffffff81111561577d575f80fd5b602083019150836020828501011115612426575f80fd5b5f80602083850312156157a5575f80fd5b823567ffffffffffffffff8111156157bb575f80fd5b6157c785828601615756565b90969095509350505050565b5f805f805f60a086880312156157e7575f80fd5b853594506020860135935060408601359250606086013561580781615656565b9150608086013561581781615656565b809150509295509295909350565b5f805f60608486031215615837575f80fd5b833561584281615656565b9250602084013561585281615656565b929592945050506040919091013590565b803560ff811681146156c2575f80fd5b5f60208284031215615883575f80fd5b61100582615863565b5f806040838503121561589d575f80fd5b8235915060208301356158af81615656565b809150509250929050565b5f805f80608085870312156158cd575f80fd5b84359350602085013592506040850135915060608501356158ed81615656565b939692955090935050565b5f805f6060848603121561590a575f80fd5b833561591581615656565b925060208401359150604084013561592c81615656565b809150509250925092565b5f8060408385031215615948575f80fd5b50508035926020909101359150565b5f60208284031215615967575f80fd5b81358015158114611005575f80fd5b5f805f805f805f805f806101208b8d031215615990575f80fd5b8a3567ffffffffffffffff8111156159a6575f80fd5b6159b28d828e01615756565b909b5099506159c5905060208c01615863565b97506159d360408c016156ac565b965060608b01356159e381615656565b955060808b0135945060a08b013593506159ff60c08c016156ac565b925060e08b013591506101008b013590509295989b9194979a5092959850565b5f805f60608486031215615a31575f80fd5b833592506020840135615a4381615656565b9150604084013561592c81615656565b5f805f805f805f60e0888a031215615a69575f80fd5b8735615a7481615656565b96506020880135615a8481615656565b95506040880135945060608801359350615aa060808901615863565b925060a0880135915060c0880135905092959891949750929550565b5f8060408385031215615acd575f80fd5b8235615ad881615656565b915060208301356158af81615656565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ebf57610ebf615afc565b600181811c90821680615b3757607f821691505b602082108103615b5557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610ebf57610ebf615afc565b8082028115828204841417610ebf57610ebf615afc565b5f600160ff1b8201615b9957615b99615afc565b505f0390565b8181035f831280158383131683831282161715613e1257613e12615afc565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156119f657805f5260205f20601f840160051c81016020851015615c1a5750805b601f840160051c820191505b81811015613d94575f8155600101615c26565b815167ffffffffffffffff811115615c5357615c53615be1565b615c6781615c618454615b23565b84615bf5565b602080601f831160018114615c9a575f8415615c835750858301515b5f19600386901b1c1916600185901b178555612844565b5f85815260208120601f198616915b82811015615cc857888601518255948401946001909101908401615ca9565b5085821015615ce557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b03828116828216039080821115613e1257613e12615afc565b5f60208284031215615d43575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215615d7f575f80fd5b505080516020909101519092909150565b5f82615d9e57615d9e615ae8565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615dc557615dc5615ae8565b500490565b5f808354615dd781615b23565b60018281168015615def5760018114615e0457615e30565b60ff1984168752821515830287019450615e30565b875f526020805f205f5b85811015615e275781548a820152908401908201615e0e565b50505082870194505b50929695505050505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f615e846017830185615e3c565b7001034b99036b4b9b9b4b733903937b6329607d1b815261190d6011820185615e3c565b634e487b7160e01b5f52603260045260245ffd5b5f81615eca57615eca615afc565b505f19019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204485d3d9d92eeb57ec453d55009460985e73455784e22d97a9959ce3f189d91364736f6c63430008190033", - "devdoc": { - "events": { - "AccumulatorAccrual(uint256)": { - "params": { - "timestamp": "current timestamp." - } - }, - "BackupFeeRateSet(uint256)": { - "params": { - "backupFeeRate": "rate charged to the fixed pools to be accrued by the floating depositors." - } - }, - "Borrow(address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets that were borrowed.", - "borrower": "address which will be repaying the borrowed assets.", - "caller": "address which borrowed the asset.", - "receiver": "address that received the borrowed assets.", - "shares": "amount of borrow shares assigned to the account." - } - }, - "BorrowAtMaturity(uint256,address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of the asset that were borrowed.", - "borrower": "address which will be repaying the borrowed assets.", - "caller": "address which borrowed the asset.", - "fee": "extra amount that will need to be paid at maturity.", - "maturity": "maturity in which the account will have to repay the loan.", - "receiver": "address that received the borrowed assets." - } - }, - "DampSpeedSet(uint256,uint256)": { - "params": { - "dampSpeedDown": "represented with 18 decimals.", - "dampSpeedUp": "represented with 18 decimals." - } - }, - "DepositAtMaturity(uint256,address,address,uint256,uint256)": { - "params": { - "assets": "amount of the asset that were deposited.", - "caller": "address which deposited the assets.", - "fee": "is the extra amount that it will be collected at maturity.", - "maturity": "maturity at which the account will be able to collect his deposit + his fee.", - "owner": "address that will be able to withdraw the deposited assets." - } - }, - "EarningsAccumulatorSmoothFactorSet(uint256)": { - "params": { - "earningsAccumulatorSmoothFactor": "factor represented with 18 decimals." - } - }, - "FixedEarningsUpdate(uint256,uint256,uint256)": { - "params": { - "maturity": "maturity date where the earnings were updated.", - "timestamp": "current timestamp.", - "unassignedEarnings": "pending unassigned earnings." - } - }, - "FloatingDebtUpdate(uint256,uint256)": { - "params": { - "timestamp": "current timestamp.", - "utilization": "new floating utilization." - } - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "InterestRateModelSet(address)": { - "params": { - "interestRateModel": "new interest rate model to be used to calculate rates." - } - }, - "Liquidate(address,address,uint256,uint256,address,uint256)": { - "params": { - "assets": "amount of the asset that were repaid.", - "borrower": "address which had the original debt.", - "lendersAssets": "incentive paid to lenders.", - "receiver": "address which repaid the previously borrowed amount.", - "seizeMarket": "address of the asset that were seized by the liquidator.", - "seizedAssets": "amount seized of the collateral." - } - }, - "MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)": { - "params": { - "earningsAccumulator": "earnings accumulator.", - "floatingAssets": "total floating supply assets.", - "floatingBorrowShares": "total floating borrow shares.", - "floatingDebt": "total floating borrow assets.", - "floatingDepositShares": "total floating supply shares.", - "timestamp": "current timestamp." - } - }, - "MaxFuturePoolsSet(uint256)": { - "params": { - "maxFuturePools": "represented with 0 decimals." - } - }, - "Paused(address)": { - "details": "Emitted when the pause is triggered by `account`." - }, - "PenaltyRateSet(uint256)": { - "params": { - "penaltyRate": "penaltyRate percentage per second represented with 18 decimals." - } - }, - "Repay(address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets that was repaid.", - "borrower": "address which had the original debt.", - "caller": "address which repaid the previously borrowed amount.", - "shares": "amount of borrow shares that were subtracted from the account's accountability." - } - }, - "RepayAtMaturity(uint256,address,address,uint256,uint256)": { - "params": { - "assets": "amount that was repaid.", - "borrower": "address which had the original debt.", - "caller": "address which repaid the previously borrowed amount.", - "maturity": "maturity where the account repaid its borrowed amounts.", - "positionAssets": "amount of the debt that was covered in this repayment (penalties could have been repaid)." - } - }, - "ReserveFactorSet(uint256)": { - "params": { - "reserveFactor": "reserveFactor percentage." - } - }, - "RewardsControllerSet(address)": { - "params": { - "rewardsController": "new rewards controller to update account rewards when operating with the Market." - } - }, - "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`)" - }, - "Seize(address,address,uint256)": { - "params": { - "assets": "amount seized of the collateral.", - "borrower": "address which had the original debt.", - "liquidator": "address which seized this collateral." - } - }, - "SpreadBadDebt(address,uint256)": { - "params": { - "assets": "amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.", - "borrower": "address which was cleared from bad debt." - } - }, - "TreasurySet(address,uint256)": { - "params": { - "treasury": "address of the treasury that will receive the minted eTokens.", - "treasuryFeeRate": "represented with 18 decimals." - } - }, - "Unpaused(address)": { - "details": "Emitted when the pause is lifted by `account`." - }, - "WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets withdrawn (can include a discount for early withdraw).", - "caller": "address which withdraw the asset.", - "maturity": "maturity where the account withdraw its deposits.", - "owner": "address which had the assets withdrawn.", - "positionAssets": "position size reduced.", - "receiver": "address which will be collecting the assets." - } - } - }, - "kind": "dev", - "methods": { - "accountSnapshot(address)": { - "params": { - "account": "account to return status snapshot in the specified maturity date." - }, - "returns": { - "_0": "the amount deposited to the floating pool and the amount owed to floating and fixed pools." - } - }, - "borrow(uint256,address,address)": { - "params": { - "assets": "amount to be sent to receiver and repaid by borrower.", - "borrower": "address that will repay the borrowed assets.", - "receiver": "address that will receive the borrowed assets." - }, - "returns": { - "borrowShares": "shares corresponding to the borrowed assets." - } - }, - "borrowAtMaturity(uint256,uint256,uint256,address,address)": { - "params": { - "assets": "amount to be sent to receiver and repaid by borrower.", - "borrower": "address that will repay the borrowed assets.", - "maturity": "maturity date for repayment.", - "maxAssets": "maximum amount of debt that the account is willing to accept.", - "receiver": "address that will receive the borrowed assets." - }, - "returns": { - "assetsOwed": "total amount of assets (principal + fee) to be repaid at maturity." - } - }, - "clearBadDebt(address)": { - "details": "Can only be called from the auditor.", - "params": { - "borrower": "account with insufficient collateral to be cleared the debt." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "depositAtMaturity(uint256,uint256,uint256,address)": { - "params": { - "assets": "amount to receive from the msg.sender.", - "maturity": "maturity date where the assets will be deposited.", - "minAssetsRequired": "minimum amount of assets required by the depositor for the transaction to be accepted.", - "receiver": "address that will be able to withdraw the deposited assets." - }, - "returns": { - "positionAssets": "total amount of assets (principal + fee) to be withdrawn at maturity." - } - }, - "fixedPoolBalance(uint256)": { - "params": { - "maturity": "maturity date of the fixed pool." - }, - "returns": { - "_0": "borrowed and supplied amount of the fixed pool." - } - }, - "fixedPoolBorrowed(uint256)": { - "params": { - "maturity": "maturity date of the fixed pool." - }, - "returns": { - "_0": "borrowed amount of the fixed pool." - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)": { - "details": "can only be called once." - }, - "liquidate(address,uint256,address)": { - "details": "Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.", - "params": { - "borrower": "account that has an outstanding debt across floating or fixed pools.", - "maxAssets": "maximum amount of debt that the liquidator is willing to accept. (it can be less)", - "seizeMarket": "market from which the collateral will be seized to give to the liquidator." - }, - "returns": { - "repaidAssets": "actual amount repaid." - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "previewBorrow(uint256)": { - "params": { - "assets": "amount of assets to borrow." - }, - "returns": { - "_0": "amount of shares that will be asigned to the account after the borrow." - } - }, - "previewDebt(address)": { - "params": { - "borrower": "account to return status snapshot for fixed and floating borrows." - }, - "returns": { - "debt": "the total debt, denominated in number of assets." - } - }, - "previewFloatingAssetsAverage()": { - "returns": { - "_0": "projected `floatingAssetsAverage`." - } - }, - "previewRefund(uint256)": { - "params": { - "shares": "amount of shares to subtract from caller's accountability." - }, - "returns": { - "_0": "amount of assets that will be repaid." - } - }, - "previewRepay(uint256)": { - "params": { - "assets": "amount of assets to repay." - }, - "returns": { - "_0": "amount of shares that will be subtracted from the account after the repay." - } - }, - "redeem(uint256,address,address)": { - "details": "Makes sure that the owner doesn't have shortfall after withdrawing.", - "params": { - "owner": "address which owns the floating pool assets.", - "receiver": "address to which the assets will be transferred.", - "shares": "amount of shares to be redeemed for underlying asset." - }, - "returns": { - "assets": "amount of underlying asset that was withdrawn." - } - }, - "refund(uint256,address)": { - "params": { - "borrowShares": "shares to be subtracted from the borrower's accountability.", - "borrower": "address of the account that has the debt." - }, - "returns": { - "actualShares": "actual subtracted shares from the borrower's accountability.", - "assets": "subtracted assets from the borrower's accountability." - } - }, - "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." - }, - "repay(uint256,address)": { - "params": { - "assets": "assets to be subtracted from the borrower's accountability.", - "borrower": "address of the account that has the debt." - }, - "returns": { - "actualRepay": "the actual amount that should be transferred into the protocol.", - "borrowShares": "subtracted shares from the borrower's accountability." - } - }, - "repayAtMaturity(uint256,uint256,uint256,address)": { - "params": { - "borrower": "address of the account that has the debt.", - "maturity": "maturity date where the assets will be repaid.", - "maxAssets": "maximum amount of debt that the account is willing to accept to be repaid.", - "positionAssets": "amount to be paid for the borrower's debt." - }, - "returns": { - "actualRepayAssets": "the actual amount that was transferred into the protocol." - } - }, - "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." - }, - "seize(address,address,uint256)": { - "details": "Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).", - "params": { - "assets": "amount to be removed from borrower's possession.", - "borrower": "address from which the assets will be seized.", - "liquidator": "address which will receive the seized assets." - } - }, - "setAssetSymbol(string)": { - "params": { - "assetSymbol": "the symbol for the underlying asset." - } - }, - "setBackupFeeRate(uint256)": { - "params": { - "backupFeeRate_": "percentage amount represented with 18 decimals." - } - }, - "setDampSpeed(uint256,uint256)": { - "params": { - "down": "damp speed down, represented with 18 decimals.", - "up": "damp speed up, represented with 18 decimals." - } - }, - "setEarningsAccumulatorSmoothFactor(uint128)": { - "params": { - "earningsAccumulatorSmoothFactor_": "represented with 18 decimals." - } - }, - "setInterestRateModel(address)": { - "params": { - "interestRateModel_": "new interest rate model." - } - }, - "setMaxFuturePools(uint8)": { - "details": "If value is decreased, VALID maturities will become NOT_READY.", - "params": { - "futurePools": "number of pools to be active at the same time." - } - }, - "setPenaltyRate(uint256)": { - "params": { - "penaltyRate_": "percentage represented with 18 decimals." - } - }, - "setReserveFactor(uint128)": { - "params": { - "reserveFactor_": "parameter represented with 18 decimals." - } - }, - "setRewardsController(address)": { - "params": { - "rewardsController_": "new rewards controller." - } - }, - "setTreasury(address,uint256)": { - "params": { - "treasuryFeeRate_": "represented with 18 decimals.", - "treasury_": "address of the treasury that will receive the minted eTokens." - } - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "totalAssets()": { - "returns": { - "_0": "actual floatingAssets plus earnings to be accrued at current timestamp." - } - }, - "totalFloatingBorrowAssets()": { - "returns": { - "_0": "actual floating debt plus projected interest." - } - }, - "transfer(address,uint256)": { - "details": "Makes sure that the caller doesn't have shortfall after transferring.", - "params": { - "shares": "amount of shares to be transferred.", - "to": "address to which the assets will be transferred." - } - }, - "transferFrom(address,address,uint256)": { - "details": "Makes sure that `from` address doesn't have shortfall after transferring.", - "params": { - "from": "address from which the assets will be transferred.", - "shares": "amount of shares to be transferred.", - "to": "address to which the assets will be transferred." - } - }, - "withdraw(uint256,address,address)": { - "details": "Makes sure that the owner doesn't have shortfall after withdrawing.", - "params": { - "assets": "amount of underlying to be withdrawn.", - "owner": "address which owns the floating pool assets.", - "receiver": "address to which the assets will be transferred." - }, - "returns": { - "shares": "amount of shares redeemed for underlying asset." - } - }, - "withdrawAtMaturity(uint256,uint256,uint256,address,address)": { - "params": { - "maturity": "maturity date where the assets will be withdrawn.", - "minAssetsRequired": "minimum amount required by the account (if discount included for early withdrawal).", - "owner": "address that previously deposited the assets.", - "positionAssets": "position size to be reduced.", - "receiver": "address that will receive the withdrawn assets." - }, - "returns": { - "assetsDiscounted": "amount of assets withdrawn (can include a discount for early withdraw)." - } - } - }, - "stateVariables": { - "__gap": { - "custom:oz-renamed-from": "floatingUtilization", - "details": "gap from deprecated state." - }, - "auditor": { - "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" - } - }, - "version": 1 - }, - "userdoc": { - "events": { - "AccumulatorAccrual(uint256)": { - "notice": "Emitted when accumulator distributes earnings." - }, - "BackupFeeRateSet(uint256)": { - "notice": "Emitted when the backupFeeRate parameter is changed by admin." - }, - "Borrow(address,address,address,uint256,uint256)": { - "notice": "Event emitted when an account borrows amount of assets from a floating pool." - }, - "BorrowAtMaturity(uint256,address,address,address,uint256,uint256)": { - "notice": "Emitted when an account borrows amount of an asset from a certain maturity date." - }, - "DampSpeedSet(uint256,uint256)": { - "notice": "Emitted when the damp speeds are changed by admin." - }, - "DepositAtMaturity(uint256,address,address,uint256,uint256)": { - "notice": "Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period." - }, - "EarningsAccumulatorSmoothFactorSet(uint256)": { - "notice": "Emitted when the earningsAccumulatorSmoothFactor is changed by admin." - }, - "FixedEarningsUpdate(uint256,uint256,uint256)": { - "notice": "Emitted when the earnings of a maturity are updated." - }, - "FloatingDebtUpdate(uint256,uint256)": { - "notice": "Emitted when the floating debt is updated." - }, - "Frozen(address,bool)": { - "notice": "Emitted when `account` sets the `isFrozen` flag." - }, - "InterestRateModelSet(address)": { - "notice": "Emitted when the interestRateModel is changed by admin." - }, - "Liquidate(address,address,uint256,uint256,address,uint256)": { - "notice": "Emitted when an account's position had a liquidation." - }, - "MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)": { - "notice": "Emitted when market state is updated." - }, - "MaxFuturePoolsSet(uint256)": { - "notice": "Emitted when the maxFuturePools is changed by admin." - }, - "PenaltyRateSet(uint256)": { - "notice": "Emitted when the penaltyRate is changed by admin." - }, - "Repay(address,address,uint256,uint256)": { - "notice": "Emitted when an account repays amount of assets to a floating pool." - }, - "RepayAtMaturity(uint256,address,address,uint256,uint256)": { - "notice": "Emitted when an account repays its borrows after maturity." - }, - "ReserveFactorSet(uint256)": { - "notice": "Emitted when the reserveFactor is changed by admin." - }, - "RewardsControllerSet(address)": { - "notice": "Emitted when the rewardsController is changed by admin." - }, - "Seize(address,address,uint256)": { - "notice": "Emitted when an account's collateral has been seized." - }, - "SpreadBadDebt(address,uint256)": { - "notice": "Emitted when an account is cleared from bad debt." - }, - "TreasurySet(address,uint256)": { - "notice": "Emitted when the treasury variables are changed by admin." - }, - "WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)": { - "notice": "Emitted when an account withdraws from a fixed rate pool." - } - }, - "kind": "user", - "methods": { - "accountSnapshot(address)": { - "notice": "Gets current snapshot for an account across all maturities." - }, - "accounts(address)": { - "notice": "Tracks fixed deposit and borrow map and floating borrow shares of an account." - }, - "backupFeeRate()": { - "notice": "Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity." - }, - "borrow(uint256,address,address)": { - "notice": "Borrows a certain amount from the floating pool." - }, - "borrowAtMaturity(uint256,uint256,uint256,address,address)": { - "notice": "Borrows a certain amount from a maturity." - }, - "clearBadDebt(address)": { - "notice": "Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`." - }, - "dampSpeedDown()": { - "notice": "Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower." - }, - "dampSpeedUp()": { - "notice": "Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher." - }, - "depositAtMaturity(uint256,uint256,uint256,address)": { - "notice": "Deposits a certain amount to a maturity." - }, - "earningsAccumulator()": { - "notice": "Accumulated earnings from extraordinary sources to be gradually distributed." - }, - "earningsAccumulatorSmoothFactor()": { - "notice": "Factor used for gradual accrual of earnings to the floating pool." - }, - "fixedBorrowPositions(uint256,address)": { - "notice": "Tracks account's fixed borrow positions by maturity, account and position." - }, - "fixedDepositPositions(uint256,address)": { - "notice": "Tracks account's fixed deposit positions by maturity, account and position." - }, - "fixedPoolBalance(uint256)": { - "notice": "Retrieves a fixed pool's borrowed and supplied amount." - }, - "fixedPoolBorrowed(uint256)": { - "notice": "Retrieves a fixed pool's borrowed amount." - }, - "fixedPools(uint256)": { - "notice": "Tracks fixed pools state by maturity." - }, - "floatingAssets()": { - "notice": "Amount of floating assets deposited to the pool." - }, - "floatingAssetsAverage()": { - "notice": "Average of the floating assets to get fixed borrow rates and prevent rate manipulation." - }, - "floatingBackupBorrowed()": { - "notice": "Amount of assets lent by the floating pool to the fixed pools." - }, - "floatingDebt()": { - "notice": "Amount of assets lent by the floating pool to accounts." - }, - "initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)": { - "notice": "Initializes the contract." - }, - "interestRateModel()": { - "notice": "Interest rate model contract used to get the borrow rates." - }, - "isFrozen()": { - "notice": "Flag to prevent new borrows and deposits." - }, - "lastAccumulatorAccrual()": { - "notice": "Last time the accumulator distributed earnings." - }, - "lastAverageUpdate()": { - "notice": "Last time the floating assets average was updated." - }, - "lastFloatingDebtUpdate()": { - "notice": "Last time the floating debt was updated." - }, - "liquidate(address,uint256,address)": { - "notice": "Liquidates undercollateralized fixed/floating (or both) position(s)." - }, - "maxFuturePools()": { - "notice": "Number of fixed pools to be active at the same time." - }, - "pause()": { - "notice": "Sets the pause state to true in case of emergency, triggered by an authorized account." - }, - "penaltyRate()": { - "notice": "Rate per second to be charged to delayed fixed pools borrowers after maturity." - }, - "previewBorrow(uint256)": { - "notice": "Simulates the effects of a borrow at the current time, given current contract conditions." - }, - "previewDebt(address)": { - "notice": "Gets all borrows and penalties for an account." - }, - "previewFloatingAssetsAverage()": { - "notice": "Returns the current `floatingAssetsAverage` without updating the storage variable." - }, - "previewRefund(uint256)": { - "notice": "Simulates the effects of a refund at the current time, given current contract conditions." - }, - "previewRepay(uint256)": { - "notice": "Simulates the effects of a repay at the current time, given current contract conditions." - }, - "redeem(uint256,address,address)": { - "notice": "Redeems the owner's floating pool assets to the receiver address." - }, - "refund(uint256,address)": { - "notice": "Repays a certain amount of shares to the floating pool." - }, - "repay(uint256,address)": { - "notice": "Repays a certain amount of assets to the floating pool." - }, - "repayAtMaturity(uint256,uint256,uint256,address)": { - "notice": "Repays a certain amount to a maturity." - }, - "reserveFactor()": { - "notice": "Percentage factor that represents the liquidity reserves that can't be borrowed." - }, - "rewardsController()": { - "notice": "Address of the rewards controller that will accrue rewards for accounts operating with the Market." - }, - "seize(address,address,uint256)": { - "notice": "Public function to seize a certain amount of assets." - }, - "setAssetSymbol(string)": { - "notice": "Sets name and symbol for the Market." - }, - "setBackupFeeRate(uint256)": { - "notice": "Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity." - }, - "setDampSpeed(uint256,uint256)": { - "notice": "Sets the damp speed used to update the floatingAssetsAverage." - }, - "setEarningsAccumulatorSmoothFactor(uint128)": { - "notice": "Sets the factor used when smoothly accruing earnings to the floating pool." - }, - "setFrozen(bool)": { - "notice": "Sets `isFrozen` state, triggered by an authorized account." - }, - "setInterestRateModel(address)": { - "notice": "Sets the interest rate model to be used to calculate rates." - }, - "setMaxFuturePools(uint8)": { - "notice": "Sets the protocol's max future pools for fixed borrowing and lending." - }, - "setPenaltyRate(uint256)": { - "notice": "Sets the penalty rate per second." - }, - "setReserveFactor(uint128)": { - "notice": "Sets the percentage that represents the liquidity reserves that can't be borrowed." - }, - "setRewardsController(address)": { - "notice": "Sets the rewards controller to update account rewards when operating with the Market." - }, - "setTreasury(address,uint256)": { - "notice": "Sets the treasury variables." - }, - "totalAssets()": { - "notice": "Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator." - }, - "totalFloatingBorrowAssets()": { - "notice": "Calculates the total floating debt, considering elapsed time since last update and current interest rate." - }, - "totalFloatingBorrowShares()": { - "notice": "Total amount of floating borrow shares assigned to floating borrow accounts." - }, - "transfer(address,uint256)": { - "notice": "Moves amount of shares from the caller's account to `to`." - }, - "transferFrom(address,address,uint256)": { - "notice": "Moves amount of shares from `from` to `to` using the allowance mechanism." - }, - "treasury()": { - "notice": "Address of the treasury that will receive the allocated earnings." - }, - "treasuryFeeRate()": { - "notice": "Rate to be charged by the treasury to floating and fixed borrows." - }, - "unpause()": { - "notice": "Sets the pause state to false when threat is gone, triggered by an authorized account." - }, - "withdraw(uint256,address,address)": { - "notice": "Withdraws the owner's floating pool assets to the receiver address." - }, - "withdrawAtMaturity(uint256,uint256,uint256,address,address)": { - "notice": "Withdraws a certain amount from a maturity." - } - }, - "version": 1 - }, + "numDeployments": 2, + "solcInputHash": "6e57950826dfd6055f8dc377807ae48e", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"contract Auditor\",\"name\":\"auditor_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Disagreement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientProtocolLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketFrozen\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaturityOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAuditor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPausingRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SelfLiquidation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolState\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"alternativeState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolStates\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBorrow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRepay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWithdraw\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AccumulatorAccrual\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"backupFeeRate\",\"type\":\"uint256\"}],\"name\":\"BackupFeeRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"BorrowAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedUp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedDown\",\"type\":\"uint256\"}],\"name\":\"DampSpeedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"DepositAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulatorSmoothFactor\",\"type\":\"uint256\"}],\"name\":\"EarningsAccumulatorSmoothFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"}],\"name\":\"FixedEarningsUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilization\",\"type\":\"uint256\"}],\"name\":\"FloatingDebtUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isFrozen\",\"type\":\"bool\"}],\"name\":\"Frozen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel\",\"type\":\"address\"}],\"name\":\"InterestRateModelSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lendersAssets\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizedAssets\",\"type\":\"uint256\"}],\"name\":\"Liquidate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDepositShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDebt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulator\",\"type\":\"uint256\"}],\"name\":\"MarketUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxFuturePools\",\"type\":\"uint256\"}],\"name\":\"MaxFuturePoolsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyRate\",\"type\":\"uint256\"}],\"name\":\"PenaltyRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Repay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"name\":\"RepayAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveFactor\",\"type\":\"uint256\"}],\"name\":\"ReserveFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController\",\"type\":\"address\"}],\"name\":\"RewardsControllerSet\",\"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\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"SpreadBadDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate\",\"type\":\"uint256\"}],\"name\":\"TreasurySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"WithdrawAtMaturity\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EMERGENCY_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"accountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fixedDeposits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fixedBorrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auditor\",\"outputs\":[{\"internalType\":\"contract Auditor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"backupFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrowAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsOwed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"clearBadDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"depositAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulatorSmoothFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedBorrowPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedDepositPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"fixedPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplied\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastAccrual\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingBackupBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"maxFuturePools_\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedUp_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedDown_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAccumulatorAccrual\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAverageUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFloatingDebtUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxFuturePools\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"previewDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"debt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewFloatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRefund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewRepay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repayAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepayAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsController\",\"outputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"}],\"name\":\"setAssetSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setBackupFeeRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"up\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"down\",\"type\":\"uint256\"}],\"name\":\"setDampSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"}],\"name\":\"setEarningsAccumulatorSmoothFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isFrozen_\",\"type\":\"bool\"}],\"name\":\"setFrozen\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"futurePools\",\"type\":\"uint8\"}],\"name\":\"setMaxFuturePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"}],\"name\":\"setReserveFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController_\",\"type\":\"address\"}],\"name\":\"setRewardsController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setTreasury\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasuryFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsDiscounted\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\"}},\"BackupFeeRateSet(uint256)\":{\"params\":{\"backupFeeRate\":\"rate charged to the fixed pools to be accrued by the floating depositors.\"}},\"Borrow(address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"receiver\":\"address that received the borrowed assets.\",\"shares\":\"amount of borrow shares assigned to the account.\"}},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"fee\":\"extra amount that will need to be paid at maturity.\",\"maturity\":\"maturity in which the account will have to repay the loan.\",\"receiver\":\"address that received the borrowed assets.\"}},\"DampSpeedSet(uint256,uint256)\":{\"params\":{\"dampSpeedDown\":\"represented with 18 decimals.\",\"dampSpeedUp\":\"represented with 18 decimals.\"}},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were deposited.\",\"caller\":\"address which deposited the assets.\",\"fee\":\"is the extra amount that it will be collected at maturity.\",\"maturity\":\"maturity at which the account will be able to collect his deposit + his fee.\",\"owner\":\"address that will be able to withdraw the deposited assets.\"}},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"params\":{\"earningsAccumulatorSmoothFactor\":\"factor represented with 18 decimals.\"}},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"params\":{\"maturity\":\"maturity date where the earnings were updated.\",\"timestamp\":\"current timestamp.\",\"unassignedEarnings\":\"pending unassigned earnings.\"}},\"FloatingDebtUpdate(uint256,uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\",\"utilization\":\"new floating utilization.\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InterestRateModelSet(address)\":{\"params\":{\"interestRateModel\":\"new interest rate model to be used to calculate rates.\"}},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were repaid.\",\"borrower\":\"address which had the original debt.\",\"lendersAssets\":\"incentive paid to lenders.\",\"receiver\":\"address which repaid the previously borrowed amount.\",\"seizeMarket\":\"address of the asset that were seized by the liquidator.\",\"seizedAssets\":\"amount seized of the collateral.\"}},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"earningsAccumulator\":\"earnings accumulator.\",\"floatingAssets\":\"total floating supply assets.\",\"floatingBorrowShares\":\"total floating borrow shares.\",\"floatingDebt\":\"total floating borrow assets.\",\"floatingDepositShares\":\"total floating supply shares.\",\"timestamp\":\"current timestamp.\"}},\"MaxFuturePoolsSet(uint256)\":{\"params\":{\"maxFuturePools\":\"represented with 0 decimals.\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PenaltyRateSet(uint256)\":{\"params\":{\"penaltyRate\":\"penaltyRate percentage per second represented with 18 decimals.\"}},\"Repay(address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"shares\":\"amount of borrow shares that were subtracted from the account's accountability.\"}},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"maturity\":\"maturity where the account repaid its borrowed amounts.\",\"positionAssets\":\"amount of the debt that was covered in this repayment (penalties could have been repaid).\"}},\"ReserveFactorSet(uint256)\":{\"params\":{\"reserveFactor\":\"reserveFactor percentage.\"}},\"RewardsControllerSet(address)\":{\"params\":{\"rewardsController\":\"new rewards controller to update account rewards when operating with the Market.\"}},\"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`)\"},\"Seize(address,address,uint256)\":{\"params\":{\"assets\":\"amount seized of the collateral.\",\"borrower\":\"address which had the original debt.\",\"liquidator\":\"address which seized this collateral.\"}},\"SpreadBadDebt(address,uint256)\":{\"params\":{\"assets\":\"amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\",\"borrower\":\"address which was cleared from bad debt.\"}},\"TreasurySet(address,uint256)\":{\"params\":{\"treasury\":\"address of the treasury that will receive the minted eTokens.\",\"treasuryFeeRate\":\"represented with 18 decimals.\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets withdrawn (can include a discount for early withdraw).\",\"caller\":\"address which withdraw the asset.\",\"maturity\":\"maturity where the account withdraw its deposits.\",\"owner\":\"address which had the assets withdrawn.\",\"positionAssets\":\"position size reduced.\",\"receiver\":\"address which will be collecting the assets.\"}}},\"kind\":\"dev\",\"methods\":{\"accountSnapshot(address)\":{\"params\":{\"account\":\"account to return status snapshot in the specified maturity date.\"},\"returns\":{\"_0\":\"the amount deposited to the floating pool and the amount owed to floating and fixed pools.\"}},\"borrow(uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"borrowShares\":\"shares corresponding to the borrowed assets.\"}},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"maturity\":\"maturity date for repayment.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"assetsOwed\":\"total amount of assets (principal + fee) to be repaid at maturity.\"}},\"clearBadDebt(address)\":{\"details\":\"Can only be called from the auditor.\",\"params\":{\"borrower\":\"account with insufficient collateral to be cleared the debt.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"assets\":\"amount to receive from the msg.sender.\",\"maturity\":\"maturity date where the assets will be deposited.\",\"minAssetsRequired\":\"minimum amount of assets required by the depositor for the transaction to be accepted.\",\"receiver\":\"address that will be able to withdraw the deposited assets.\"},\"returns\":{\"positionAssets\":\"total amount of assets (principal + fee) to be withdrawn at maturity.\"}},\"fixedPoolBalance(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed and supplied amount of the fixed pool.\"}},\"fixedPoolBorrowed(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed amount of the fixed pool.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"details\":\"can only be called once.\"},\"liquidate(address,uint256,address)\":{\"details\":\"Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.\",\"params\":{\"borrower\":\"account that has an outstanding debt across floating or fixed pools.\",\"maxAssets\":\"maximum amount of debt that the liquidator is willing to accept. (it can be less)\",\"seizeMarket\":\"market from which the collateral will be seized to give to the liquidator.\"},\"returns\":{\"repaidAssets\":\"actual amount repaid.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"previewBorrow(uint256)\":{\"params\":{\"assets\":\"amount of assets to borrow.\"},\"returns\":{\"_0\":\"amount of shares that will be asigned to the account after the borrow.\"}},\"previewDebt(address)\":{\"params\":{\"borrower\":\"account to return status snapshot for fixed and floating borrows.\"},\"returns\":{\"debt\":\"the total debt, denominated in number of assets.\"}},\"previewFloatingAssetsAverage()\":{\"returns\":{\"_0\":\"projected `floatingAssetsAverage`.\"}},\"previewRefund(uint256)\":{\"params\":{\"shares\":\"amount of shares to subtract from caller's accountability.\"},\"returns\":{\"_0\":\"amount of assets that will be repaid.\"}},\"previewRepay(uint256)\":{\"params\":{\"assets\":\"amount of assets to repay.\"},\"returns\":{\"_0\":\"amount of shares that will be subtracted from the account after the repay.\"}},\"redeem(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\",\"shares\":\"amount of shares to be redeemed for underlying asset.\"},\"returns\":{\"assets\":\"amount of underlying asset that was withdrawn.\"}},\"refund(uint256,address)\":{\"params\":{\"borrowShares\":\"shares to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualShares\":\"actual subtracted shares from the borrower's accountability.\",\"assets\":\"subtracted assets from the borrower's accountability.\"}},\"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.\"},\"repay(uint256,address)\":{\"params\":{\"assets\":\"assets to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualRepay\":\"the actual amount that should be transferred into the protocol.\",\"borrowShares\":\"subtracted shares from the borrower's accountability.\"}},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"borrower\":\"address of the account that has the debt.\",\"maturity\":\"maturity date where the assets will be repaid.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept to be repaid.\",\"positionAssets\":\"amount to be paid for the borrower's debt.\"},\"returns\":{\"actualRepayAssets\":\"the actual amount that was transferred into the protocol.\"}},\"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.\"},\"seize(address,address,uint256)\":{\"details\":\"Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\",\"params\":{\"assets\":\"amount to be removed from borrower's possession.\",\"borrower\":\"address from which the assets will be seized.\",\"liquidator\":\"address which will receive the seized assets.\"}},\"setAssetSymbol(string)\":{\"params\":{\"assetSymbol\":\"the symbol for the underlying asset.\"}},\"setBackupFeeRate(uint256)\":{\"params\":{\"backupFeeRate_\":\"percentage amount represented with 18 decimals.\"}},\"setDampSpeed(uint256,uint256)\":{\"params\":{\"down\":\"damp speed down, represented with 18 decimals.\",\"up\":\"damp speed up, represented with 18 decimals.\"}},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"params\":{\"earningsAccumulatorSmoothFactor_\":\"represented with 18 decimals.\"}},\"setInterestRateModel(address)\":{\"params\":{\"interestRateModel_\":\"new interest rate model.\"}},\"setMaxFuturePools(uint8)\":{\"details\":\"If value is decreased, VALID maturities will become NOT_READY.\",\"params\":{\"futurePools\":\"number of pools to be active at the same time.\"}},\"setPenaltyRate(uint256)\":{\"params\":{\"penaltyRate_\":\"percentage represented with 18 decimals.\"}},\"setReserveFactor(uint128)\":{\"params\":{\"reserveFactor_\":\"parameter represented with 18 decimals.\"}},\"setRewardsController(address)\":{\"params\":{\"rewardsController_\":\"new rewards controller.\"}},\"setTreasury(address,uint256)\":{\"params\":{\"treasuryFeeRate_\":\"represented with 18 decimals.\",\"treasury_\":\"address of the treasury that will receive the minted eTokens.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalAssets()\":{\"returns\":{\"_0\":\"actual floatingAssets plus earnings to be accrued at current timestamp.\"}},\"totalFloatingBorrowAssets()\":{\"returns\":{\"_0\":\"actual floating debt plus projected interest.\"}},\"transfer(address,uint256)\":{\"details\":\"Makes sure that the caller doesn't have shortfall after transferring.\",\"params\":{\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Makes sure that `from` address doesn't have shortfall after transferring.\",\"params\":{\"from\":\"address from which the assets will be transferred.\",\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"withdraw(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"assets\":\"amount of underlying to be withdrawn.\",\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\"},\"returns\":{\"shares\":\"amount of shares redeemed for underlying asset.\"}},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"maturity\":\"maturity date where the assets will be withdrawn.\",\"minAssetsRequired\":\"minimum amount required by the account (if discount included for early withdrawal).\",\"owner\":\"address that previously deposited the assets.\",\"positionAssets\":\"position size to be reduced.\",\"receiver\":\"address that will receive the withdrawn assets.\"},\"returns\":{\"assetsDiscounted\":\"amount of assets withdrawn (can include a discount for early withdraw).\"}}},\"stateVariables\":{\"__gap\":{\"custom:oz-renamed-from\":\"floatingUtilization\",\"details\":\"gap from deprecated state.\"},\"auditor\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"notice\":\"Emitted when accumulator distributes earnings.\"},\"BackupFeeRateSet(uint256)\":{\"notice\":\"Emitted when the backupFeeRate parameter is changed by admin.\"},\"Borrow(address,address,address,uint256,uint256)\":{\"notice\":\"Event emitted when an account borrows amount of assets from a floating pool.\"},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account borrows amount of an asset from a certain maturity date.\"},\"DampSpeedSet(uint256,uint256)\":{\"notice\":\"Emitted when the damp speeds are changed by admin.\"},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period.\"},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"notice\":\"Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\"},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"notice\":\"Emitted when the earnings of a maturity are updated.\"},\"FloatingDebtUpdate(uint256,uint256)\":{\"notice\":\"Emitted when the floating debt is updated.\"},\"Frozen(address,bool)\":{\"notice\":\"Emitted when `account` sets the `isFrozen` flag.\"},\"InterestRateModelSet(address)\":{\"notice\":\"Emitted when the interestRateModel is changed by admin.\"},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"notice\":\"Emitted when an account's position had a liquidation.\"},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when market state is updated.\"},\"MaxFuturePoolsSet(uint256)\":{\"notice\":\"Emitted when the maxFuturePools is changed by admin.\"},\"PenaltyRateSet(uint256)\":{\"notice\":\"Emitted when the penaltyRate is changed by admin.\"},\"Repay(address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays amount of assets to a floating pool.\"},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays its borrows after maturity.\"},\"ReserveFactorSet(uint256)\":{\"notice\":\"Emitted when the reserveFactor is changed by admin.\"},\"RewardsControllerSet(address)\":{\"notice\":\"Emitted when the rewardsController is changed by admin.\"},\"Seize(address,address,uint256)\":{\"notice\":\"Emitted when an account's collateral has been seized.\"},\"SpreadBadDebt(address,uint256)\":{\"notice\":\"Emitted when an account is cleared from bad debt.\"},\"TreasurySet(address,uint256)\":{\"notice\":\"Emitted when the treasury variables are changed by admin.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account withdraws from a fixed rate pool.\"}},\"kind\":\"user\",\"methods\":{\"accountSnapshot(address)\":{\"notice\":\"Gets current snapshot for an account across all maturities.\"},\"accounts(address)\":{\"notice\":\"Tracks fixed deposit and borrow map and floating borrow shares of an account.\"},\"backupFeeRate()\":{\"notice\":\"Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\"},\"borrow(uint256,address,address)\":{\"notice\":\"Borrows a certain amount from the floating pool.\"},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Borrows a certain amount from a maturity.\"},\"clearBadDebt(address)\":{\"notice\":\"Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\"},\"dampSpeedDown()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\"},\"dampSpeedUp()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Deposits a certain amount to a maturity.\"},\"earningsAccumulator()\":{\"notice\":\"Accumulated earnings from extraordinary sources to be gradually distributed.\"},\"earningsAccumulatorSmoothFactor()\":{\"notice\":\"Factor used for gradual accrual of earnings to the floating pool.\"},\"fixedBorrowPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed borrow positions by maturity, account and position.\"},\"fixedDepositPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed deposit positions by maturity, account and position.\"},\"fixedPoolBalance(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed and supplied amount.\"},\"fixedPoolBorrowed(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed amount.\"},\"fixedPools(uint256)\":{\"notice\":\"Tracks fixed pools state by maturity.\"},\"floatingAssets()\":{\"notice\":\"Amount of floating assets deposited to the pool.\"},\"floatingAssetsAverage()\":{\"notice\":\"Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\"},\"floatingBackupBorrowed()\":{\"notice\":\"Amount of assets lent by the floating pool to the fixed pools.\"},\"floatingDebt()\":{\"notice\":\"Amount of assets lent by the floating pool to accounts.\"},\"initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"notice\":\"Initializes the contract.\"},\"interestRateModel()\":{\"notice\":\"Interest rate model contract used to get the borrow rates.\"},\"isFrozen()\":{\"notice\":\"Flag to prevent new borrows and deposits.\"},\"lastAccumulatorAccrual()\":{\"notice\":\"Last time the accumulator distributed earnings.\"},\"lastAverageUpdate()\":{\"notice\":\"Last time the floating assets average was updated.\"},\"lastFloatingDebtUpdate()\":{\"notice\":\"Last time the floating debt was updated.\"},\"liquidate(address,uint256,address)\":{\"notice\":\"Liquidates undercollateralized fixed/floating (or both) position(s).\"},\"maxFuturePools()\":{\"notice\":\"Number of fixed pools to be active at the same time.\"},\"pause()\":{\"notice\":\"Sets the pause state to true in case of emergency, triggered by an authorized account.\"},\"penaltyRate()\":{\"notice\":\"Rate per second to be charged to delayed fixed pools borrowers after maturity.\"},\"previewBorrow(uint256)\":{\"notice\":\"Simulates the effects of a borrow at the current time, given current contract conditions.\"},\"previewDebt(address)\":{\"notice\":\"Gets all borrows and penalties for an account.\"},\"previewFloatingAssetsAverage()\":{\"notice\":\"Returns the current `floatingAssetsAverage` without updating the storage variable.\"},\"previewRefund(uint256)\":{\"notice\":\"Simulates the effects of a refund at the current time, given current contract conditions.\"},\"previewRepay(uint256)\":{\"notice\":\"Simulates the effects of a repay at the current time, given current contract conditions.\"},\"redeem(uint256,address,address)\":{\"notice\":\"Redeems the owner's floating pool assets to the receiver address.\"},\"refund(uint256,address)\":{\"notice\":\"Repays a certain amount of shares to the floating pool.\"},\"repay(uint256,address)\":{\"notice\":\"Repays a certain amount of assets to the floating pool.\"},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Repays a certain amount to a maturity.\"},\"reserveFactor()\":{\"notice\":\"Percentage factor that represents the liquidity reserves that can't be borrowed.\"},\"rewardsController()\":{\"notice\":\"Address of the rewards controller that will accrue rewards for accounts operating with the Market.\"},\"seize(address,address,uint256)\":{\"notice\":\"Public function to seize a certain amount of assets.\"},\"setAssetSymbol(string)\":{\"notice\":\"Sets name and symbol for the Market.\"},\"setBackupFeeRate(uint256)\":{\"notice\":\"Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity.\"},\"setDampSpeed(uint256,uint256)\":{\"notice\":\"Sets the damp speed used to update the floatingAssetsAverage.\"},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"notice\":\"Sets the factor used when smoothly accruing earnings to the floating pool.\"},\"setFrozen(bool)\":{\"notice\":\"Sets `isFrozen` state, triggered by an authorized account.\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model to be used to calculate rates.\"},\"setMaxFuturePools(uint8)\":{\"notice\":\"Sets the protocol's max future pools for fixed borrowing and lending.\"},\"setPenaltyRate(uint256)\":{\"notice\":\"Sets the penalty rate per second.\"},\"setReserveFactor(uint128)\":{\"notice\":\"Sets the percentage that represents the liquidity reserves that can't be borrowed.\"},\"setRewardsController(address)\":{\"notice\":\"Sets the rewards controller to update account rewards when operating with the Market.\"},\"setTreasury(address,uint256)\":{\"notice\":\"Sets the treasury variables.\"},\"totalAssets()\":{\"notice\":\"Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator.\"},\"totalFloatingBorrowAssets()\":{\"notice\":\"Calculates the total floating debt, considering elapsed time since last update and current interest rate.\"},\"totalFloatingBorrowShares()\":{\"notice\":\"Total amount of floating borrow shares assigned to floating borrow accounts.\"},\"transfer(address,uint256)\":{\"notice\":\"Moves amount of shares from the caller's account to `to`.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Moves amount of shares from `from` to `to` using the allowance mechanism.\"},\"treasury()\":{\"notice\":\"Address of the treasury that will receive the allocated earnings.\"},\"treasuryFeeRate()\":{\"notice\":\"Rate to be charged by the treasury to floating and fixed borrows.\"},\"unpause()\":{\"notice\":\"Sets the pause state to false when threat is gone, triggered by an authorized account.\"},\"withdraw(uint256,address,address)\":{\"notice\":\"Withdraws the owner's floating pool assets to the receiver address.\"},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Withdraws a certain amount from a maturity.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Market.sol\":\"Market\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":70},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\":{\"keccak256\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b83b7afa4d2372da3ba5402fb10860a105c35d79812c60dc61007be2afc17618\",\"dweb:/ipfs/QmYX9xPmbNVSKXrepKiUZiG5oL3SdzFp9a4kqspxX1sEUx\"]},\"@openzeppelin/contracts-upgradeable-v4/access/IAccessControlUpgradeable.sol\":{\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://740cf4dc535e3082560cf5a031473029f322690fc8037fe9d5e3a8bef42e757c\",\"dweb:/ipfs/QmTQxFdfxcaueQa23VX34wAPqzruZbkzyeN58tZK2yav2b\"]},\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e\",\"dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv\"]},\"@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol\":{\"keccak256\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6d362da7417bc7d7cc8623f3d3f8f04c3808d043ee6379568c63a63ec14a124e\",\"dweb:/ipfs/QmYm3wDHUcfGh3MNiRqpWEBbSSYnDSyUsppDATy5DVsfui\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b\",\"dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8b06267c5f80bad727af3e48b1382333d591dad51376399ef2f6b0ee6d58bf95\",\"dweb:/ipfs/QmdU5La1agcQvghnfMpWZGDPz2TUDTCxUwTLKmuMRXBpAx\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/StringsUpgradeable.sol\":{\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f8613145881436fc0480fff22da4868d611e2b0c0c3da083334eb4362ce1945a\",\"dweb:/ipfs/QmPqpP3YeRbBdTJRe6Gv2eGsUaANf4J6RwTNRW36iYahfV\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/introspection/ERC165Upgradeable.sol\":{\"keccak256\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1b13befeb3413749292f9fb229de1c7a509a5ce2c8047d9094fc004ca9d3af89\",\"dweb:/ipfs/QmRzJ2hZSwRtMejHUZAYTPRKgZsnfb112Fno9Jf3EiDfwA\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/introspection/IERC165Upgradeable.sol\":{\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://92ad7e572cf44e6b4b37631b44b62f9eb9fb1cf14d9ce51c1504d5dc7ccaf758\",\"dweb:/ipfs/QmcnbqX85tsWnUXPmtuPLE4SczME2sJaTfmqEFkuAJvWhy\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\":{\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2b2835c737d073ef8b82a4cc246495a9740f43e7ff2cf130906b2449ff9bfb91\",\"dweb:/ipfs/QmSCWfNoSvvTN57ic7o1RW6NqSxxGAqbBTnLKc7QHe27qB\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/math/SignedMathUpgradeable.sol\":{\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://88ace2d60f265752f18903d839910be4e4e104340b2957678585b812447825d4\",\"dweb:/ipfs/QmXFkNxMc3AAGzhs2wUEZyErWQjsvoTGyYjuU5oZkFki5Z\"]},\"@openzeppelin/contracts-v4/utils/math/Math.sol\":{\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c\",\"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS\"]},\"@openzeppelin/contracts-v4/utils/math/SafeCast.sol\":{\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://495145362c7ff1c9ca88c58bbbbcb412e3c2004406647412394486552ff6c278\",\"dweb:/ipfs/QmNNCeng6d5eRPDn6tkWSQhjE39XWfQEfjA63rRwHmr1iH\"]},\"contracts/Auditor.sol\":{\"keccak256\":\"0x5110a03bc02c12d47bc64ccb39250e2c9eaa4c4089e63ed143e0513bf7ede5d8\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e61331e636beec80bc57e2b751fa672ee98dab4fb489c9ea4cf19cd68acbddfd\",\"dweb:/ipfs/QmPgu5ZNy8b7ywz6fX658A5ETWTKdGLXCwtX5eAPEiZfH8\"]},\"contracts/InterestRateModel.sol\":{\"keccak256\":\"0x21b3897afb0da4e23559f3122f2292deb79516d8850a4995ece47b8c4d278004\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://a8aad4f1b7340db20e72e3c115e951ad5c71c87fb6139729f9b3279289f82908\",\"dweb:/ipfs/QmZ1UAp33jbcHJZFmsDSokVM6tSCPTPXi3zEranQDP4ZQE\"]},\"contracts/Market.sol\":{\"keccak256\":\"0xea262e9a46d356f8626b4ea1d2bf9017e009b3d4f95809f5f33331b0236b3ce6\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e05e0132c04440fa2a3bd7d991940f4f14f70efe0414f7b8085f5a2247aea6ec\",\"dweb:/ipfs/QmWwjTo5nRbuY1GywEXUPdA9tDvN6CgA8pL147dQdPTacW\"]},\"contracts/RewardsController.sol\":{\"keccak256\":\"0xab502e9e6c6fdd56878d80fde0aee78c360234b15b1db8d7cb6508fe3c430163\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://08502c85c6753a61ff24aeab55809674dd47cb206ad02aa615c81a53820acb06\",\"dweb:/ipfs/Qmazc5RbGCq7QXsuqqfkC5yC4LgkTUQLg5Xn1YCyi5Rxi4\"]},\"contracts/utils/FixedLib.sol\":{\"keccak256\":\"0x9eb04f02cac9a0c2fd049587524799c8ab4fa1840d9550bad02d87d81074187c\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://885545fb71ae6e82d70b364dd2fc021e25435b01131f1e7a63755c303a350928\",\"dweb:/ipfs/QmaejvpPc1qX1GWvwodnUaHgKzob8WpsU3kz84qpk7vRn3\"]},\"contracts/utils/IPriceFeed.sol\":{\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://b06913f9c7e4fe67bbb1ddf3d9335a2a6c0e7a537aae8ed7d8b5825c61e80514\",\"dweb:/ipfs/Qmb34jWcW4Pv8Upsq2rtoYoncPHoUgDUET6JHBBsTo583L\"]},\"solmate/src/mixins/ERC4626.sol\":{\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1dca20fc42d20ce7b6023fafd744dc7e91ed2d1f6c5f1fb45e3004b1d5f33100\",\"dweb:/ipfs/Qmf7MtQTTSJYEhsJ3HDmegt4PFSG13msyFAv4DFAoqyypa\"]},\"solmate/src/tokens/ERC20.sol\":{\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb440672ebad7d487c1600e406e140fd1ffc4bd7520c86b5709183ca2602da58\",\"dweb:/ipfs/QmNgZaBoAZwnwm4mTL1cUZnMtvt1iZnruMnfpJnDu6upuc\"]},\"solmate/src/utils/FixedPointMathLib.sol\":{\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://737232ccd46bfbe6f34a3e5bc24c345777da47e6ea27bcc46d2c3931883c2257\",\"dweb:/ipfs/QmeA6ikG9dQKZgkJYUVGXcApuCii34h7qtmguToRdSU3qZ\"]},\"solmate/src/utils/SafeTransferLib.sol\":{\"keccak256\":\"0xbb4580ec2c735b5f31bb176567c886a87c2800b3eff132eda15ddc2b28cc2932\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://27ce4609ece6f8635dafd662cf8a45a4e0b5c3240e6f26c6b0081df880039152\",\"dweb:/ipfs/QmYPBJ1DPeFNUTPSPka3G9iwpSfbyJnYQeo5YGvbfyQFGC\"]}},\"version\":1}", + "bytecode": "0x610120604052348015610010575f80fd5b5060405161651138038061651183398101604081905261002f9161021c565b8160405180602001604052805f81525060405180602001604052805f8152508181846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100b09190610254565b60c96100bc8482610313565b5060ca6100c98382610313565b5060ff81166080524660a0526100dd610108565b60c0525050506001600160a01b0392831660e05250508116610100526101016101a1565b505061043e565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c960405161013991906103cd565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f54610100900460ff16156101b4575f80fd5b5f5460ff90811614610203575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610219575f80fd5b50565b5f806040838503121561022d575f80fd5b825161023881610205565b602084015190925061024981610205565b809150509250929050565b5f60208284031215610264575f80fd5b815160ff81168114610274575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102a357607f821691505b6020821081036102c157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561030e57805f5260205f20601f840160051c810160208510156102ec5750805b601f840160051c820191505b8181101561030b575f81556001016102f8565b50505b505050565b81516001600160401b0381111561032c5761032c61027b565b6103408161033a845461028f565b846102c7565b6020601f821160018114610372575f831561035b5750848201515b5f19600385901b1c1916600184901b17845561030b565b5f84815260208120601f198516915b828110156103a15787850151825560209485019460019092019101610381565b50848210156103be57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f8083546103da8161028f565b6001821680156103f1576001811461040657610433565b60ff1983168652811515820286019350610433565b865f5260205f205f5b8381101561042b5781548882015260019091019060200161040f565b505081860193505b509195945050505050565b60805160a05160c05160e05161010051615ff561051c5f395f81816107840152818161154d015281816116fe01528181611d7a01528181611faa01528181612184015281816124b201528181612e8b0152818161303c0152818161312e015281816136700152614b2801525f8181610734015281816115be01528181611b7101528181611c650152818161206c015281816122780152818161233f0152818161282e01528181612e0d015281816136e101528181614cb2015281816151cd01526152cf01525f611bde01525f611ba901525f6106cb0152615ff55ff3fe608060405234801561000f575f80fd5b50600436106104c1575f3560e01c80636e76fc8f11610283578063b2a02ff111610168578063d5164184116100e0578063e63ab1e91161009a578063e63ab1e914610c98578063e94b3c2114610cac578063eee8c9e014610cb5578063ef8b30f714610cbd578063f3fdb15a14610cd0578063fb0fc4c314610ce3578063fea45d9414610cfa575f80fd5b8063d516418414610c04578063d547741f14610c17578063d6b7494f14610c2a578063d905777e14610c33578063dd62ed3e14610c5b578063e00b262514610c85575f80fd5b8063b2a02ff114610af7578063b3d7f6b914610b0a578063b460af9414610b1d578063ba08765214610b30578063bee36bb314610b43578063bf722ca214610b56578063c63d75b6146107ae578063c6e6f59214610b69578063ccfd8b1114610b7c578063ce96cb7714610bad578063d2681a0b14610bc0578063d505accf14610bf1575f80fd5b806391d14854116101fb57806391d1485414610a32578063926bb63314610a4557806394bf804d14610a5857806395d89b4114610a6b57806397bce8d014610a73578063a05a091a14610a86578063a16a885014610a99578063a1bab44714610aae578063a1e8f02b14610ac1578063a217fddf14610aca578063a9059cbb14610ad1578063acb7081514610ae4575f80fd5b80636e76fc8f146109325780636eb9ffeb1461095957806370a082311461098557806378007e23146109a45780637ad226dc146109b75780637e932d32146109ca5780637ecebe00146109dd5780638456cb59146109fc5780638a1baa4614610a045780638bcd401614610a0d5780638c3cba5a14610a205780638d0e5f0214610a29575f80fd5b8063313ce567116103a95780634322b714116103215780634322b714146107d557806347dffde0146107fc5780634914c0081461080f5780634cdad506146108225780634e7c5059146108355780635c975abb146108895780635cc2ef83146108945780635e5c06e2146108a757806361d027b3146108f057806366601032146109035780636bb65f531461090c5780636e553f651461091f575f80fd5b8063313ce567146106c657806333eeb147146106ed57806334f7d1f2146107015780633644e5151461071457806336568abe1461071c57806338d52e0f1461072f5780633aa18d6f146107635780633c6f317f1461076c5780633ec045a61461077f5780633f4ba83a146107a6578063402d267d146107ae57806342da42bf146107c2575f80fd5b8063137001011161043c57806313700101146105e557806318160ddd146105f85780631a5b9e62146106015780631a90f186146106145780631d43b30b1461061d57806323b872dd14610630578063248a9ca31461064357806325fc07a91461066557806328acf2cf146106845780632c5dcc77146106975780632e0af008146106aa5780632f2ff15d146106b3575f80fd5b8063014a296f146104c557806301e1d114146104f257806301ffc9a714610508578063022d8af51461052b5780630539fa8c1461054057806306fdde031461054957806307a2d13a1461055e578063095ea7b3146105715780630a28a477146105845780630ab69be8146105975780630e52dbec146105be5780630f2b75aa146105dd575b5f80fd5b6104d86104d336600461564e565b610d0d565b604080519283526020830191909152015b60405180910390f35b6104fa610d42565b6040519081526020016104e9565b61051b610516366004615669565b610dee565b60405190151581526020016104e9565b61053e6105393660046156ab565b610e24565b005b6104fa60d85481565b610551610eab565b6040516104e991906156c4565b6104fa61056c3660046156f9565b610f37565b61051b61057f366004615710565b610f63565b6104fa6105923660046156f9565b610fce565b6104d86105a53660046156f9565b5f90815260d16020526040902080546001909101549091565b60da546105cb9060ff1681565b60405160ff90911681526020016104e9565b6104fa610fed565b61053e6105f3366004615777565b611092565b6104fa60cb5481565b6104fa61060f3660046157b5565b611103565b6104fa60d45481565b6104fa61062b36600461564e565b6115f3565b61051b61063e366004615807565b6116f3565b6104fa6106513660046156f9565b5f9081526065602052604090206001015490565b6104fa6106733660046156f9565b5f90815260d1602052604090205490565b61053e610692366004615855565b61185a565b61053e6106a5366004615710565b6118a6565b6104fa60dd5481565b61053e6106c136600461586e565b611916565b6105cb7f000000000000000000000000000000000000000000000000000000000000000081565b60e35461051b90600160a01b900460ff1681565b6104fa61070f36600461589c565b61193f565b6104fa611ba6565b61053e61072a36600461586e565b611c00565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b6040516104e991906158da565b6104fa60d95481565b6104fa61077a36600461589c565b611c22565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b61053e611c95565b6104fa6107bc36600461564e565b505f1990565b61053e6107d03660046156f9565b611cb7565b60dc546107ef90600160801b90046001600160801b031681565b6040516104e991906158ee565b6104fa61080a3660046156f9565b611cf6565b6104fa61081d366004615902565b611d14565b6104fa6108303660046156f9565b6121f0565b6108696108433660046156f9565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016104e9565b60975460ff1661051b565b61053e6108a2366004615941565b6121fa565b6108d56108b536600461564e565b60d26020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016104e9565b60e154610756906001600160a01b031681565b6104fa60e25481565b60e354610756906001600160a01b031681565b6104fa61092d36600461586e565b612254565b6104fa7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da5461097090600160281b900463ffffffff1681565b60405163ffffffff90911681526020016104e9565b6104fa61099336600461564e565b60cc6020525f908152604090205481565b6104fa6109b23660046156f9565b6122fa565b6104d86109c536600461586e565b612311565b61053e6109d8366004615961565b61236e565b6104fa6109eb36600461564e565b60ce6020525f908152604090205481565b61053e6123eb565b6104fa60d55481565b61053e610a1b36600461564e565b6123fd565b6104fa60d35481565b6104fa60df5481565b61051b610a4036600461586e565b61247d565b61053e610a5336600461564e565b6124a7565b6104fa610a6636600461586e565b612815565b6105516128b0565b61053e610a81366004615980565b6128bd565b6104fa610a943660046157b5565b612a1c565b60da5461097090610100900463ffffffff1681565b61053e610abc3660046156f9565b612e41565b6104fa60d75481565b6104fa5f81565b61051b610adf366004615710565b612e80565b6104d8610af236600461586e565b612fdd565b61053e610b05366004615807565b612ff9565b6104fa610b183660046156f9565b61300d565b6104fa610b2b366004615a2b565b613023565b6104fa610b3e366004615a2b565b61312b565b61053e610b5136600461564e565b613228565b6104fa610b643660046156f9565b61327c565b6104fa610b773660046156f9565b61329b565b6104d8610b8a36600461586e565b60cf60209081525f92835260408084209091529082529020805460019091015482565b6104fa610bbb36600461564e565b6132b2565b6104d8610bce36600461586e565b60d060209081525f92835260408084209091529082529020805460019091015482565b61053e610bff366004615a5f565b6132d3565b6104fa610c12366004615a2b565b613498565b61053e610c2536600461586e565b613713565b6104fa60d65481565b6104fa610c4136600461564e565b6001600160a01b03165f90815260cc602052604090205490565b6104fa610c69366004615ac9565b60cd60209081525f928352604080842090915290825290205481565b61053e610c933660046156ab565b613737565b6104fa5f80516020615f8083398151915281565b6104fa60de5481565b6104fa61378b565b6104fa610ccb3660046156f9565b61386c565b60db54610756906001600160a01b031681565b60da5461097090600160481b900463ffffffff1681565b60dc546107ef906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610d3090610f37565b610d39846115f3565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610db4575f81815260d160205260409020600381015480831115610da857824210610d8e578160020154610da3565b6002820154610da39042839003838603613876565b860195505b50506224ea0001610d5c565b50610dd760e254670de0b6b3a76400000360d454610dd061378b565b0390613894565b610ddf6138a8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610e1e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610e2e8161391e565b610e36613928565b60dd5f828254610e469190615b1d565b90915550610e5490506139a1565b60dc80546001600160801b0319166001600160801b0384161790556040517f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e90610e9f9084906158ee565b60405180910390a15050565b60c98054610eb890615b30565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee490615b30565b8015610f2f5780601f10610f0657610100808354040283529160200191610f2f565b820191905f5260205f20905b815481529060010190602001808311610f1257829003601f168201915b505050505081565b60cb545f908015610f5a57610f55610f4d610d42565b849083613876565b610f5c565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fbd9086815260200190565b60405180910390a350600192915050565b60cb545f908015610f5a57610f5581610fe5610d42565b859190613a07565b60dd5460de545f9190828183106110065760d85461100a565b60d9545b60da549091505f906110459061102d90600160481b900463ffffffff1642615b68565b6110379084615b7b565b61104090615b92565b613a34565b61105790670de0b6b3a7640000615bac565b90506110638185613894565b61107f61107883670de0b6b3a7640000615b68565b8590613894565b6110899190615b1d565b94505050505090565b5f61109c8161391e565b82826040516020016110af929190615bcb565b60405160208183030381529060405260c990816110cc9190615c46565b5082826040516020016110e0929190615d00565b60405160208183030381529060405260ca90816110fd9190615c46565b50505050565b5f61110c613ba7565b611114613bb6565b845f036111345760405163774257f760e01b815260040160405180910390fd5b60da5461114890879060ff1660035f613be1565b5f86815260d160205260409020611165611160613d7b565b613e89565b61116f8188613ec6565b60dd5f82825461117f9190615b1d565b909155505060e3546001600160a01b031680156111f057604051636c912dad60e01b81526001600160a01b03821690636c912dad906111c29087906004016158da565b5f604051808303815f87803b1580156111d9575f80fd5b505af11580156111eb573d5f803e3d5ffd5b505050505b5f6111fb8389613f44565b9050801561127f575f8160d3546112129190615b1d565b60dc549091506112509061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b60dd54906001600160801b0316613894565b60d45461125d9083615b1d565b111561127b57604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061128a610fed565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff166112d88a600101548b5f015489613f80565b6112e28888613fad565b6112ef898960d354613fc5565b6040518663ffffffff1660e01b815260040161130f959493929190615d3d565b602060405180830381865afa15801561132a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061134e9190615d63565b905061137361136c611360428f615b68565b83906301e13380613876565b8c90613fe1565b935050505080886113849190615b1d565b9350868411156113a757604051632c1b6b4160e21b815260040160405180910390fd5b6113b18585613ff5565b5f89815260d0602090815260408083206001600160a01b038916845290915281208054909103611408576001600160a01b0386165f90815260d2602052604090206001810154611401908c61406b565b6001909101555b5f8061144b61141685614154565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614180565b91509150815f1461146f5781866002015f8282546114699190615b1d565b90915550505b611478816141cc565b60405180604001604052808c855f01546114929190615b1d565b81526020018585600101546114a79190615b1d565b90525f8d815260d0602090815260408083206001600160a01b03808e168086529184529382902085518155949092015160019094019390935591519194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139061151d9033908e908890615d7a565b60405180910390a461152d6139a1565b611536896141f8565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906115849030908990600401615d9b565b5f604051808303815f87803b15801561159b575f80fd5b505af11580156115ad573d5f803e3d5ffd5b506115e79250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614246565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b81156116c85760018216156116ad575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916116689190615b1d565b90506116748188615b1d565b9650824211156116aa5761169d8561168c8542615b68565b6116969190615b7b565b8290613894565b6116a79088615b1d565b96505b50505b60019190911c906116c16224ea0082615b1d565b9050611624565b600284015480156116e9576116dc81611cf6565b6116e69087615b1d565b95505b5050505050919050565b5f6116fc613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53086611736866121f0565b6040518463ffffffff1660e01b815260040161175493929190615db5565b5f6040518083038186803b15801561176a575f80fd5b505afa15801561177c573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561184657604051630149e46f60e01b81526001600160a01b03821690630149e46f906117bf9088906004016158da565b5f604051808303815f87803b1580156117d6575f80fd5b505af11580156117e8573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f91506118189087906004016158da565b5f604051808303815f87803b15801561182f575f80fd5b505af1158015611841573d5f803e3d5ffd5b505050505b611851858585614291565b95945050505050565b5f6118648161391e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610e9f565b5f6118b08161391e565b6118bb611160613d7b565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119308161391e565b61193a838361436b565b505050565b5f611948613ba7565b611950613bb6565b835f03611970576040516356316e8760e01b815260040160405180910390fd5b60da5461198490869060ff1660035f613be1565b5f85815260d1602052604081209061199c8288613ec6565b90506119a9611160613d7b565b8060dd5f8282546119ba9190615b1d565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f9182916119ff918a906143f0565b9092509050611a0e8289615b1d565b945086851015611a3157604051632c1b6b4160e21b815260040160405180910390fd5b611a3b8489614441565b60d35f828254611a4b9190615b68565b90915550611a5b90508183615b1d565b846002015f828254611a6d9190615b68565b925050819055508060d55f828254611a859190615b1d565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611ada576001600160a01b0387165f90815260d2602052604090208054611ad7908c61406b565b90555b88815f015f828254611aec9190615b1d565b9250508190555082816001015f828254611b069190615b1d565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611b5b6139a1565b611b648a6141f8565b611b996001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614471565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611bdb57611bd66144c9565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611c14575f80fd5b611c1e8282614562565b5050565b5f611c2b613ba7565b60da54611c4090869060ff1660036002613be1565b611c4e8585858560016145c8565b9050611c586139a1565b611c8d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b949350505050565b5f80516020615f80833981519152611cac8161391e565b611cb4614952565b50565b5f611cc18161391e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610e9f565b60df545f908015610f5a57610f55611d0c61378b565b849083613a07565b5f611d1d613ba7565b6001600160a01b0384163303611d46576040516344511af160e01b815260040160405180910390fd5b611d4e613928565b60dd5f828254611d5e9190615b1d565b909155505060405163042dcf6b60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890611db5903090869089908990600401615dd9565b602060405180830381865afa158015611dd0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df49190615d63565b9250825f03611e165760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611e5057508515155b15611f5d576001821615611f42575f81421015611e8757611e748288898b5f6145c8565b9050611e808188615b68565b9650611f34565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611eb99190615b1d565b9150505f611ee060d6548542611ecf9190615b68565b611ed99190615b7b565b8390613894565b611eea9083615b1d565b9050888111611ef95788611f04565b611f04898383613876565b9250825f03611f15575f9850611f31565b611f2284848b8d5f6145c8565b9250611f2e838a615b68565b98505b50505b611f3e8186615b1d565b9450505b60019190911c90611f566224ea0082615b1d565b9050611e42565b50508315801590611f715750600281015415155b15611fa6575f611f808561327c565b90508015611fa4575f611f938288614994565b509050611fa08185615b1d565b9350505b505b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1b003130878a886040518563ffffffff1660e01b8152600401611ffa9493929190615dd9565b6040805180830381865afa158015612014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120389190615e03565b915091508160d55f82825461204d9190615b1d565b90915550612094905033306120628588615b1d565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614471565b306001600160a01b038616036120b5576120b030338984614af1565b61211a565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906120e59033908b908690600401615db5565b5f604051808303815f87803b1580156120fc575f80fd5b505af115801561210e573d5f803e3d5ffd5b5050505061211a6139a1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906121b9908a906004016158da565b5f604051808303815f87803b1580156121d0575f80fd5b505af11580156121e2573d5f803e3d5ffd5b505050505050509392505050565b5f610e1e82610f37565b5f6122048161391e565b61220c614cd9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61225e8361386c565b9050805f0361226b575f80fd5b6122a06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614471565b6122aa8282614d04565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8382614d7a565b60df545f908015610f5a57610f5581610fe561378b565b5f8061231b613ba7565b6123258484614994565b90925090506123326139a1565b6123676001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614471565b9250929050565b5f6123788161391e565b60e35460ff600160a01b90910416151582151514611c1e5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee698906123df90851515815260200190565b60405180910390a25050565b6123f3614dd9565b6123fb614e42565b565b5f6124078161391e565b60db546001600160a01b03161561242357612423611160613d7b565b60db80546001600160a01b0319166001600160a01b0384161790556124466139a1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146124f0576040516317568c8f60e21b815260040160405180910390fd5b6124f8613928565b60dd5f8282546125089190615b1d565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b811561276c576001821615612751575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916125849190615b1d565b905080861061274e5760e3546001600160a01b031680156125f957604051636c912dad60e01b81526001600160a01b03821690636c912dad906125cb908c906004016158da565b5f604051808303815f87803b1580156125e2575f80fd5b505af11580156125f4573d5f803e3d5ffd5b505050505b6126038288615b68565b965061260f8287615b1d565b83545f86815260d1602052604081209298509161262b91614e7f565b905080156126c4578060d35f8282546126449190615b68565b909155505083545f906126739061265b9084614e9e565b5f88815260d160205260409020600201549084613876565b90508060d15f8881526020019081526020015f206002015f8282546126989190615b68565b925050819055508060d55f8282546126b09190615b1d565b909155506126c09050818a615b1d565b9850505b5f85815260d0602090815260408083206001600160a01b038e16845290915281208181556001908101919091558901546126fe9086614eb3565b60018a015560408051848152602081018590526001600160a01b038c1691339188917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a450505b50505b60019190911c906127656224ea0082615b1d565b9050612540565b60028501541580159061278957506127838461327c565b93508315155b156127aa575f6127998588614994565b5090506127a68185615b1d565b9350505b8215612805578260d55f8282546127c19190615b68565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b61280d6139a1565b505050505050565b5f61281f8361300d565b90506128566001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b6128608284614d04565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8184614d7a565b60ca8054610eb890615b30565b5f54610100900460ff16158080156128db57505f54600160ff909116105b806128f45750303b1580156128f457505f5460ff166001145b6128fc575f80fd5b5f805460ff19166001179055801561291d575f805461ff0019166101001790555b612925614f72565b61292d614f84565b60da805468ffffffffffffffff0019166101004263ffffffff1690810263ffffffff60281b191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129805f3361436b565b61298a8b8b611092565b6129938961185a565b61299c88610e24565b6129a5876123fd565b6129ae86612e41565b6129b785611cb7565b6129c084613737565b6129ca83836121fa565b8015612a0f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a25613ba7565b845f03612a455760405163b8cb621960e01b815260040160405180910390fd5b60da54612a5a90879060ff1660036002613be1565b5f86815260d160205260409020612a72611160613d7b565b612a7c8188613ec6565b60dd5f828254612a8c9190615b1d565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612ad69190615b1d565b871115612af15760208101518151612aee9190615b1d565b96505b6040805180820190915281518152602080830151908201525f90612b2190612b19908a614f9e565b518490614fe4565b60d354612b2e9190615b1d565b905060dd5460d45482612b419190615b1d565b1115612b5f57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612c71575f612b73610fed565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bc78a600101548b5f01548a613f80565b612bd18989613fad565b612bdc8a8a8a613fc5565b6040518663ffffffff1660e01b8152600401612bfc959493929190615d3d565b602060405180830381865afa158015612c17573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c3b9190615d63565b9050612c66612c4d611360428f615b68565b612c5f90670de0b6b3a7640000615b1d565b8c90615028565b965050505050612c75565b8692505b85831015612c9657604051632c1b6b4160e21b815260040160405180910390fd5b612ca08484613ff5565b5f80612cec612cb7612cb2878c615b68565b614154565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614180565b9150915081846002015f828254612d039190615b1d565b90915550612d129050816141cc565b612d1c838a61503c565b5060208301518351175f03612d6f575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612d68908c614eb3565b9055612d9f565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b856001600160a01b0316876001600160a01b03168b7fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c338d8a604051612de793929190615d7a565b60405180910390a4612df76139a1565b612e008a6141f8565b612e346001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614246565b5050505095945050505050565b5f612e4b8161391e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610e9f565b5f612e89613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612ec3866121f0565b6040518463ffffffff1660e01b8152600401612ee193929190615db5565b5f6040518083038186803b158015612ef7575f80fd5b505afa158015612f09573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015612fd357604051630149e46f60e01b81526001600160a01b03821690630149e46f90612f4c9033906004016158da565b5f604051808303815f87803b158015612f63575f80fd5b505af1158015612f75573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f9150612fa59087906004016158da565b5f604051808303815f87803b158015612fbc575f80fd5b505af1158015612fce573d5f803e3d5ffd5b505050505b611c8d848461509a565b5f80612fe7613ba7565b612325612ff38561327c565b84614994565b613001613ba7565b61193a33848484614af1565b60cb545f908015610f5a57610f55611d0c610d42565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db59061307590309086908990600401615db5565b5f6040518083038186803b15801561308b575f80fd5b505afa15801561309d573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561310e57604051630149e46f60e01b81526001600160a01b03821690630149e46f906130e09086906004016158da565b5f604051808303815f87803b1580156130f7575f80fd5b505af1158015613109573d5f803e3d5ffd5b505050505b6131198585856150fd565b91506131236139a1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53084613166886121f0565b6040518463ffffffff1660e01b815260040161318493929190615db5565b5f6040518083038186803b15801561319a575f80fd5b505afa1580156131ac573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561321d57604051630149e46f60e01b81526001600160a01b03821690630149e46f906131ef9086906004016158da565b5f604051808303815f87803b158015613206575f80fd5b505af1158015613218573d5f803e3d5ffd5b505050505b6131198585856151f4565b5f6132328161391e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f908015610f5a57610f558161329361378b565b859190613876565b60cb545f908015610f5a57610f5581613293610d42565b6001600160a01b0381165f90815260cc6020526040812054610e1e90610f37565b428410156132df575f80fd5b5f60016132ea611ba6565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156133f2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134285750876001600160a01b0316816001600160a01b0316145b613430575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134a1613ba7565b6134a9613bb6565b835f036134c95760405163774257f760e01b815260040160405180910390fd5b6134d38285613ff5565b60e3546001600160a01b0316801561353f57604051636c912dad60e01b81526001600160a01b03821690636c912dad906135119086906004016158da565b5f604051808303815f87803b158015613528575f80fd5b505af115801561353a573d5f803e3d5ffd5b505050505b61354a611160613d7b565b613553856122fa565b91505f8560d4546135649190615b1d565b60d481905560dc549091506135959061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b8160d3546135a39190615b1d565b11156135c157604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135d29190615b1d565b90915550506001600160a01b0384165f90815260d2602052604081206002018054859290613601908490615b1d565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136596139a1565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906136a79030908890600401615d9b565b5f604051808303815f87803b1580156136be575f80fd5b505af11580156136d0573d5f803e3d5ffd5b5061370a9250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614246565b50509392505050565b5f8281526065602052604090206001015461372d8161391e565b61193a8383614562565b5f6137418161391e565b60dc80546001600160801b03808516600160801b0291161790556040517fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90610e9f9084906158ee565b60d45460dd5460da545f929190839061385890613851906137b990600160281b900463ffffffff1642615b68565b60db546301e13380906001600160a01b0316637c21fb1d6137da888a613fad565b6137e7898b60d354613fc5565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613826573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061384a9190615d63565b9190613876565b8490613894565b90506138648184615b1d565b935050505090565b5f610e1e8261329b565b82820281151584158583048514171661388d575f80fd5b0492915050565b5f610f5c8383670de0b6b3a7640000613876565b60da545f9081906138c490610100900463ffffffff1642615b68565b9050805f036138d4575f91505090565b60da54613918908290613904906138f2906224ea009060ff16615b7b565b60dc546001600160801b031690613894565b61390e9084615b1d565b60d5549190613876565b91505090565b611cb481336152f6565b5f6139316138a8565b90508060d55f8282546139449190615b68565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a1e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a4d57505f919050565b680755bf798b4a1bf1e58212613a61575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156123fb575f80fd5b60e354600160a01b900460ff16156123fb5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613bef6224ea0086615e25565b15613bfc57506001613c4f565b428511613c0b57506002613c4f565b613c1b60ff85166224ea00615b7b565b613c286224ea0042615e25565b613c329042615b68565b613c3c9190615b1d565b851115613c4b57506004613c4f565b5060035b826004811115613c6157613c61615e38565b816004811115613c7357613c73615e38565b14158015613ca35750816004811115613c8e57613c8e615e38565b816004811115613ca057613ca0615e38565b14155b15613d74575f826004811115613cbb57613cbb615e38565b03613d0f57806004811115613cd257613cd2615e38565b836004811115613ce457613ce4615e38565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d2157613d21615e38565b836004811115613d3357613d33615e38565b836004811115613d4557613d45615e38565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d06565b5050505050565b60d45460dd545f919082613d8f8284613fad565b60da549091505f90613de19061107890613db690600160281b900463ffffffff1642615b68565b60db5460d3546301e13380916001600160a01b031690637c21fb1d9088906137e7908b908d90613fc5565b9050613ded8185615b1d565b9350613e0460e2548261389490919063ffffffff16565b945084613e118285615b1d565b613e1b9190615b68565b60dd5560d484905560da805463ffffffff60281b1916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611cb45760e154613ead906001600160a01b0316613ea88361386c565b614d04565b8060dd5f828254613ebe9190615b1d565b909155505050565b60038201545f9042831115613f1a5760028401544260038601819055613f0390613ef1908490615b68565b613efb8487615b68565b839190613876565b9250613f0f8382615b68565b600286015550613f3d565b828103613f29575f9150613f3d565b600384018390556002840180545f90915591505b5092915050565b81545f9081613f538483615b1d565b9050613f6c613f6683876001015461533c565b82614e9e565b613f769082615b68565b9455509192915050565b5f8115801590613f8f57508383115b613f99575f611c8d565b611c8d82613fa78686615b68565b9061534a565b5f825f03613fbb575f610f5c565b610f5c828461534a565b5f835f03613fd3575f611c8d565b611c8d84613fa78486615b1d565b5f610f5c8383670de0b6b3a7640000613a07565b336001600160a01b03831614611c1e576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461193a5761403982610fce565b6140439082615b68565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f036140805750600160201b8117610e1e565b63ffffffff8316808310156140fd575f6224ea0061409e8584615b68565b6140a89190615e4c565b90506140b681610100615b68565b85901c156140d75760405163293cc41f60e21b815260040160405180910390fd5b6140e2816020615b1d565b602086901c901b9450848417600160201b1792505050610e1e565b5f6224ea0061410c8386615b68565b6141169190615e4c565b905060df81111561413a5760405163293cc41f60e21b815260040160405180910390fd5b614145816020615b1d565b6001901b851792505050610e1e565b5f8061416b60e2548461389490919063ffffffff16565b905061417681613e89565b610f5c8184615b68565b5f8082156141b4576141af61419d6141978761535e565b85614e9e565b6141a79085615b68565b859085613876565b6141b6565b5f5b90506141c28185615b68565b9150935093915050565b805f036141d65750565b60e254156141e757611cb481613e89565b8060d55f828254613ebe9190615b1d565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806110fd575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142ea576142c68382615b68565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614311908490615b68565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615fa0833981519152906143589087815260200190565b60405180910390a3506001949350505050565b614375828261247d565b611c1e575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f6143fc8661535e565b905080156144385761441d6144118683614e9e565b60408801519083613876565b92506144298385613894565b91506144358284615b68565b92505b50935093915050565b815460018301545f91906144558482615b1d565b60018601556118516144678383614e9e565b6141979084615b68565b5f6040516323b872dd60e01b5f526001600160a01b0385166004526001600160a01b0384166024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d74575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144fa9190615e5f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61456c828261247d565b15611c1e575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145e95760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906146018289613ec6565b905061460e611160613d7b565b8060dd5f82825461461f9190615b1d565b90915550505f88815260d0602090815260408083206001600160a01b0389168452825280832081518083019092528054808352600190910154928201839052909291614675918b9161467091615b1d565b614e9e565b6040805180820190915283518152602080850151908201529091505f9061469c9083614f9e565b5160e3549091506001600160a01b0316801561470c57604051636c912dad60e01b81526001600160a01b03821690636c912dad906146de908c906004016158da565b5f604051808303815f87803b1580156146f5575f80fd5b505af1158015614707573d5f803e3d5ffd5b505050505b8b4210156147d45760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147549186906143f0565b90925090506147638183615b1d565b886002015f8282546147759190615b68565b909155505089156147a8578060d55f8282546147919190615b1d565b909155506147a190508286615b68565b98506147cd565b6147b28183615b1d565b60d55f8282546147c29190615b1d565b925050819055508498505b505061481b565b60d6546147ef906147e58e42615b68565b6138519190615b7b565b6147f99084615b1d565b96506148058388615b68565b60d55f8282546148159190615b1d565b90915550505b8987111561483c57604051632c1b6b4160e21b815260040160405180910390fd5b6148468683614e7f565b60d35f8282546148569190615b68565b909155506148669050848461503c565b5060208401518451175f036148c2575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d2909252909120908101546148b7908e614eb3565b6001909101556148f2565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a46149438c6141f8565b50505050505095945050505050565b61495a61537c565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516139fd91906158da565b60e3545f9081906001600160a01b03168015614a0457604051636c912dad60e01b81526001600160a01b03821690636c912dad906149d69087906004016158da565b5f604051808303815f87803b1580156149ed575f80fd5b505af11580156149ff573d5f803e3d5ffd5b505050505b614a0f611160613d7b565b6001600160a01b0384165f90815260d2602052604090206002810154614a358782614e9e565b9350614a4084611cf6565b9450845f03614a625760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a739190615b68565b90915550614a8390508482615b68565b82600201819055508360df5f828254614a9c9190615b68565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614b115760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e16ee72090614b5f9087903090600401615d9b565b5f6040518083038186803b158015614b75575f80fd5b505afa158015614b87573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bf857604051630149e46f60e01b81526001600160a01b03821690630149e46f90614bca9086906004016158da565b5f604051808303815f87803b158015614be1575f80fd5b505af1158015614bf3573d5f803e3d5ffd5b505050505b5f614c0283610fce565b9050614c0e838261538a565b614c188482615403565b60408051848152602081018390526001600160a01b03808716929088169133915f80516020615f60833981519152910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c9591815260200190565b60405180910390a3614ca56139a1565b61280d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614246565b614ce1610fed565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d7057604051630149e46f60e01b81526001600160a01b03821690630149e46f90614d429086906004016158da565b5f604051808303815f87803b158015614d59575f80fd5b505af1158015614d6b573d5f803e3d5ffd5b505050505b61193a838361546a565b614d82613ba7565b614d8a613bb6565b614d92614cd9565b5f614d9b613d7b565b90505f614da6613928565b9050614db28482615b1d565b60dd5f828254614dc29190615b1d565b90915550614dd1905082613e89565b6110fd6139a1565b614e037f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361247d565b158015614e245750614e225f80516020615f808339815191523361247d565b155b156123fb57604051631d006fdb60e31b815260040160405180910390fd5b614e4a613ba7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586149873390565b815460018301545f9190614e938483615b68565b855561185161446783835b5f818310614eac5781610f5c565b5090919050565b5f821580614ec6575081600160201b1783145b15614ed257505f610e1e565b63ffffffff8316808303614f4057602184901c60015b60018216158015614ef857508115155b15614f0957600191821c9101614ee8565b6020614f158282615b1d565b9690961c90951b9485614f2b6224ea0083615b7b565b614f359087615b1d565b179350505050610e1e565b6224ea00614f4e8285615b68565b614f589190615e4c565b614f63906020615b1d565b6001901b198416915050610e1e565b5f54610100900460ff166123fb575f80fd5b5f54610100900460ff16614f96575f80fd5b6123fb6154b9565b604080518082019091525f8082526020820152825160208401515f91614fc8916132939082615b1d565b8085529050614fd78184615b68565b6020850152509192915050565b815460018301545f919082614ff98583615b68565b90506150058184614e9e565b61500f8385614e9e565b6150199190615b68565b60019096015550929392505050565b5f610f5c83670de0b6b3a764000084613876565b604080518082019091525f8082526020820152602083015183515f9161506191615b1d565b90505f61506e8483615b68565b855190915061507f90829084613876565b80865261508c9082615b68565b602086015250929392505050565b335f90815260cc60205260408120805483919083906150ba908490615b68565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615fa083398151915290610fbd9086815260200190565b5f61510784610fce565b9050336001600160a01b03831614615174576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151725761514e8282615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61517e848261538a565b6151888282615403565b60408051858152602081018390526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614246565b5f336001600160a01b03831614615260576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461525e5761523a8582615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b615269846121f0565b9050805f03615276575f80fd5b615280818561538a565b61528a8285615403565b60408051828152602081018690526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614246565b615300828261247d565b611c1e5761530d816154d7565b6153188360206154e9565b604051602001615329929190615ee7565b6040516020818303038152906040525f80fd5b5f818311614eac5781610f5c565b5f610f5c83670de0b6b3a764000084613a07565b805160208201515f91906153728282614e9e565b611c8d9083615b68565b60975460ff166123fb575f80fd5b615392613ba7565b61539a614cd9565b6153a5611160613d7b565b5f6153ae613928565b90505f838260dd546153c09190615b1d565b6153ca9190615b68565b90508060d45460d3546153dd9190615b1d565b11156153fb57604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc60205260408120805483929061542a908490615b68565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615fa0833981519152906020015b60405180910390a35050565b8060cb5f82825461547b9190615b1d565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615fa0833981519152910161545e565b5f54610100900460ff166154cb575f80fd5b6097805460ff19169055565b6060610e1e6001600160a01b03831660145b60605f6154f7836002615b7b565b615502906002615b1d565b6001600160401b0381111561551957615519615bee565b6040519080825280601f01601f191660200182016040528015615543576020820181803683370190505b509050600360fc1b815f8151811061555d5761555d615f36565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061558b5761558b615f36565b60200101906001600160f81b03191690815f1a9053505f6155ad846002615b7b565b6155b8906001615b1d565b90505b600181111561562f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106155ec576155ec615f36565b1a60f81b82828151811061560257615602615f36565b60200101906001600160f81b03191690815f1a90535060049490941c9361562881615f4a565b90506155bb565b508315610f5c575f80fd5b6001600160a01b0381168114611cb4575f80fd5b5f6020828403121561565e575f80fd5b8135610f5c8161563a565b5f60208284031215615679575f80fd5b81356001600160e01b031981168114610f5c575f80fd5b80356001600160801b03811681146156a6575f80fd5b919050565b5f602082840312156156bb575f80fd5b610f5c82615690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615709575f80fd5b5035919050565b5f8060408385031215615721575f80fd5b823561572c8161563a565b946020939093013593505050565b5f8083601f84011261574a575f80fd5b5081356001600160401b03811115615760575f80fd5b602083019150836020828501011115612367575f80fd5b5f8060208385031215615788575f80fd5b82356001600160401b0381111561579d575f80fd5b6157a98582860161573a565b90969095509350505050565b5f805f805f60a086880312156157c9575f80fd5b85359450602086013593506040860135925060608601356157e98161563a565b915060808601356157f98161563a565b809150509295509295909350565b5f805f60608486031215615819575f80fd5b83356158248161563a565b925060208401356158348161563a565b929592945050506040919091013590565b803560ff811681146156a6575f80fd5b5f60208284031215615865575f80fd5b610f5c82615845565b5f806040838503121561587f575f80fd5b8235915060208301356158918161563a565b809150509250929050565b5f805f80608085870312156158af575f80fd5b84359350602085013592506040850135915060608501356158cf8161563a565b939692955090935050565b6001600160a01b0391909116815260200190565b6001600160801b0391909116815260200190565b5f805f60608486031215615914575f80fd5b833561591f8161563a565b92506020840135915060408401356159368161563a565b809150509250925092565b5f8060408385031215615952575f80fd5b50508035926020909101359150565b5f60208284031215615971575f80fd5b81358015158114610f5c575f80fd5b5f805f805f805f805f806101208b8d03121561599a575f80fd5b8a356001600160401b038111156159af575f80fd5b6159bb8d828e0161573a565b909b5099506159ce905060208c01615845565b97506159dc60408c01615690565b965060608b01356159ec8161563a565b955060808b0135945060a08b01359350615a0860c08c01615690565b999c989b50969995989497939650919460e0810135936101009091013592509050565b5f805f60608486031215615a3d575f80fd5b833592506020840135615a4f8161563a565b915060408401356159368161563a565b5f805f805f805f60e0888a031215615a75575f80fd5b8735615a808161563a565b96506020880135615a908161563a565b95506040880135945060608801359350615aac60808901615845565b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215615ada575f80fd5b8235615ae58161563a565b915060208301356158918161563a565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610e1e57610e1e615b09565b600181811c90821680615b4457607f821691505b602082108103615b6257634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610e1e57610e1e615b09565b8082028115828204841417610e1e57610e1e615b09565b5f600160ff1b8201615ba657615ba6615b09565b505f0390565b8181035f831280158383131683831282161715613f3d57613f3d615b09565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f82111561193a57805f5260205f20601f840160051c81016020851015615c275750805b601f840160051c820191505b81811015613d74575f8155600101615c33565b81516001600160401b03811115615c5f57615c5f615bee565b615c7381615c6d8454615b30565b84615c02565b6020601f821160018114615ca5575f8315615c8e5750848201515b5f19600385901b1c1916600184901b178455613d74565b5f84815260208120601f198516915b82811015615cd45787850151825560209485019460019092019101615cb4565b5084821015615cf157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b038281168282160390811115610e1e57610e1e615b09565b94855260ff93909316602085015260408401919091526060830152608082015260a00190565b5f60208284031215615d73575f80fd5b5051919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b5f8060408385031215615e14575f80fd5b505080516020909101519092909150565b5f82615e3357615e33615af5565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615e5a57615e5a615af5565b500490565b5f808354615e6c81615b30565b600182168015615e835760018114615e9857615ec5565b60ff1983168652811515820286019350615ec5565b865f5260205f205f5b83811015615ebd57815488820152600190910190602001615ea1565b505081860193505b509195945050505050565b5f81518060208401855e5f93019283525090919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81525f615f126017830185615ed0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526118516011820185615ed0565b634e487b7160e01b5f52603260045260245ffd5b5f81615f5857615f58615b09565b505f19019056fefbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122005ec196d152ea67004b2106a9e8456d6fce9e4ca698150d3a643ce4c0c94880d64736f6c634300081a0033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106104c1575f3560e01c80636e76fc8f11610283578063b2a02ff111610168578063d5164184116100e0578063e63ab1e91161009a578063e63ab1e914610c98578063e94b3c2114610cac578063eee8c9e014610cb5578063ef8b30f714610cbd578063f3fdb15a14610cd0578063fb0fc4c314610ce3578063fea45d9414610cfa575f80fd5b8063d516418414610c04578063d547741f14610c17578063d6b7494f14610c2a578063d905777e14610c33578063dd62ed3e14610c5b578063e00b262514610c85575f80fd5b8063b2a02ff114610af7578063b3d7f6b914610b0a578063b460af9414610b1d578063ba08765214610b30578063bee36bb314610b43578063bf722ca214610b56578063c63d75b6146107ae578063c6e6f59214610b69578063ccfd8b1114610b7c578063ce96cb7714610bad578063d2681a0b14610bc0578063d505accf14610bf1575f80fd5b806391d14854116101fb57806391d1485414610a32578063926bb63314610a4557806394bf804d14610a5857806395d89b4114610a6b57806397bce8d014610a73578063a05a091a14610a86578063a16a885014610a99578063a1bab44714610aae578063a1e8f02b14610ac1578063a217fddf14610aca578063a9059cbb14610ad1578063acb7081514610ae4575f80fd5b80636e76fc8f146109325780636eb9ffeb1461095957806370a082311461098557806378007e23146109a45780637ad226dc146109b75780637e932d32146109ca5780637ecebe00146109dd5780638456cb59146109fc5780638a1baa4614610a045780638bcd401614610a0d5780638c3cba5a14610a205780638d0e5f0214610a29575f80fd5b8063313ce567116103a95780634322b714116103215780634322b714146107d557806347dffde0146107fc5780634914c0081461080f5780634cdad506146108225780634e7c5059146108355780635c975abb146108895780635cc2ef83146108945780635e5c06e2146108a757806361d027b3146108f057806366601032146109035780636bb65f531461090c5780636e553f651461091f575f80fd5b8063313ce567146106c657806333eeb147146106ed57806334f7d1f2146107015780633644e5151461071457806336568abe1461071c57806338d52e0f1461072f5780633aa18d6f146107635780633c6f317f1461076c5780633ec045a61461077f5780633f4ba83a146107a6578063402d267d146107ae57806342da42bf146107c2575f80fd5b8063137001011161043c57806313700101146105e557806318160ddd146105f85780631a5b9e62146106015780631a90f186146106145780631d43b30b1461061d57806323b872dd14610630578063248a9ca31461064357806325fc07a91461066557806328acf2cf146106845780632c5dcc77146106975780632e0af008146106aa5780632f2ff15d146106b3575f80fd5b8063014a296f146104c557806301e1d114146104f257806301ffc9a714610508578063022d8af51461052b5780630539fa8c1461054057806306fdde031461054957806307a2d13a1461055e578063095ea7b3146105715780630a28a477146105845780630ab69be8146105975780630e52dbec146105be5780630f2b75aa146105dd575b5f80fd5b6104d86104d336600461564e565b610d0d565b604080519283526020830191909152015b60405180910390f35b6104fa610d42565b6040519081526020016104e9565b61051b610516366004615669565b610dee565b60405190151581526020016104e9565b61053e6105393660046156ab565b610e24565b005b6104fa60d85481565b610551610eab565b6040516104e991906156c4565b6104fa61056c3660046156f9565b610f37565b61051b61057f366004615710565b610f63565b6104fa6105923660046156f9565b610fce565b6104d86105a53660046156f9565b5f90815260d16020526040902080546001909101549091565b60da546105cb9060ff1681565b60405160ff90911681526020016104e9565b6104fa610fed565b61053e6105f3366004615777565b611092565b6104fa60cb5481565b6104fa61060f3660046157b5565b611103565b6104fa60d45481565b6104fa61062b36600461564e565b6115f3565b61051b61063e366004615807565b6116f3565b6104fa6106513660046156f9565b5f9081526065602052604090206001015490565b6104fa6106733660046156f9565b5f90815260d1602052604090205490565b61053e610692366004615855565b61185a565b61053e6106a5366004615710565b6118a6565b6104fa60dd5481565b61053e6106c136600461586e565b611916565b6105cb7f000000000000000000000000000000000000000000000000000000000000000081565b60e35461051b90600160a01b900460ff1681565b6104fa61070f36600461589c565b61193f565b6104fa611ba6565b61053e61072a36600461586e565b611c00565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b6040516104e991906158da565b6104fa60d95481565b6104fa61077a36600461589c565b611c22565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b61053e611c95565b6104fa6107bc36600461564e565b505f1990565b61053e6107d03660046156f9565b611cb7565b60dc546107ef90600160801b90046001600160801b031681565b6040516104e991906158ee565b6104fa61080a3660046156f9565b611cf6565b6104fa61081d366004615902565b611d14565b6104fa6108303660046156f9565b6121f0565b6108696108433660046156f9565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016104e9565b60975460ff1661051b565b61053e6108a2366004615941565b6121fa565b6108d56108b536600461564e565b60d26020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016104e9565b60e154610756906001600160a01b031681565b6104fa60e25481565b60e354610756906001600160a01b031681565b6104fa61092d36600461586e565b612254565b6104fa7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da5461097090600160281b900463ffffffff1681565b60405163ffffffff90911681526020016104e9565b6104fa61099336600461564e565b60cc6020525f908152604090205481565b6104fa6109b23660046156f9565b6122fa565b6104d86109c536600461586e565b612311565b61053e6109d8366004615961565b61236e565b6104fa6109eb36600461564e565b60ce6020525f908152604090205481565b61053e6123eb565b6104fa60d55481565b61053e610a1b36600461564e565b6123fd565b6104fa60d35481565b6104fa60df5481565b61051b610a4036600461586e565b61247d565b61053e610a5336600461564e565b6124a7565b6104fa610a6636600461586e565b612815565b6105516128b0565b61053e610a81366004615980565b6128bd565b6104fa610a943660046157b5565b612a1c565b60da5461097090610100900463ffffffff1681565b61053e610abc3660046156f9565b612e41565b6104fa60d75481565b6104fa5f81565b61051b610adf366004615710565b612e80565b6104d8610af236600461586e565b612fdd565b61053e610b05366004615807565b612ff9565b6104fa610b183660046156f9565b61300d565b6104fa610b2b366004615a2b565b613023565b6104fa610b3e366004615a2b565b61312b565b61053e610b5136600461564e565b613228565b6104fa610b643660046156f9565b61327c565b6104fa610b773660046156f9565b61329b565b6104d8610b8a36600461586e565b60cf60209081525f92835260408084209091529082529020805460019091015482565b6104fa610bbb36600461564e565b6132b2565b6104d8610bce36600461586e565b60d060209081525f92835260408084209091529082529020805460019091015482565b61053e610bff366004615a5f565b6132d3565b6104fa610c12366004615a2b565b613498565b61053e610c2536600461586e565b613713565b6104fa60d65481565b6104fa610c4136600461564e565b6001600160a01b03165f90815260cc602052604090205490565b6104fa610c69366004615ac9565b60cd60209081525f928352604080842090915290825290205481565b61053e610c933660046156ab565b613737565b6104fa5f80516020615f8083398151915281565b6104fa60de5481565b6104fa61378b565b6104fa610ccb3660046156f9565b61386c565b60db54610756906001600160a01b031681565b60da5461097090600160481b900463ffffffff1681565b60dc546107ef906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610d3090610f37565b610d39846115f3565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610db4575f81815260d160205260409020600381015480831115610da857824210610d8e578160020154610da3565b6002820154610da39042839003838603613876565b860195505b50506224ea0001610d5c565b50610dd760e254670de0b6b3a76400000360d454610dd061378b565b0390613894565b610ddf6138a8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610e1e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610e2e8161391e565b610e36613928565b60dd5f828254610e469190615b1d565b90915550610e5490506139a1565b60dc80546001600160801b0319166001600160801b0384161790556040517f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e90610e9f9084906158ee565b60405180910390a15050565b60c98054610eb890615b30565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee490615b30565b8015610f2f5780601f10610f0657610100808354040283529160200191610f2f565b820191905f5260205f20905b815481529060010190602001808311610f1257829003601f168201915b505050505081565b60cb545f908015610f5a57610f55610f4d610d42565b849083613876565b610f5c565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fbd9086815260200190565b60405180910390a350600192915050565b60cb545f908015610f5a57610f5581610fe5610d42565b859190613a07565b60dd5460de545f9190828183106110065760d85461100a565b60d9545b60da549091505f906110459061102d90600160481b900463ffffffff1642615b68565b6110379084615b7b565b61104090615b92565b613a34565b61105790670de0b6b3a7640000615bac565b90506110638185613894565b61107f61107883670de0b6b3a7640000615b68565b8590613894565b6110899190615b1d565b94505050505090565b5f61109c8161391e565b82826040516020016110af929190615bcb565b60405160208183030381529060405260c990816110cc9190615c46565b5082826040516020016110e0929190615d00565b60405160208183030381529060405260ca90816110fd9190615c46565b50505050565b5f61110c613ba7565b611114613bb6565b845f036111345760405163774257f760e01b815260040160405180910390fd5b60da5461114890879060ff1660035f613be1565b5f86815260d160205260409020611165611160613d7b565b613e89565b61116f8188613ec6565b60dd5f82825461117f9190615b1d565b909155505060e3546001600160a01b031680156111f057604051636c912dad60e01b81526001600160a01b03821690636c912dad906111c29087906004016158da565b5f604051808303815f87803b1580156111d9575f80fd5b505af11580156111eb573d5f803e3d5ffd5b505050505b5f6111fb8389613f44565b9050801561127f575f8160d3546112129190615b1d565b60dc549091506112509061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b60dd54906001600160801b0316613894565b60d45461125d9083615b1d565b111561127b57604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061128a610fed565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff166112d88a600101548b5f015489613f80565b6112e28888613fad565b6112ef898960d354613fc5565b6040518663ffffffff1660e01b815260040161130f959493929190615d3d565b602060405180830381865afa15801561132a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061134e9190615d63565b905061137361136c611360428f615b68565b83906301e13380613876565b8c90613fe1565b935050505080886113849190615b1d565b9350868411156113a757604051632c1b6b4160e21b815260040160405180910390fd5b6113b18585613ff5565b5f89815260d0602090815260408083206001600160a01b038916845290915281208054909103611408576001600160a01b0386165f90815260d2602052604090206001810154611401908c61406b565b6001909101555b5f8061144b61141685614154565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614180565b91509150815f1461146f5781866002015f8282546114699190615b1d565b90915550505b611478816141cc565b60405180604001604052808c855f01546114929190615b1d565b81526020018585600101546114a79190615b1d565b90525f8d815260d0602090815260408083206001600160a01b03808e168086529184529382902085518155949092015160019094019390935591519194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139061151d9033908e908890615d7a565b60405180910390a461152d6139a1565b611536896141f8565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906115849030908990600401615d9b565b5f604051808303815f87803b15801561159b575f80fd5b505af11580156115ad573d5f803e3d5ffd5b506115e79250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614246565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b81156116c85760018216156116ad575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916116689190615b1d565b90506116748188615b1d565b9650824211156116aa5761169d8561168c8542615b68565b6116969190615b7b565b8290613894565b6116a79088615b1d565b96505b50505b60019190911c906116c16224ea0082615b1d565b9050611624565b600284015480156116e9576116dc81611cf6565b6116e69087615b1d565b95505b5050505050919050565b5f6116fc613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53086611736866121f0565b6040518463ffffffff1660e01b815260040161175493929190615db5565b5f6040518083038186803b15801561176a575f80fd5b505afa15801561177c573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561184657604051630149e46f60e01b81526001600160a01b03821690630149e46f906117bf9088906004016158da565b5f604051808303815f87803b1580156117d6575f80fd5b505af11580156117e8573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f91506118189087906004016158da565b5f604051808303815f87803b15801561182f575f80fd5b505af1158015611841573d5f803e3d5ffd5b505050505b611851858585614291565b95945050505050565b5f6118648161391e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610e9f565b5f6118b08161391e565b6118bb611160613d7b565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119308161391e565b61193a838361436b565b505050565b5f611948613ba7565b611950613bb6565b835f03611970576040516356316e8760e01b815260040160405180910390fd5b60da5461198490869060ff1660035f613be1565b5f85815260d1602052604081209061199c8288613ec6565b90506119a9611160613d7b565b8060dd5f8282546119ba9190615b1d565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f9182916119ff918a906143f0565b9092509050611a0e8289615b1d565b945086851015611a3157604051632c1b6b4160e21b815260040160405180910390fd5b611a3b8489614441565b60d35f828254611a4b9190615b68565b90915550611a5b90508183615b1d565b846002015f828254611a6d9190615b68565b925050819055508060d55f828254611a859190615b1d565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611ada576001600160a01b0387165f90815260d2602052604090208054611ad7908c61406b565b90555b88815f015f828254611aec9190615b1d565b9250508190555082816001015f828254611b069190615b1d565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611b5b6139a1565b611b648a6141f8565b611b996001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614471565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611bdb57611bd66144c9565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611c14575f80fd5b611c1e8282614562565b5050565b5f611c2b613ba7565b60da54611c4090869060ff1660036002613be1565b611c4e8585858560016145c8565b9050611c586139a1565b611c8d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b949350505050565b5f80516020615f80833981519152611cac8161391e565b611cb4614952565b50565b5f611cc18161391e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610e9f565b60df545f908015610f5a57610f55611d0c61378b565b849083613a07565b5f611d1d613ba7565b6001600160a01b0384163303611d46576040516344511af160e01b815260040160405180910390fd5b611d4e613928565b60dd5f828254611d5e9190615b1d565b909155505060405163042dcf6b60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890611db5903090869089908990600401615dd9565b602060405180830381865afa158015611dd0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df49190615d63565b9250825f03611e165760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611e5057508515155b15611f5d576001821615611f42575f81421015611e8757611e748288898b5f6145c8565b9050611e808188615b68565b9650611f34565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611eb99190615b1d565b9150505f611ee060d6548542611ecf9190615b68565b611ed99190615b7b565b8390613894565b611eea9083615b1d565b9050888111611ef95788611f04565b611f04898383613876565b9250825f03611f15575f9850611f31565b611f2284848b8d5f6145c8565b9250611f2e838a615b68565b98505b50505b611f3e8186615b1d565b9450505b60019190911c90611f566224ea0082615b1d565b9050611e42565b50508315801590611f715750600281015415155b15611fa6575f611f808561327c565b90508015611fa4575f611f938288614994565b509050611fa08185615b1d565b9350505b505b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1b003130878a886040518563ffffffff1660e01b8152600401611ffa9493929190615dd9565b6040805180830381865afa158015612014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120389190615e03565b915091508160d55f82825461204d9190615b1d565b90915550612094905033306120628588615b1d565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614471565b306001600160a01b038616036120b5576120b030338984614af1565b61211a565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906120e59033908b908690600401615db5565b5f604051808303815f87803b1580156120fc575f80fd5b505af115801561210e573d5f803e3d5ffd5b5050505061211a6139a1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906121b9908a906004016158da565b5f604051808303815f87803b1580156121d0575f80fd5b505af11580156121e2573d5f803e3d5ffd5b505050505050509392505050565b5f610e1e82610f37565b5f6122048161391e565b61220c614cd9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61225e8361386c565b9050805f0361226b575f80fd5b6122a06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614471565b6122aa8282614d04565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8382614d7a565b60df545f908015610f5a57610f5581610fe561378b565b5f8061231b613ba7565b6123258484614994565b90925090506123326139a1565b6123676001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614471565b9250929050565b5f6123788161391e565b60e35460ff600160a01b90910416151582151514611c1e5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee698906123df90851515815260200190565b60405180910390a25050565b6123f3614dd9565b6123fb614e42565b565b5f6124078161391e565b60db546001600160a01b03161561242357612423611160613d7b565b60db80546001600160a01b0319166001600160a01b0384161790556124466139a1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146124f0576040516317568c8f60e21b815260040160405180910390fd5b6124f8613928565b60dd5f8282546125089190615b1d565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b811561276c576001821615612751575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916125849190615b1d565b905080861061274e5760e3546001600160a01b031680156125f957604051636c912dad60e01b81526001600160a01b03821690636c912dad906125cb908c906004016158da565b5f604051808303815f87803b1580156125e2575f80fd5b505af11580156125f4573d5f803e3d5ffd5b505050505b6126038288615b68565b965061260f8287615b1d565b83545f86815260d1602052604081209298509161262b91614e7f565b905080156126c4578060d35f8282546126449190615b68565b909155505083545f906126739061265b9084614e9e565b5f88815260d160205260409020600201549084613876565b90508060d15f8881526020019081526020015f206002015f8282546126989190615b68565b925050819055508060d55f8282546126b09190615b1d565b909155506126c09050818a615b1d565b9850505b5f85815260d0602090815260408083206001600160a01b038e16845290915281208181556001908101919091558901546126fe9086614eb3565b60018a015560408051848152602081018590526001600160a01b038c1691339188917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a450505b50505b60019190911c906127656224ea0082615b1d565b9050612540565b60028501541580159061278957506127838461327c565b93508315155b156127aa575f6127998588614994565b5090506127a68185615b1d565b9350505b8215612805578260d55f8282546127c19190615b68565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b61280d6139a1565b505050505050565b5f61281f8361300d565b90506128566001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b6128608284614d04565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8184614d7a565b60ca8054610eb890615b30565b5f54610100900460ff16158080156128db57505f54600160ff909116105b806128f45750303b1580156128f457505f5460ff166001145b6128fc575f80fd5b5f805460ff19166001179055801561291d575f805461ff0019166101001790555b612925614f72565b61292d614f84565b60da805468ffffffffffffffff0019166101004263ffffffff1690810263ffffffff60281b191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129805f3361436b565b61298a8b8b611092565b6129938961185a565b61299c88610e24565b6129a5876123fd565b6129ae86612e41565b6129b785611cb7565b6129c084613737565b6129ca83836121fa565b8015612a0f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a25613ba7565b845f03612a455760405163b8cb621960e01b815260040160405180910390fd5b60da54612a5a90879060ff1660036002613be1565b5f86815260d160205260409020612a72611160613d7b565b612a7c8188613ec6565b60dd5f828254612a8c9190615b1d565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612ad69190615b1d565b871115612af15760208101518151612aee9190615b1d565b96505b6040805180820190915281518152602080830151908201525f90612b2190612b19908a614f9e565b518490614fe4565b60d354612b2e9190615b1d565b905060dd5460d45482612b419190615b1d565b1115612b5f57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612c71575f612b73610fed565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bc78a600101548b5f01548a613f80565b612bd18989613fad565b612bdc8a8a8a613fc5565b6040518663ffffffff1660e01b8152600401612bfc959493929190615d3d565b602060405180830381865afa158015612c17573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c3b9190615d63565b9050612c66612c4d611360428f615b68565b612c5f90670de0b6b3a7640000615b1d565b8c90615028565b965050505050612c75565b8692505b85831015612c9657604051632c1b6b4160e21b815260040160405180910390fd5b612ca08484613ff5565b5f80612cec612cb7612cb2878c615b68565b614154565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614180565b9150915081846002015f828254612d039190615b1d565b90915550612d129050816141cc565b612d1c838a61503c565b5060208301518351175f03612d6f575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612d68908c614eb3565b9055612d9f565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b856001600160a01b0316876001600160a01b03168b7fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c338d8a604051612de793929190615d7a565b60405180910390a4612df76139a1565b612e008a6141f8565b612e346001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614246565b5050505095945050505050565b5f612e4b8161391e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610e9f565b5f612e89613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612ec3866121f0565b6040518463ffffffff1660e01b8152600401612ee193929190615db5565b5f6040518083038186803b158015612ef7575f80fd5b505afa158015612f09573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015612fd357604051630149e46f60e01b81526001600160a01b03821690630149e46f90612f4c9033906004016158da565b5f604051808303815f87803b158015612f63575f80fd5b505af1158015612f75573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f9150612fa59087906004016158da565b5f604051808303815f87803b158015612fbc575f80fd5b505af1158015612fce573d5f803e3d5ffd5b505050505b611c8d848461509a565b5f80612fe7613ba7565b612325612ff38561327c565b84614994565b613001613ba7565b61193a33848484614af1565b60cb545f908015610f5a57610f55611d0c610d42565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db59061307590309086908990600401615db5565b5f6040518083038186803b15801561308b575f80fd5b505afa15801561309d573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561310e57604051630149e46f60e01b81526001600160a01b03821690630149e46f906130e09086906004016158da565b5f604051808303815f87803b1580156130f7575f80fd5b505af1158015613109573d5f803e3d5ffd5b505050505b6131198585856150fd565b91506131236139a1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53084613166886121f0565b6040518463ffffffff1660e01b815260040161318493929190615db5565b5f6040518083038186803b15801561319a575f80fd5b505afa1580156131ac573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561321d57604051630149e46f60e01b81526001600160a01b03821690630149e46f906131ef9086906004016158da565b5f604051808303815f87803b158015613206575f80fd5b505af1158015613218573d5f803e3d5ffd5b505050505b6131198585856151f4565b5f6132328161391e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f908015610f5a57610f558161329361378b565b859190613876565b60cb545f908015610f5a57610f5581613293610d42565b6001600160a01b0381165f90815260cc6020526040812054610e1e90610f37565b428410156132df575f80fd5b5f60016132ea611ba6565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156133f2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134285750876001600160a01b0316816001600160a01b0316145b613430575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134a1613ba7565b6134a9613bb6565b835f036134c95760405163774257f760e01b815260040160405180910390fd5b6134d38285613ff5565b60e3546001600160a01b0316801561353f57604051636c912dad60e01b81526001600160a01b03821690636c912dad906135119086906004016158da565b5f604051808303815f87803b158015613528575f80fd5b505af115801561353a573d5f803e3d5ffd5b505050505b61354a611160613d7b565b613553856122fa565b91505f8560d4546135649190615b1d565b60d481905560dc549091506135959061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b8160d3546135a39190615b1d565b11156135c157604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135d29190615b1d565b90915550506001600160a01b0384165f90815260d2602052604081206002018054859290613601908490615b1d565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136596139a1565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906136a79030908890600401615d9b565b5f604051808303815f87803b1580156136be575f80fd5b505af11580156136d0573d5f803e3d5ffd5b5061370a9250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614246565b50509392505050565b5f8281526065602052604090206001015461372d8161391e565b61193a8383614562565b5f6137418161391e565b60dc80546001600160801b03808516600160801b0291161790556040517fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90610e9f9084906158ee565b60d45460dd5460da545f929190839061385890613851906137b990600160281b900463ffffffff1642615b68565b60db546301e13380906001600160a01b0316637c21fb1d6137da888a613fad565b6137e7898b60d354613fc5565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613826573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061384a9190615d63565b9190613876565b8490613894565b90506138648184615b1d565b935050505090565b5f610e1e8261329b565b82820281151584158583048514171661388d575f80fd5b0492915050565b5f610f5c8383670de0b6b3a7640000613876565b60da545f9081906138c490610100900463ffffffff1642615b68565b9050805f036138d4575f91505090565b60da54613918908290613904906138f2906224ea009060ff16615b7b565b60dc546001600160801b031690613894565b61390e9084615b1d565b60d5549190613876565b91505090565b611cb481336152f6565b5f6139316138a8565b90508060d55f8282546139449190615b68565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a1e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a4d57505f919050565b680755bf798b4a1bf1e58212613a61575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156123fb575f80fd5b60e354600160a01b900460ff16156123fb5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613bef6224ea0086615e25565b15613bfc57506001613c4f565b428511613c0b57506002613c4f565b613c1b60ff85166224ea00615b7b565b613c286224ea0042615e25565b613c329042615b68565b613c3c9190615b1d565b851115613c4b57506004613c4f565b5060035b826004811115613c6157613c61615e38565b816004811115613c7357613c73615e38565b14158015613ca35750816004811115613c8e57613c8e615e38565b816004811115613ca057613ca0615e38565b14155b15613d74575f826004811115613cbb57613cbb615e38565b03613d0f57806004811115613cd257613cd2615e38565b836004811115613ce457613ce4615e38565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d2157613d21615e38565b836004811115613d3357613d33615e38565b836004811115613d4557613d45615e38565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d06565b5050505050565b60d45460dd545f919082613d8f8284613fad565b60da549091505f90613de19061107890613db690600160281b900463ffffffff1642615b68565b60db5460d3546301e13380916001600160a01b031690637c21fb1d9088906137e7908b908d90613fc5565b9050613ded8185615b1d565b9350613e0460e2548261389490919063ffffffff16565b945084613e118285615b1d565b613e1b9190615b68565b60dd5560d484905560da805463ffffffff60281b1916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611cb45760e154613ead906001600160a01b0316613ea88361386c565b614d04565b8060dd5f828254613ebe9190615b1d565b909155505050565b60038201545f9042831115613f1a5760028401544260038601819055613f0390613ef1908490615b68565b613efb8487615b68565b839190613876565b9250613f0f8382615b68565b600286015550613f3d565b828103613f29575f9150613f3d565b600384018390556002840180545f90915591505b5092915050565b81545f9081613f538483615b1d565b9050613f6c613f6683876001015461533c565b82614e9e565b613f769082615b68565b9455509192915050565b5f8115801590613f8f57508383115b613f99575f611c8d565b611c8d82613fa78686615b68565b9061534a565b5f825f03613fbb575f610f5c565b610f5c828461534a565b5f835f03613fd3575f611c8d565b611c8d84613fa78486615b1d565b5f610f5c8383670de0b6b3a7640000613a07565b336001600160a01b03831614611c1e576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461193a5761403982610fce565b6140439082615b68565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f036140805750600160201b8117610e1e565b63ffffffff8316808310156140fd575f6224ea0061409e8584615b68565b6140a89190615e4c565b90506140b681610100615b68565b85901c156140d75760405163293cc41f60e21b815260040160405180910390fd5b6140e2816020615b1d565b602086901c901b9450848417600160201b1792505050610e1e565b5f6224ea0061410c8386615b68565b6141169190615e4c565b905060df81111561413a5760405163293cc41f60e21b815260040160405180910390fd5b614145816020615b1d565b6001901b851792505050610e1e565b5f8061416b60e2548461389490919063ffffffff16565b905061417681613e89565b610f5c8184615b68565b5f8082156141b4576141af61419d6141978761535e565b85614e9e565b6141a79085615b68565b859085613876565b6141b6565b5f5b90506141c28185615b68565b9150935093915050565b805f036141d65750565b60e254156141e757611cb481613e89565b8060d55f828254613ebe9190615b1d565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806110fd575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142ea576142c68382615b68565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614311908490615b68565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615fa0833981519152906143589087815260200190565b60405180910390a3506001949350505050565b614375828261247d565b611c1e575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f6143fc8661535e565b905080156144385761441d6144118683614e9e565b60408801519083613876565b92506144298385613894565b91506144358284615b68565b92505b50935093915050565b815460018301545f91906144558482615b1d565b60018601556118516144678383614e9e565b6141979084615b68565b5f6040516323b872dd60e01b5f526001600160a01b0385166004526001600160a01b0384166024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d74575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144fa9190615e5f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61456c828261247d565b15611c1e575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145e95760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906146018289613ec6565b905061460e611160613d7b565b8060dd5f82825461461f9190615b1d565b90915550505f88815260d0602090815260408083206001600160a01b0389168452825280832081518083019092528054808352600190910154928201839052909291614675918b9161467091615b1d565b614e9e565b6040805180820190915283518152602080850151908201529091505f9061469c9083614f9e565b5160e3549091506001600160a01b0316801561470c57604051636c912dad60e01b81526001600160a01b03821690636c912dad906146de908c906004016158da565b5f604051808303815f87803b1580156146f5575f80fd5b505af1158015614707573d5f803e3d5ffd5b505050505b8b4210156147d45760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147549186906143f0565b90925090506147638183615b1d565b886002015f8282546147759190615b68565b909155505089156147a8578060d55f8282546147919190615b1d565b909155506147a190508286615b68565b98506147cd565b6147b28183615b1d565b60d55f8282546147c29190615b1d565b925050819055508498505b505061481b565b60d6546147ef906147e58e42615b68565b6138519190615b7b565b6147f99084615b1d565b96506148058388615b68565b60d55f8282546148159190615b1d565b90915550505b8987111561483c57604051632c1b6b4160e21b815260040160405180910390fd5b6148468683614e7f565b60d35f8282546148569190615b68565b909155506148669050848461503c565b5060208401518451175f036148c2575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d2909252909120908101546148b7908e614eb3565b6001909101556148f2565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a46149438c6141f8565b50505050505095945050505050565b61495a61537c565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516139fd91906158da565b60e3545f9081906001600160a01b03168015614a0457604051636c912dad60e01b81526001600160a01b03821690636c912dad906149d69087906004016158da565b5f604051808303815f87803b1580156149ed575f80fd5b505af11580156149ff573d5f803e3d5ffd5b505050505b614a0f611160613d7b565b6001600160a01b0384165f90815260d2602052604090206002810154614a358782614e9e565b9350614a4084611cf6565b9450845f03614a625760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a739190615b68565b90915550614a8390508482615b68565b82600201819055508360df5f828254614a9c9190615b68565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614b115760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e16ee72090614b5f9087903090600401615d9b565b5f6040518083038186803b158015614b75575f80fd5b505afa158015614b87573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bf857604051630149e46f60e01b81526001600160a01b03821690630149e46f90614bca9086906004016158da565b5f604051808303815f87803b158015614be1575f80fd5b505af1158015614bf3573d5f803e3d5ffd5b505050505b5f614c0283610fce565b9050614c0e838261538a565b614c188482615403565b60408051848152602081018390526001600160a01b03808716929088169133915f80516020615f60833981519152910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c9591815260200190565b60405180910390a3614ca56139a1565b61280d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614246565b614ce1610fed565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d7057604051630149e46f60e01b81526001600160a01b03821690630149e46f90614d429086906004016158da565b5f604051808303815f87803b158015614d59575f80fd5b505af1158015614d6b573d5f803e3d5ffd5b505050505b61193a838361546a565b614d82613ba7565b614d8a613bb6565b614d92614cd9565b5f614d9b613d7b565b90505f614da6613928565b9050614db28482615b1d565b60dd5f828254614dc29190615b1d565b90915550614dd1905082613e89565b6110fd6139a1565b614e037f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361247d565b158015614e245750614e225f80516020615f808339815191523361247d565b155b156123fb57604051631d006fdb60e31b815260040160405180910390fd5b614e4a613ba7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586149873390565b815460018301545f9190614e938483615b68565b855561185161446783835b5f818310614eac5781610f5c565b5090919050565b5f821580614ec6575081600160201b1783145b15614ed257505f610e1e565b63ffffffff8316808303614f4057602184901c60015b60018216158015614ef857508115155b15614f0957600191821c9101614ee8565b6020614f158282615b1d565b9690961c90951b9485614f2b6224ea0083615b7b565b614f359087615b1d565b179350505050610e1e565b6224ea00614f4e8285615b68565b614f589190615e4c565b614f63906020615b1d565b6001901b198416915050610e1e565b5f54610100900460ff166123fb575f80fd5b5f54610100900460ff16614f96575f80fd5b6123fb6154b9565b604080518082019091525f8082526020820152825160208401515f91614fc8916132939082615b1d565b8085529050614fd78184615b68565b6020850152509192915050565b815460018301545f919082614ff98583615b68565b90506150058184614e9e565b61500f8385614e9e565b6150199190615b68565b60019096015550929392505050565b5f610f5c83670de0b6b3a764000084613876565b604080518082019091525f8082526020820152602083015183515f9161506191615b1d565b90505f61506e8483615b68565b855190915061507f90829084613876565b80865261508c9082615b68565b602086015250929392505050565b335f90815260cc60205260408120805483919083906150ba908490615b68565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615fa083398151915290610fbd9086815260200190565b5f61510784610fce565b9050336001600160a01b03831614615174576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151725761514e8282615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61517e848261538a565b6151888282615403565b60408051858152602081018390526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614246565b5f336001600160a01b03831614615260576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461525e5761523a8582615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b615269846121f0565b9050805f03615276575f80fd5b615280818561538a565b61528a8285615403565b60408051828152602081018690526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614246565b615300828261247d565b611c1e5761530d816154d7565b6153188360206154e9565b604051602001615329929190615ee7565b6040516020818303038152906040525f80fd5b5f818311614eac5781610f5c565b5f610f5c83670de0b6b3a764000084613a07565b805160208201515f91906153728282614e9e565b611c8d9083615b68565b60975460ff166123fb575f80fd5b615392613ba7565b61539a614cd9565b6153a5611160613d7b565b5f6153ae613928565b90505f838260dd546153c09190615b1d565b6153ca9190615b68565b90508060d45460d3546153dd9190615b1d565b11156153fb57604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc60205260408120805483929061542a908490615b68565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615fa0833981519152906020015b60405180910390a35050565b8060cb5f82825461547b9190615b1d565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615fa0833981519152910161545e565b5f54610100900460ff166154cb575f80fd5b6097805460ff19169055565b6060610e1e6001600160a01b03831660145b60605f6154f7836002615b7b565b615502906002615b1d565b6001600160401b0381111561551957615519615bee565b6040519080825280601f01601f191660200182016040528015615543576020820181803683370190505b509050600360fc1b815f8151811061555d5761555d615f36565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061558b5761558b615f36565b60200101906001600160f81b03191690815f1a9053505f6155ad846002615b7b565b6155b8906001615b1d565b90505b600181111561562f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106155ec576155ec615f36565b1a60f81b82828151811061560257615602615f36565b60200101906001600160f81b03191690815f1a90535060049490941c9361562881615f4a565b90506155bb565b508315610f5c575f80fd5b6001600160a01b0381168114611cb4575f80fd5b5f6020828403121561565e575f80fd5b8135610f5c8161563a565b5f60208284031215615679575f80fd5b81356001600160e01b031981168114610f5c575f80fd5b80356001600160801b03811681146156a6575f80fd5b919050565b5f602082840312156156bb575f80fd5b610f5c82615690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615709575f80fd5b5035919050565b5f8060408385031215615721575f80fd5b823561572c8161563a565b946020939093013593505050565b5f8083601f84011261574a575f80fd5b5081356001600160401b03811115615760575f80fd5b602083019150836020828501011115612367575f80fd5b5f8060208385031215615788575f80fd5b82356001600160401b0381111561579d575f80fd5b6157a98582860161573a565b90969095509350505050565b5f805f805f60a086880312156157c9575f80fd5b85359450602086013593506040860135925060608601356157e98161563a565b915060808601356157f98161563a565b809150509295509295909350565b5f805f60608486031215615819575f80fd5b83356158248161563a565b925060208401356158348161563a565b929592945050506040919091013590565b803560ff811681146156a6575f80fd5b5f60208284031215615865575f80fd5b610f5c82615845565b5f806040838503121561587f575f80fd5b8235915060208301356158918161563a565b809150509250929050565b5f805f80608085870312156158af575f80fd5b84359350602085013592506040850135915060608501356158cf8161563a565b939692955090935050565b6001600160a01b0391909116815260200190565b6001600160801b0391909116815260200190565b5f805f60608486031215615914575f80fd5b833561591f8161563a565b92506020840135915060408401356159368161563a565b809150509250925092565b5f8060408385031215615952575f80fd5b50508035926020909101359150565b5f60208284031215615971575f80fd5b81358015158114610f5c575f80fd5b5f805f805f805f805f806101208b8d03121561599a575f80fd5b8a356001600160401b038111156159af575f80fd5b6159bb8d828e0161573a565b909b5099506159ce905060208c01615845565b97506159dc60408c01615690565b965060608b01356159ec8161563a565b955060808b0135945060a08b01359350615a0860c08c01615690565b999c989b50969995989497939650919460e0810135936101009091013592509050565b5f805f60608486031215615a3d575f80fd5b833592506020840135615a4f8161563a565b915060408401356159368161563a565b5f805f805f805f60e0888a031215615a75575f80fd5b8735615a808161563a565b96506020880135615a908161563a565b95506040880135945060608801359350615aac60808901615845565b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215615ada575f80fd5b8235615ae58161563a565b915060208301356158918161563a565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610e1e57610e1e615b09565b600181811c90821680615b4457607f821691505b602082108103615b6257634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610e1e57610e1e615b09565b8082028115828204841417610e1e57610e1e615b09565b5f600160ff1b8201615ba657615ba6615b09565b505f0390565b8181035f831280158383131683831282161715613f3d57613f3d615b09565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f82111561193a57805f5260205f20601f840160051c81016020851015615c275750805b601f840160051c820191505b81811015613d74575f8155600101615c33565b81516001600160401b03811115615c5f57615c5f615bee565b615c7381615c6d8454615b30565b84615c02565b6020601f821160018114615ca5575f8315615c8e5750848201515b5f19600385901b1c1916600184901b178455613d74565b5f84815260208120601f198516915b82811015615cd45787850151825560209485019460019092019101615cb4565b5084821015615cf157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b038281168282160390811115610e1e57610e1e615b09565b94855260ff93909316602085015260408401919091526060830152608082015260a00190565b5f60208284031215615d73575f80fd5b5051919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b5f8060408385031215615e14575f80fd5b505080516020909101519092909150565b5f82615e3357615e33615af5565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615e5a57615e5a615af5565b500490565b5f808354615e6c81615b30565b600182168015615e835760018114615e9857615ec5565b60ff1983168652811515820286019350615ec5565b865f5260205f205f5b83811015615ebd57815488820152600190910190602001615ea1565b505081860193505b509195945050505050565b5f81518060208401855e5f93019283525090919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81525f615f126017830185615ed0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526118516011820185615ed0565b634e487b7160e01b5f52603260045260245ffd5b5f81615f5857615f58615b09565b505f19019056fefbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122005ec196d152ea67004b2106a9e8456d6fce9e4ca698150d3a643ce4c0c94880d64736f6c634300081a0033", "storageLayout": { "storage": [ { - "astId": 543, + "astId": 416, "contract": "contracts/Market.sol:Market", "label": "_initialized", "offset": 0, @@ -3528,7 +2785,7 @@ "type": "t_uint8" }, { - "astId": 546, + "astId": 419, "contract": "contracts/Market.sol:Market", "label": "_initializing", "offset": 1, @@ -3536,7 +2793,7 @@ "type": "t_bool" }, { - "astId": 3288, + "astId": 1086, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3544,7 +2801,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 4287, + "astId": 1360, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3568,7 +2825,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 727, + "astId": 600, "contract": "contracts/Market.sol:Market", "label": "_paused", "offset": 0, @@ -3576,7 +2833,7 @@ "type": "t_bool" }, { - "astId": 832, + "astId": 705, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3584,7 +2841,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 35688, + "astId": 16118, "contract": "contracts/Market.sol:Market", "label": "name", "offset": 0, @@ -3592,7 +2849,7 @@ "type": "t_string_storage" }, { - "astId": 35690, + "astId": 16120, "contract": "contracts/Market.sol:Market", "label": "symbol", "offset": 0, @@ -3600,7 +2857,7 @@ "type": "t_string_storage" }, { - "astId": 35694, + "astId": 16124, "contract": "contracts/Market.sol:Market", "label": "totalSupply", "offset": 0, @@ -3608,7 +2865,7 @@ "type": "t_uint256" }, { - "astId": 35698, + "astId": 16128, "contract": "contracts/Market.sol:Market", "label": "balanceOf", "offset": 0, @@ -3616,7 +2873,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 35704, + "astId": 16134, "contract": "contracts/Market.sol:Market", "label": "allowance", "offset": 0, @@ -3624,7 +2881,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 35712, + "astId": 16142, "contract": "contracts/Market.sol:Market", "label": "nonces", "offset": 0, @@ -3632,39 +2889,39 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 15178, + "astId": 7382, "contract": "contracts/Market.sol:Market", "label": "fixedDepositPositions", "offset": 0, "slot": "207", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))" }, { - "astId": 15186, + "astId": 7390, "contract": "contracts/Market.sol:Market", "label": "fixedBorrowPositions", "offset": 0, "slot": "208", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))" }, { - "astId": 15192, + "astId": 7396, "contract": "contracts/Market.sol:Market", "label": "fixedPools", "offset": 0, "slot": "209", - "type": "t_mapping(t_uint256,t_struct(Pool)35048_storage)" + "type": "t_mapping(t_uint256,t_struct(Pool)15534_storage)" }, { - "astId": 15198, + "astId": 7402, "contract": "contracts/Market.sol:Market", "label": "accounts", "offset": 0, "slot": "210", - "type": "t_mapping(t_address,t_struct(Account)19124_storage)" + "type": "t_mapping(t_address,t_struct(Account)11401_storage)" }, { - "astId": 15201, + "astId": 7405, "contract": "contracts/Market.sol:Market", "label": "floatingBackupBorrowed", "offset": 0, @@ -3672,7 +2929,7 @@ "type": "t_uint256" }, { - "astId": 15204, + "astId": 7408, "contract": "contracts/Market.sol:Market", "label": "floatingDebt", "offset": 0, @@ -3680,7 +2937,7 @@ "type": "t_uint256" }, { - "astId": 15207, + "astId": 7411, "contract": "contracts/Market.sol:Market", "label": "earningsAccumulator", "offset": 0, @@ -3688,7 +2945,7 @@ "type": "t_uint256" }, { - "astId": 15210, + "astId": 7414, "contract": "contracts/Market.sol:Market", "label": "penaltyRate", "offset": 0, @@ -3696,7 +2953,7 @@ "type": "t_uint256" }, { - "astId": 15213, + "astId": 7417, "contract": "contracts/Market.sol:Market", "label": "backupFeeRate", "offset": 0, @@ -3704,7 +2961,7 @@ "type": "t_uint256" }, { - "astId": 15216, + "astId": 7420, "contract": "contracts/Market.sol:Market", "label": "dampSpeedUp", "offset": 0, @@ -3712,7 +2969,7 @@ "type": "t_uint256" }, { - "astId": 15219, + "astId": 7423, "contract": "contracts/Market.sol:Market", "label": "dampSpeedDown", "offset": 0, @@ -3720,7 +2977,7 @@ "type": "t_uint256" }, { - "astId": 15222, + "astId": 7426, "contract": "contracts/Market.sol:Market", "label": "maxFuturePools", "offset": 0, @@ -3728,7 +2985,7 @@ "type": "t_uint8" }, { - "astId": 15225, + "astId": 7429, "contract": "contracts/Market.sol:Market", "label": "lastAccumulatorAccrual", "offset": 1, @@ -3736,7 +2993,7 @@ "type": "t_uint32" }, { - "astId": 15228, + "astId": 7432, "contract": "contracts/Market.sol:Market", "label": "lastFloatingDebtUpdate", "offset": 5, @@ -3744,7 +3001,7 @@ "type": "t_uint32" }, { - "astId": 15231, + "astId": 7435, "contract": "contracts/Market.sol:Market", "label": "lastAverageUpdate", "offset": 9, @@ -3752,15 +3009,15 @@ "type": "t_uint32" }, { - "astId": 15235, + "astId": 7439, "contract": "contracts/Market.sol:Market", "label": "interestRateModel", "offset": 0, "slot": "219", - "type": "t_contract(InterestRateModel)15062" + "type": "t_contract(InterestRateModel)7266" }, { - "astId": 15238, + "astId": 7442, "contract": "contracts/Market.sol:Market", "label": "earningsAccumulatorSmoothFactor", "offset": 0, @@ -3768,7 +3025,7 @@ "type": "t_uint128" }, { - "astId": 15241, + "astId": 7445, "contract": "contracts/Market.sol:Market", "label": "reserveFactor", "offset": 16, @@ -3776,7 +3033,7 @@ "type": "t_uint128" }, { - "astId": 15244, + "astId": 7448, "contract": "contracts/Market.sol:Market", "label": "floatingAssets", "offset": 0, @@ -3784,7 +3041,7 @@ "type": "t_uint256" }, { - "astId": 15247, + "astId": 7451, "contract": "contracts/Market.sol:Market", "label": "floatingAssetsAverage", "offset": 0, @@ -3792,7 +3049,7 @@ "type": "t_uint256" }, { - "astId": 15250, + "astId": 7454, "contract": "contracts/Market.sol:Market", "label": "totalFloatingBorrowShares", "offset": 0, @@ -3800,7 +3057,7 @@ "type": "t_uint256" }, { - "astId": 15253, + "astId": 7457, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3808,7 +3065,7 @@ "type": "t_uint256" }, { - "astId": 15256, + "astId": 7460, "contract": "contracts/Market.sol:Market", "label": "treasury", "offset": 0, @@ -3816,7 +3073,7 @@ "type": "t_address" }, { - "astId": 15259, + "astId": 7463, "contract": "contracts/Market.sol:Market", "label": "treasuryFeeRate", "offset": 0, @@ -3824,15 +3081,15 @@ "type": "t_uint256" }, { - "astId": 15263, + "astId": 7467, "contract": "contracts/Market.sol:Market", "label": "rewardsController", "offset": 0, "slot": "227", - "type": "t_contract(RewardsController)23082" + "type": "t_contract(RewardsController)14682" }, { - "astId": 15266, + "astId": 7470, "contract": "contracts/Market.sol:Market", "label": "isFrozen", "offset": 20, @@ -3868,12 +3125,12 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(InterestRateModel)15062": { + "t_contract(InterestRateModel)7266": { "encoding": "inplace", "label": "contract InterestRateModel", "numberOfBytes": "20" }, - "t_contract(RewardsController)23082": { + "t_contract(RewardsController)14682": { "encoding": "inplace", "label": "contract RewardsController", "numberOfBytes": "20" @@ -3892,19 +3149,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_uint256)" }, - "t_mapping(t_address,t_struct(Account)19124_storage)": { + "t_mapping(t_address,t_struct(Account)11401_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct Market.Account)", "numberOfBytes": "32", - "value": "t_struct(Account)19124_storage" + "value": "t_struct(Account)11401_storage" }, - "t_mapping(t_address,t_struct(Position)35054_storage)": { + "t_mapping(t_address,t_struct(Position)15540_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct FixedLib.Position)", "numberOfBytes": "32", - "value": "t_struct(Position)35054_storage" + "value": "t_struct(Position)15540_storage" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -3920,31 +3177,31 @@ "numberOfBytes": "32", "value": "t_struct(RoleData)23_storage" }, - "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))": { + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => mapping(address => struct FixedLib.Position))", "numberOfBytes": "32", - "value": "t_mapping(t_address,t_struct(Position)35054_storage)" + "value": "t_mapping(t_address,t_struct(Position)15540_storage)" }, - "t_mapping(t_uint256,t_struct(Pool)35048_storage)": { + "t_mapping(t_uint256,t_struct(Pool)15534_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct FixedLib.Pool)", "numberOfBytes": "32", - "value": "t_struct(Pool)35048_storage" + "value": "t_struct(Pool)15534_storage" }, "t_string_storage": { "encoding": "bytes", "label": "string", "numberOfBytes": "32" }, - "t_struct(Account)19124_storage": { + "t_struct(Account)11401_storage": { "encoding": "inplace", "label": "struct Market.Account", "members": [ { - "astId": 19119, + "astId": 11396, "contract": "contracts/Market.sol:Market", "label": "fixedDeposits", "offset": 0, @@ -3952,7 +3209,7 @@ "type": "t_uint256" }, { - "astId": 19121, + "astId": 11398, "contract": "contracts/Market.sol:Market", "label": "fixedBorrows", "offset": 0, @@ -3960,7 +3217,7 @@ "type": "t_uint256" }, { - "astId": 19123, + "astId": 11400, "contract": "contracts/Market.sol:Market", "label": "floatingBorrowShares", "offset": 0, @@ -3970,12 +3227,12 @@ ], "numberOfBytes": "96" }, - "t_struct(Pool)35048_storage": { + "t_struct(Pool)15534_storage": { "encoding": "inplace", "label": "struct FixedLib.Pool", "members": [ { - "astId": 35041, + "astId": 15527, "contract": "contracts/Market.sol:Market", "label": "borrowed", "offset": 0, @@ -3983,7 +3240,7 @@ "type": "t_uint256" }, { - "astId": 35043, + "astId": 15529, "contract": "contracts/Market.sol:Market", "label": "supplied", "offset": 0, @@ -3991,7 +3248,7 @@ "type": "t_uint256" }, { - "astId": 35045, + "astId": 15531, "contract": "contracts/Market.sol:Market", "label": "unassignedEarnings", "offset": 0, @@ -3999,7 +3256,7 @@ "type": "t_uint256" }, { - "astId": 35047, + "astId": 15533, "contract": "contracts/Market.sol:Market", "label": "lastAccrual", "offset": 0, @@ -4009,12 +3266,12 @@ ], "numberOfBytes": "128" }, - "t_struct(Position)35054_storage": { + "t_struct(Position)15540_storage": { "encoding": "inplace", "label": "struct FixedLib.Position", "members": [ { - "astId": 35051, + "astId": 15537, "contract": "contracts/Market.sol:Market", "label": "principal", "offset": 0, @@ -4022,7 +3279,7 @@ "type": "t_uint256" }, { - "astId": 35053, + "astId": 15539, "contract": "contracts/Market.sol:Market", "label": "fee", "offset": 0, diff --git a/deployments/optimism/MarketWBTC.json b/deployments/optimism/MarketWBTC.json index 06612a88..758d44fb 100644 --- a/deployments/optimism/MarketWBTC.json +++ b/deployments/optimism/MarketWBTC.json @@ -2989,12 +2989,12 @@ "0xfBa759BCd1a99a7724c5068FEddb4F5b844b941A", "0x9f73066e00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000d36287d058cc4558efe2c1abba9d6de48fcc0f060000000000000000000000000000000000000000000000000000000c206898d5000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000001057acf5f78000000000000000000000000000000000000000000000000000058d15e176280000" ], - "numDeployments": 3, + "numDeployments": 4, "solcInputHash": "222d5883a9f2fda67cf6f52bad6a10a1", "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"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\"},{\"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. NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to fully implement transparency without decoding reverts caused by selector clashes between the proxy and the implementation. WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\",\"kind\":\"dev\",\"methods\":{\"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}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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/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/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": "0x608060405260405162000bb938038062000bb983398101604081905262000026916200038b565b828162000036828260006200004d565b50620000449050826200008a565b50505062000489565b6200005883620000e5565b600082511180620000665750805b1562000085576200008383836200012760201b620000f01760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000b562000156565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e2816200018f565b50565b620000f081620001ed565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200014f838360405180606001604052806027815260200162000b926027913962000247565b9392505050565b60006200018060008051602062000b7283398151915260001b620002c660201b6200011c1760201c565b546001600160a01b0316919050565b6001600160a01b038116620001a357600080fd5b80620001cc60008051602062000b7283398151915260001b620002c660201b6200011c1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200020381620002c960201b6200011f1760201c565b6200020d57600080fd5b80620001cc7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b620002c660201b6200011c1760201c565b6060600080856001600160a01b0316856040516200026691906200046b565b600060405180830381855af49150503d8060008114620002a3576040519150601f19603f3d011682016040523d82523d6000602084013e620002a8565b606091505b509092509050620002bc86838387620002d8565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200030857825160000362000300576001600160a01b0385163b6200030057600080fd5b508162000314565b6200031483836200031c565b949350505050565b8151156200032d5781518083602001fd5b600080fd5b80516001600160a01b03811681146200034a57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200038257818101518382015260200162000368565b50506000910152565b600080600060608486031215620003a157600080fd5b620003ac8462000332565b9250620003bc6020850162000332565b60408501519092506001600160401b0380821115620003da57600080fd5b818601915086601f830112620003ef57600080fd5b8151818111156200040457620004046200034f565b604051601f8201601f19908116603f011681019083821181831017156200042f576200042f6200034f565b816040528281528960208487010111156200044957600080fd5b6200045c83602083016020880162000365565b80955050505050509250925092565b600082516200047f81846020870162000365565b9190910192915050565b6106d980620004996000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61012e565b6001600160a01b031633036100e65760606001600160e01b0319600035166364d3180d60e11b810161005a57610053610161565b91506100de565b63587086bd60e11b6001600160e01b031982160161007a576100536101b8565b63070d7c6960e41b6001600160e01b031982160161009a576100536101fe565b621eb96f60e61b6001600160e01b03198216016100b95761005361022f565b63a39f25e560e01b6001600160e01b03198216016100d95761005361026f565b600080fd5b815160208301f35b6100ee610283565b565b6060610115838360405180606001604052806027815260200161067d60279139610293565b9392505050565b90565b6001600160a01b03163b151590565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b606061016b61030b565b600061017a3660048184610514565b810190610187919061055a565b90506101a481604051806020016040528060008152506000610316565b505060408051602081019091526000815290565b60606000806101ca3660048184610514565b8101906101d7919061058b565b915091506101e782826001610316565b604051806020016040528060008152509250505090565b606061020861030b565b60006102173660048184610514565b810190610224919061055a565b90506101a481610342565b606061023961030b565b600061024361012e565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b606061027961030b565b6000610243610399565b6100ee61028e610399565b6103a8565b6060600080856001600160a01b0316856040516102b0919061064d565b600060405180830381855af49150503d80600081146102eb576040519150601f19603f3d011682016040523d82523d6000602084013e6102f0565b606091505b5091509150610301868383876103cc565b9695505050505050565b34156100ee57600080fd5b61031f8361040a565b60008251118061032c5750805b1561033d5761033b83836100f0565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61036b61012e565b604080516001600160a01b03928316815291841660208301520160405180910390a16103968161044a565b50565b60006103a36104a1565b905090565b3660008037600080366000845af43d6000803e8080156103c7573d6000f35b3d6000fd5b606083156103f85782516000036103f1576001600160a01b0385163b6103f157600080fd5b5081610402565b61040283836104c9565b949350505050565b610413816104d9565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661045d57600080fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610152565b8151156100d95781518083602001fd5b6001600160a01b0381163b6104ed57600080fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610480565b6000808585111561052457600080fd5b8386111561053157600080fd5b5050820193919092039150565b80356001600160a01b038116811461055557600080fd5b919050565b60006020828403121561056c57600080fd5b6101158261053e565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561059e57600080fd5b6105a78361053e565b9150602083013567ffffffffffffffff808211156105c457600080fd5b818501915085601f8301126105d857600080fd5b8135818111156105ea576105ea610575565b604051601f8201601f19908116603f0116810190838211818310171561061257610612610575565b8160405282815288602084870101111561062b57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000825160005b8181101561066e5760208186018101518583015201610654565b50600092019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b01b6cfc5e4b180efda020a05b771d034ebbaca7fb66eb1a85ef640af48786fb64736f6c63430008110033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61001f61012e565b6001600160a01b031633036100e65760606001600160e01b0319600035166364d3180d60e11b810161005a57610053610161565b91506100de565b63587086bd60e11b6001600160e01b031982160161007a576100536101b8565b63070d7c6960e41b6001600160e01b031982160161009a576100536101fe565b621eb96f60e61b6001600160e01b03198216016100b95761005361022f565b63a39f25e560e01b6001600160e01b03198216016100d95761005361026f565b600080fd5b815160208301f35b6100ee610283565b565b6060610115838360405180606001604052806027815260200161067d60279139610293565b9392505050565b90565b6001600160a01b03163b151590565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b606061016b61030b565b600061017a3660048184610514565b810190610187919061055a565b90506101a481604051806020016040528060008152506000610316565b505060408051602081019091526000815290565b60606000806101ca3660048184610514565b8101906101d7919061058b565b915091506101e782826001610316565b604051806020016040528060008152509250505090565b606061020861030b565b60006102173660048184610514565b810190610224919061055a565b90506101a481610342565b606061023961030b565b600061024361012e565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b606061027961030b565b6000610243610399565b6100ee61028e610399565b6103a8565b6060600080856001600160a01b0316856040516102b0919061064d565b600060405180830381855af49150503d80600081146102eb576040519150601f19603f3d011682016040523d82523d6000602084013e6102f0565b606091505b5091509150610301868383876103cc565b9695505050505050565b34156100ee57600080fd5b61031f8361040a565b60008251118061032c5750805b1561033d5761033b83836100f0565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61036b61012e565b604080516001600160a01b03928316815291841660208301520160405180910390a16103968161044a565b50565b60006103a36104a1565b905090565b3660008037600080366000845af43d6000803e8080156103c7573d6000f35b3d6000fd5b606083156103f85782516000036103f1576001600160a01b0385163b6103f157600080fd5b5081610402565b61040283836104c9565b949350505050565b610413816104d9565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661045d57600080fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610152565b8151156100d95781518083602001fd5b6001600160a01b0381163b6104ed57600080fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610480565b6000808585111561052457600080fd5b8386111561053157600080fd5b5050820193919092039150565b80356001600160a01b038116811461055557600080fd5b919050565b60006020828403121561056c57600080fd5b6101158261053e565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561059e57600080fd5b6105a78361053e565b9150602083013567ffffffffffffffff808211156105c457600080fd5b818501915085601f8301126105d857600080fd5b8135818111156105ea576105ea610575565b604051601f8201601f19908116603f0116810190838211818310171561061257610612610575565b8160405282815288602084870101111561062b57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000825160005b8181101561066e5760208186018101518583015201610654565b50600092019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b01b6cfc5e4b180efda020a05b771d034ebbaca7fb66eb1a85ef640af48786fb64736f6c63430008110033", - "implementation": "0x225561CFA7Ff5a44756Ca184C3554882667809D9", + "implementation": "0x7D3dff15129716A41eFF2c64d225F69872E84C96", "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. NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to fully implement transparency without decoding reverts caused by selector clashes between the proxy and the implementation. WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.", "kind": "dev", diff --git a/deployments/optimism/MarketWBTC_Implementation.json b/deployments/optimism/MarketWBTC_Implementation.json index 19b665f0..4021964a 100644 --- a/deployments/optimism/MarketWBTC_Implementation.json +++ b/deployments/optimism/MarketWBTC_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x225561CFA7Ff5a44756Ca184C3554882667809D9", + "address": "0x7D3dff15129716A41eFF2c64d225F69872E84C96", "abi": [ { "inputs": [ @@ -2736,32 +2736,32 @@ "type": "function" } ], - "transactionHash": "0x0a2575e62119bed46947a8d6bd10776d5219f344cbfd806eb63307f5b3ca7184", + "transactionHash": "0x02c815f4fa7412b27b95d52aab780d774be4db462488bc0fbb8de4d58d4f0886", "receipt": { "to": null, "from": "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", - "contractAddress": "0x225561CFA7Ff5a44756Ca184C3554882667809D9", - "transactionIndex": 7, - "gasUsed": "5366975", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000100000000000000000000000000000040001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd1484a0e29a14f4abce307691297cd1bf503b31853caa24c88ea08b92744eea7", - "transactionHash": "0x0a2575e62119bed46947a8d6bd10776d5219f344cbfd806eb63307f5b3ca7184", + "contractAddress": "0x7D3dff15129716A41eFF2c64d225F69872E84C96", + "transactionIndex": 9, + "gasUsed": "5411812", + "logsBloom": "0x00000000020000000000000000000000100000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2f63c1f984563baecf4d6c87e5f97531e0270a30b6ca2e4117c56001ec1c8a9f", + "transactionHash": "0x02c815f4fa7412b27b95d52aab780d774be4db462488bc0fbb8de4d58d4f0886", "logs": [ { - "transactionIndex": 7, - "blockNumber": 118840690, - "transactionHash": "0x0a2575e62119bed46947a8d6bd10776d5219f344cbfd806eb63307f5b3ca7184", - "address": "0x225561CFA7Ff5a44756Ca184C3554882667809D9", + "transactionIndex": 9, + "blockNumber": 124901250, + "transactionHash": "0x02c815f4fa7412b27b95d52aab780d774be4db462488bc0fbb8de4d58d4f0886", + "address": "0x7D3dff15129716A41eFF2c64d225F69872E84C96", "topics": [ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" ], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 47, - "blockHash": "0xd1484a0e29a14f4abce307691297cd1bf503b31853caa24c88ea08b92744eea7" + "logIndex": 49, + "blockHash": "0x2f63c1f984563baecf4d6c87e5f97531e0270a30b6ca2e4117c56001ec1c8a9f" } ], - "blockNumber": 118840690, - "cumulativeGasUsed": "7368312", + "blockNumber": 124901250, + "cumulativeGasUsed": "7311032", "status": 1, "byzantium": true }, @@ -2769,758 +2769,15 @@ "0x68f180fcCe6836688e9084f035309E29Bf0A2095", "0xaEb62e6F27BC103702E7BC879AE98bceA56f027E" ], - "numDeployments": 3, - "solcInputHash": "e3ac7af802d0124bd24cbb337b6ddc93", - "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"contract Auditor\",\"name\":\"auditor_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Disagreement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientProtocolLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketFrozen\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaturityOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAuditor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPausingRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SelfLiquidation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolState\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"alternativeState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolStates\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBorrow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRepay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWithdraw\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AccumulatorAccrual\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"backupFeeRate\",\"type\":\"uint256\"}],\"name\":\"BackupFeeRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"BorrowAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedUp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedDown\",\"type\":\"uint256\"}],\"name\":\"DampSpeedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"DepositAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulatorSmoothFactor\",\"type\":\"uint256\"}],\"name\":\"EarningsAccumulatorSmoothFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"}],\"name\":\"FixedEarningsUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilization\",\"type\":\"uint256\"}],\"name\":\"FloatingDebtUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isFrozen\",\"type\":\"bool\"}],\"name\":\"Frozen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel\",\"type\":\"address\"}],\"name\":\"InterestRateModelSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lendersAssets\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizedAssets\",\"type\":\"uint256\"}],\"name\":\"Liquidate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDepositShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDebt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulator\",\"type\":\"uint256\"}],\"name\":\"MarketUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxFuturePools\",\"type\":\"uint256\"}],\"name\":\"MaxFuturePoolsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyRate\",\"type\":\"uint256\"}],\"name\":\"PenaltyRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Repay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"name\":\"RepayAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveFactor\",\"type\":\"uint256\"}],\"name\":\"ReserveFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController\",\"type\":\"address\"}],\"name\":\"RewardsControllerSet\",\"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\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"SpreadBadDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate\",\"type\":\"uint256\"}],\"name\":\"TreasurySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"WithdrawAtMaturity\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EMERGENCY_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"accountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fixedDeposits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fixedBorrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auditor\",\"outputs\":[{\"internalType\":\"contract Auditor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"backupFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrowAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsOwed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"clearBadDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"depositAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulatorSmoothFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedBorrowPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedDepositPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"fixedPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplied\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastAccrual\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingBackupBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"maxFuturePools_\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedUp_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedDown_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAccumulatorAccrual\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAverageUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFloatingDebtUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxFuturePools\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"previewDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"debt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewFloatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRefund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewRepay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repayAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepayAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsController\",\"outputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"}],\"name\":\"setAssetSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setBackupFeeRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"up\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"down\",\"type\":\"uint256\"}],\"name\":\"setDampSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"}],\"name\":\"setEarningsAccumulatorSmoothFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isFrozen_\",\"type\":\"bool\"}],\"name\":\"setFrozen\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"futurePools\",\"type\":\"uint8\"}],\"name\":\"setMaxFuturePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"}],\"name\":\"setReserveFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController_\",\"type\":\"address\"}],\"name\":\"setRewardsController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setTreasury\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasuryFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsDiscounted\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\"}},\"BackupFeeRateSet(uint256)\":{\"params\":{\"backupFeeRate\":\"rate charged to the fixed pools to be accrued by the floating depositors.\"}},\"Borrow(address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"receiver\":\"address that received the borrowed assets.\",\"shares\":\"amount of borrow shares assigned to the account.\"}},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"fee\":\"extra amount that will need to be paid at maturity.\",\"maturity\":\"maturity in which the account will have to repay the loan.\",\"receiver\":\"address that received the borrowed assets.\"}},\"DampSpeedSet(uint256,uint256)\":{\"params\":{\"dampSpeedDown\":\"represented with 18 decimals.\",\"dampSpeedUp\":\"represented with 18 decimals.\"}},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were deposited.\",\"caller\":\"address which deposited the assets.\",\"fee\":\"is the extra amount that it will be collected at maturity.\",\"maturity\":\"maturity at which the account will be able to collect his deposit + his fee.\",\"owner\":\"address that will be able to withdraw the deposited assets.\"}},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"params\":{\"earningsAccumulatorSmoothFactor\":\"factor represented with 18 decimals.\"}},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"params\":{\"maturity\":\"maturity date where the earnings were updated.\",\"timestamp\":\"current timestamp.\",\"unassignedEarnings\":\"pending unassigned earnings.\"}},\"FloatingDebtUpdate(uint256,uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\",\"utilization\":\"new floating utilization.\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InterestRateModelSet(address)\":{\"params\":{\"interestRateModel\":\"new interest rate model to be used to calculate rates.\"}},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were repaid.\",\"borrower\":\"address which had the original debt.\",\"lendersAssets\":\"incentive paid to lenders.\",\"receiver\":\"address which repaid the previously borrowed amount.\",\"seizeMarket\":\"address of the asset that were seized by the liquidator.\",\"seizedAssets\":\"amount seized of the collateral.\"}},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"earningsAccumulator\":\"earnings accumulator.\",\"floatingAssets\":\"total floating supply assets.\",\"floatingBorrowShares\":\"total floating borrow shares.\",\"floatingDebt\":\"total floating borrow assets.\",\"floatingDepositShares\":\"total floating supply shares.\",\"timestamp\":\"current timestamp.\"}},\"MaxFuturePoolsSet(uint256)\":{\"params\":{\"maxFuturePools\":\"represented with 0 decimals.\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PenaltyRateSet(uint256)\":{\"params\":{\"penaltyRate\":\"penaltyRate percentage per second represented with 18 decimals.\"}},\"Repay(address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"shares\":\"amount of borrow shares that were subtracted from the account's accountability.\"}},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"maturity\":\"maturity where the account repaid its borrowed amounts.\",\"positionAssets\":\"amount of the debt that was covered in this repayment (penalties could have been repaid).\"}},\"ReserveFactorSet(uint256)\":{\"params\":{\"reserveFactor\":\"reserveFactor percentage.\"}},\"RewardsControllerSet(address)\":{\"params\":{\"rewardsController\":\"new rewards controller to update account rewards when operating with the Market.\"}},\"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`)\"},\"Seize(address,address,uint256)\":{\"params\":{\"assets\":\"amount seized of the collateral.\",\"borrower\":\"address which had the original debt.\",\"liquidator\":\"address which seized this collateral.\"}},\"SpreadBadDebt(address,uint256)\":{\"params\":{\"assets\":\"amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\",\"borrower\":\"address which was cleared from bad debt.\"}},\"TreasurySet(address,uint256)\":{\"params\":{\"treasury\":\"address of the treasury that will receive the minted eTokens.\",\"treasuryFeeRate\":\"represented with 18 decimals.\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets withdrawn (can include a discount for early withdraw).\",\"caller\":\"address which withdraw the asset.\",\"maturity\":\"maturity where the account withdraw its deposits.\",\"owner\":\"address which had the assets withdrawn.\",\"positionAssets\":\"position size reduced.\",\"receiver\":\"address which will be collecting the assets.\"}}},\"kind\":\"dev\",\"methods\":{\"accountSnapshot(address)\":{\"params\":{\"account\":\"account to return status snapshot in the specified maturity date.\"},\"returns\":{\"_0\":\"the amount deposited to the floating pool and the amount owed to floating and fixed pools.\"}},\"borrow(uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"borrowShares\":\"shares corresponding to the borrowed assets.\"}},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"maturity\":\"maturity date for repayment.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"assetsOwed\":\"total amount of assets (principal + fee) to be repaid at maturity.\"}},\"clearBadDebt(address)\":{\"details\":\"Can only be called from the auditor.\",\"params\":{\"borrower\":\"account with insufficient collateral to be cleared the debt.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"assets\":\"amount to receive from the msg.sender.\",\"maturity\":\"maturity date where the assets will be deposited.\",\"minAssetsRequired\":\"minimum amount of assets required by the depositor for the transaction to be accepted.\",\"receiver\":\"address that will be able to withdraw the deposited assets.\"},\"returns\":{\"positionAssets\":\"total amount of assets (principal + fee) to be withdrawn at maturity.\"}},\"fixedPoolBalance(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed and supplied amount of the fixed pool.\"}},\"fixedPoolBorrowed(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed amount of the fixed pool.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"details\":\"can only be called once.\"},\"liquidate(address,uint256,address)\":{\"details\":\"Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.\",\"params\":{\"borrower\":\"account that has an outstanding debt across floating or fixed pools.\",\"maxAssets\":\"maximum amount of debt that the liquidator is willing to accept. (it can be less)\",\"seizeMarket\":\"market from which the collateral will be seized to give to the liquidator.\"},\"returns\":{\"repaidAssets\":\"actual amount repaid.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"previewBorrow(uint256)\":{\"params\":{\"assets\":\"amount of assets to borrow.\"},\"returns\":{\"_0\":\"amount of shares that will be asigned to the account after the borrow.\"}},\"previewDebt(address)\":{\"params\":{\"borrower\":\"account to return status snapshot for fixed and floating borrows.\"},\"returns\":{\"debt\":\"the total debt, denominated in number of assets.\"}},\"previewFloatingAssetsAverage()\":{\"returns\":{\"_0\":\"projected `floatingAssetsAverage`.\"}},\"previewRefund(uint256)\":{\"params\":{\"shares\":\"amount of shares to subtract from caller's accountability.\"},\"returns\":{\"_0\":\"amount of assets that will be repaid.\"}},\"previewRepay(uint256)\":{\"params\":{\"assets\":\"amount of assets to repay.\"},\"returns\":{\"_0\":\"amount of shares that will be subtracted from the account after the repay.\"}},\"redeem(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\",\"shares\":\"amount of shares to be redeemed for underlying asset.\"},\"returns\":{\"assets\":\"amount of underlying asset that was withdrawn.\"}},\"refund(uint256,address)\":{\"params\":{\"borrowShares\":\"shares to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualShares\":\"actual subtracted shares from the borrower's accountability.\",\"assets\":\"subtracted assets from the borrower's accountability.\"}},\"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.\"},\"repay(uint256,address)\":{\"params\":{\"assets\":\"assets to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualRepay\":\"the actual amount that should be transferred into the protocol.\",\"borrowShares\":\"subtracted shares from the borrower's accountability.\"}},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"borrower\":\"address of the account that has the debt.\",\"maturity\":\"maturity date where the assets will be repaid.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept to be repaid.\",\"positionAssets\":\"amount to be paid for the borrower's debt.\"},\"returns\":{\"actualRepayAssets\":\"the actual amount that was transferred into the protocol.\"}},\"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.\"},\"seize(address,address,uint256)\":{\"details\":\"Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\",\"params\":{\"assets\":\"amount to be removed from borrower's possession.\",\"borrower\":\"address from which the assets will be seized.\",\"liquidator\":\"address which will receive the seized assets.\"}},\"setAssetSymbol(string)\":{\"params\":{\"assetSymbol\":\"the symbol for the underlying asset.\"}},\"setBackupFeeRate(uint256)\":{\"params\":{\"backupFeeRate_\":\"percentage amount represented with 18 decimals.\"}},\"setDampSpeed(uint256,uint256)\":{\"params\":{\"down\":\"damp speed down, represented with 18 decimals.\",\"up\":\"damp speed up, represented with 18 decimals.\"}},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"params\":{\"earningsAccumulatorSmoothFactor_\":\"represented with 18 decimals.\"}},\"setInterestRateModel(address)\":{\"params\":{\"interestRateModel_\":\"new interest rate model.\"}},\"setMaxFuturePools(uint8)\":{\"details\":\"If value is decreased, VALID maturities will become NOT_READY.\",\"params\":{\"futurePools\":\"number of pools to be active at the same time.\"}},\"setPenaltyRate(uint256)\":{\"params\":{\"penaltyRate_\":\"percentage represented with 18 decimals.\"}},\"setReserveFactor(uint128)\":{\"params\":{\"reserveFactor_\":\"parameter represented with 18 decimals.\"}},\"setRewardsController(address)\":{\"params\":{\"rewardsController_\":\"new rewards controller.\"}},\"setTreasury(address,uint256)\":{\"params\":{\"treasuryFeeRate_\":\"represented with 18 decimals.\",\"treasury_\":\"address of the treasury that will receive the minted eTokens.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalAssets()\":{\"returns\":{\"_0\":\"actual floatingAssets plus earnings to be accrued at current timestamp.\"}},\"totalFloatingBorrowAssets()\":{\"returns\":{\"_0\":\"actual floating debt plus projected interest.\"}},\"transfer(address,uint256)\":{\"details\":\"Makes sure that the caller doesn't have shortfall after transferring.\",\"params\":{\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Makes sure that `from` address doesn't have shortfall after transferring.\",\"params\":{\"from\":\"address from which the assets will be transferred.\",\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"withdraw(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"assets\":\"amount of underlying to be withdrawn.\",\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\"},\"returns\":{\"shares\":\"amount of shares redeemed for underlying asset.\"}},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"maturity\":\"maturity date where the assets will be withdrawn.\",\"minAssetsRequired\":\"minimum amount required by the account (if discount included for early withdrawal).\",\"owner\":\"address that previously deposited the assets.\",\"positionAssets\":\"position size to be reduced.\",\"receiver\":\"address that will receive the withdrawn assets.\"},\"returns\":{\"assetsDiscounted\":\"amount of assets withdrawn (can include a discount for early withdraw).\"}}},\"stateVariables\":{\"__gap\":{\"custom:oz-renamed-from\":\"floatingUtilization\",\"details\":\"gap from deprecated state.\"},\"auditor\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"notice\":\"Emitted when accumulator distributes earnings.\"},\"BackupFeeRateSet(uint256)\":{\"notice\":\"Emitted when the backupFeeRate parameter is changed by admin.\"},\"Borrow(address,address,address,uint256,uint256)\":{\"notice\":\"Event emitted when an account borrows amount of assets from a floating pool.\"},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account borrows amount of an asset from a certain maturity date.\"},\"DampSpeedSet(uint256,uint256)\":{\"notice\":\"Emitted when the damp speeds are changed by admin.\"},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period.\"},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"notice\":\"Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\"},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"notice\":\"Emitted when the earnings of a maturity are updated.\"},\"FloatingDebtUpdate(uint256,uint256)\":{\"notice\":\"Emitted when the floating debt is updated.\"},\"Frozen(address,bool)\":{\"notice\":\"Emitted when `account` sets the `isFrozen` flag.\"},\"InterestRateModelSet(address)\":{\"notice\":\"Emitted when the interestRateModel is changed by admin.\"},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"notice\":\"Emitted when an account's position had a liquidation.\"},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when market state is updated.\"},\"MaxFuturePoolsSet(uint256)\":{\"notice\":\"Emitted when the maxFuturePools is changed by admin.\"},\"PenaltyRateSet(uint256)\":{\"notice\":\"Emitted when the penaltyRate is changed by admin.\"},\"Repay(address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays amount of assets to a floating pool.\"},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays its borrows after maturity.\"},\"ReserveFactorSet(uint256)\":{\"notice\":\"Emitted when the reserveFactor is changed by admin.\"},\"RewardsControllerSet(address)\":{\"notice\":\"Emitted when the rewardsController is changed by admin.\"},\"Seize(address,address,uint256)\":{\"notice\":\"Emitted when an account's collateral has been seized.\"},\"SpreadBadDebt(address,uint256)\":{\"notice\":\"Emitted when an account is cleared from bad debt.\"},\"TreasurySet(address,uint256)\":{\"notice\":\"Emitted when the treasury variables are changed by admin.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account withdraws from a fixed rate pool.\"}},\"kind\":\"user\",\"methods\":{\"accountSnapshot(address)\":{\"notice\":\"Gets current snapshot for an account across all maturities.\"},\"accounts(address)\":{\"notice\":\"Tracks fixed deposit and borrow map and floating borrow shares of an account.\"},\"backupFeeRate()\":{\"notice\":\"Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\"},\"borrow(uint256,address,address)\":{\"notice\":\"Borrows a certain amount from the floating pool.\"},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Borrows a certain amount from a maturity.\"},\"clearBadDebt(address)\":{\"notice\":\"Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\"},\"dampSpeedDown()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\"},\"dampSpeedUp()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Deposits a certain amount to a maturity.\"},\"earningsAccumulator()\":{\"notice\":\"Accumulated earnings from extraordinary sources to be gradually distributed.\"},\"earningsAccumulatorSmoothFactor()\":{\"notice\":\"Factor used for gradual accrual of earnings to the floating pool.\"},\"fixedBorrowPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed borrow positions by maturity, account and position.\"},\"fixedDepositPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed deposit positions by maturity, account and position.\"},\"fixedPoolBalance(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed and supplied amount.\"},\"fixedPoolBorrowed(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed amount.\"},\"fixedPools(uint256)\":{\"notice\":\"Tracks fixed pools state by maturity.\"},\"floatingAssets()\":{\"notice\":\"Amount of floating assets deposited to the pool.\"},\"floatingAssetsAverage()\":{\"notice\":\"Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\"},\"floatingBackupBorrowed()\":{\"notice\":\"Amount of assets lent by the floating pool to the fixed pools.\"},\"floatingDebt()\":{\"notice\":\"Amount of assets lent by the floating pool to accounts.\"},\"initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"notice\":\"Initializes the contract.\"},\"interestRateModel()\":{\"notice\":\"Interest rate model contract used to get the borrow rates.\"},\"isFrozen()\":{\"notice\":\"Flag to prevent new borrows and deposits.\"},\"lastAccumulatorAccrual()\":{\"notice\":\"Last time the accumulator distributed earnings.\"},\"lastAverageUpdate()\":{\"notice\":\"Last time the floating assets average was updated.\"},\"lastFloatingDebtUpdate()\":{\"notice\":\"Last time the floating debt was updated.\"},\"liquidate(address,uint256,address)\":{\"notice\":\"Liquidates undercollateralized fixed/floating (or both) position(s).\"},\"maxFuturePools()\":{\"notice\":\"Number of fixed pools to be active at the same time.\"},\"pause()\":{\"notice\":\"Sets the pause state to true in case of emergency, triggered by an authorized account.\"},\"penaltyRate()\":{\"notice\":\"Rate per second to be charged to delayed fixed pools borrowers after maturity.\"},\"previewBorrow(uint256)\":{\"notice\":\"Simulates the effects of a borrow at the current time, given current contract conditions.\"},\"previewDebt(address)\":{\"notice\":\"Gets all borrows and penalties for an account.\"},\"previewFloatingAssetsAverage()\":{\"notice\":\"Returns the current `floatingAssetsAverage` without updating the storage variable.\"},\"previewRefund(uint256)\":{\"notice\":\"Simulates the effects of a refund at the current time, given current contract conditions.\"},\"previewRepay(uint256)\":{\"notice\":\"Simulates the effects of a repay at the current time, given current contract conditions.\"},\"redeem(uint256,address,address)\":{\"notice\":\"Redeems the owner's floating pool assets to the receiver address.\"},\"refund(uint256,address)\":{\"notice\":\"Repays a certain amount of shares to the floating pool.\"},\"repay(uint256,address)\":{\"notice\":\"Repays a certain amount of assets to the floating pool.\"},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Repays a certain amount to a maturity.\"},\"reserveFactor()\":{\"notice\":\"Percentage factor that represents the liquidity reserves that can't be borrowed.\"},\"rewardsController()\":{\"notice\":\"Address of the rewards controller that will accrue rewards for accounts operating with the Market.\"},\"seize(address,address,uint256)\":{\"notice\":\"Public function to seize a certain amount of assets.\"},\"setAssetSymbol(string)\":{\"notice\":\"Sets name and symbol for the Market.\"},\"setBackupFeeRate(uint256)\":{\"notice\":\"Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity.\"},\"setDampSpeed(uint256,uint256)\":{\"notice\":\"Sets the damp speed used to update the floatingAssetsAverage.\"},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"notice\":\"Sets the factor used when smoothly accruing earnings to the floating pool.\"},\"setFrozen(bool)\":{\"notice\":\"Sets `isFrozen` state, triggered by an authorized account.\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model to be used to calculate rates.\"},\"setMaxFuturePools(uint8)\":{\"notice\":\"Sets the protocol's max future pools for fixed borrowing and lending.\"},\"setPenaltyRate(uint256)\":{\"notice\":\"Sets the penalty rate per second.\"},\"setReserveFactor(uint128)\":{\"notice\":\"Sets the percentage that represents the liquidity reserves that can't be borrowed.\"},\"setRewardsController(address)\":{\"notice\":\"Sets the rewards controller to update account rewards when operating with the Market.\"},\"setTreasury(address,uint256)\":{\"notice\":\"Sets the treasury variables.\"},\"totalAssets()\":{\"notice\":\"Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator.\"},\"totalFloatingBorrowAssets()\":{\"notice\":\"Calculates the total floating debt, considering elapsed time since last update and current interest rate.\"},\"totalFloatingBorrowShares()\":{\"notice\":\"Total amount of floating borrow shares assigned to floating borrow accounts.\"},\"transfer(address,uint256)\":{\"notice\":\"Moves amount of shares from the caller's account to `to`.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Moves amount of shares from `from` to `to` using the allowance mechanism.\"},\"treasury()\":{\"notice\":\"Address of the treasury that will receive the allocated earnings.\"},\"treasuryFeeRate()\":{\"notice\":\"Rate to be charged by the treasury to floating and fixed borrows.\"},\"unpause()\":{\"notice\":\"Sets the pause state to false when threat is gone, triggered by an authorized account.\"},\"withdraw(uint256,address,address)\":{\"notice\":\"Withdraws the owner's floating pool assets to the receiver address.\"},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Withdraws a certain amount from a maturity.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Market.sol\":\"Market\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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 {Initializable} from \\\"../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 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 function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_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(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\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"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/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\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\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"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 (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport {Initializable} from \\\"../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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\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\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"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 {Initializable} from \\\"../../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\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"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/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\"},\"contracts/Auditor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract Auditor is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n\\n /// @notice Address that a market should have as price feed to consider as base price and avoid external price call.\\n address public constant BASE_FEED = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n /// @notice Target health factor that the account should have after it's liquidated to prevent cascade liquidations.\\n uint256 public constant TARGET_HEALTH = 1.25e18;\\n /// @notice Maximum value the liquidator can send and still have granular control of max assets.\\n /// Above this threshold, they should send `type(uint256).max`.\\n uint256 public constant ASSETS_THRESHOLD = type(uint256).max / 1e18;\\n\\n /// @notice Decimals that the answer of all price feeds should have.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 public immutable priceDecimals;\\n /// @notice Base factor to scale the price returned by the feed to 18 decimals.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable baseFactor;\\n /// @notice Base price used if the feed to fetch the price from is `BASE_FEED`.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable basePrice;\\n\\n /// @notice Tracks the markets' indexes that an account has entered as collateral.\\n mapping(address => uint256) public accountMarkets;\\n /// @notice Stores market parameters per each enabled market.\\n mapping(Market => MarketData) public markets;\\n /// @notice Array of all enabled markets.\\n Market[] public marketList;\\n\\n /// @notice Liquidation incentive factors for the liquidator and the lenders of the market where the debt is repaid.\\n LiquidationIncentive public liquidationIncentive;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(uint256 priceDecimals_) {\\n priceDecimals = priceDecimals_;\\n baseFactor = 10 ** (18 - priceDecimals_);\\n basePrice = 10 ** priceDecimals_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(LiquidationIncentive memory liquidationIncentive_) external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setLiquidationIncentive(liquidationIncentive_);\\n }\\n\\n /// @notice Allows assets of a certain market to be used as collateral for borrowing other assets.\\n /// @param market market to enabled as collateral.\\n function enterMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) != 0) return;\\n accountMarkets[msg.sender] = marketMap | marketMask;\\n\\n emit MarketEntered(market, msg.sender);\\n }\\n\\n /// @notice Removes market from sender's account liquidity calculation.\\n /// @dev Sender must not have an outstanding borrow balance in the asset, or be providing necessary collateral\\n /// for an outstanding borrow.\\n /// @param market market to be disabled as collateral.\\n function exitMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n (uint256 assets, uint256 debt) = market.accountSnapshot(msg.sender);\\n\\n // fail if the sender has a borrow balance\\n if (debt != 0) revert RemainingDebt();\\n\\n // fail if the sender is not permitted to redeem all of their assets\\n checkShortfall(market, msg.sender, assets);\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) == 0) return;\\n accountMarkets[msg.sender] = marketMap & ~marketMask;\\n\\n emit MarketExited(market, msg.sender);\\n }\\n\\n /// @notice Returns account's liquidity calculation.\\n /// @param account account in which the liquidity will be calculated.\\n /// @param marketToSimulate market in which to simulate withdraw operation.\\n /// @param withdrawAmount amount to simulate as withdraw.\\n /// @return sumCollateral sum of all collateral, already multiplied by each adjust factor (denominated in base).\\n /// @return sumDebtPlusEffects sum of all debt divided by adjust factor considering withdrawal (denominated in base).\\n function accountLiquidity(\\n address account,\\n Market marketToSimulate,\\n uint256 withdrawAmount\\n ) public view returns (uint256 sumCollateral, uint256 sumDebtPlusEffects) {\\n AccountLiquidity memory vars; // holds all our calculation results\\n\\n // for each asset the account is in\\n uint256 marketMap = accountMarkets[account];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 baseUnit = 10 ** m.decimals;\\n uint256 adjustFactor = m.adjustFactor;\\n\\n // read the balances\\n (vars.balance, vars.borrowBalance) = market.accountSnapshot(account);\\n\\n // get the normalized price of the asset (18 decimals)\\n vars.price = assetPrice(m.priceFeed);\\n\\n // sum all the collateral prices\\n sumCollateral += vars.balance.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n\\n // sum all the debt\\n sumDebtPlusEffects += vars.borrowBalance.mulDivUp(vars.price, baseUnit).divWadUp(adjustFactor);\\n\\n // simulate the effects of withdrawing from a pool\\n if (market == marketToSimulate) {\\n // calculate the effects of redeeming markets\\n // (having less collateral is the same as having more debt for this calculation)\\n if (withdrawAmount != 0) {\\n sumDebtPlusEffects += withdrawAmount.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n }\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Validates that the current state of the position and system are valid.\\n /// @dev To be called after adding the borrowed debt to the account position.\\n /// @param market address of the market where the borrow is made.\\n /// @param borrower address of the account that will repay the debt.\\n function checkBorrow(Market market, address borrower) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[borrower];\\n uint256 marketMask = 1 << m.index;\\n\\n // validate borrow state\\n if ((marketMap & marketMask) == 0) {\\n // only markets may call checkBorrow if borrower not in market\\n if (msg.sender != address(market)) revert NotMarket();\\n\\n accountMarkets[borrower] = marketMap | marketMask;\\n emit MarketEntered(market, borrower);\\n }\\n\\n // verify that current liquidity is not short\\n (uint256 collateral, uint256 debt) = accountLiquidity(borrower, Market(address(0)), 0);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Checks if the account has liquidity shortfall.\\n /// @param market address of the market where the operation will happen.\\n /// @param account address of the account to check for possible shortfall.\\n /// @param amount amount that the account wants to withdraw or transfer.\\n function checkShortfall(Market market, address account, uint256 amount) public view {\\n // if the account is not 'in' the market, bypass the liquidity check\\n if ((accountMarkets[account] & (1 << markets[market].index)) == 0) return;\\n\\n // otherwise, perform a hypothetical liquidity check to guard against shortfall\\n (uint256 collateral, uint256 debt) = accountLiquidity(account, market, amount);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Allows/rejects liquidation of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt is being repaid.\\n /// @param seizeMarket market from where the liquidator will seize assets.\\n /// @param borrower address in which the assets are being liquidated.\\n /// @param maxLiquidatorAssets maximum amount of debt the liquidator is willing to accept.\\n /// @return maxRepayAssets capped amount of debt the liquidator is allowed to repay.\\n function checkLiquidation(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 maxLiquidatorAssets\\n ) external view returns (uint256 maxRepayAssets) {\\n // if markets are listed, they have the same auditor\\n if (!markets[repayMarket].isListed || !markets[seizeMarket].isListed) revert MarketNotListed();\\n\\n MarketVars memory repay;\\n LiquidityVars memory base;\\n uint256 marketMap = accountMarkets[borrower];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage marketData = markets[market];\\n MarketVars memory m = MarketVars({\\n price: assetPrice(marketData.priceFeed),\\n adjustFactor: marketData.adjustFactor,\\n baseUnit: 10 ** marketData.decimals\\n });\\n\\n if (market == repayMarket) repay = m;\\n\\n (uint256 collateral, uint256 debt) = market.accountSnapshot(borrower);\\n\\n uint256 value = debt.mulDivUp(m.price, m.baseUnit);\\n base.totalDebt += value;\\n base.adjustedDebt += value.divWadUp(m.adjustFactor);\\n\\n value = collateral.mulDivDown(m.price, m.baseUnit);\\n base.totalCollateral += value;\\n base.adjustedCollateral += value.mulWadDown(m.adjustFactor);\\n if (market == seizeMarket) base.seizeAvailable = value;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (base.adjustedCollateral >= base.adjustedDebt) revert InsufficientShortfall();\\n\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n uint256 adjustFactor = base.adjustedCollateral.mulWadDown(base.totalDebt).divWadUp(\\n base.adjustedDebt.mulWadUp(base.totalCollateral)\\n );\\n uint256 closeFactor = (TARGET_HEALTH - base.adjustedCollateral.divWadUp(base.adjustedDebt)).divWadUp(\\n TARGET_HEALTH - adjustFactor.mulWadDown(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n );\\n maxRepayAssets = Math.min(\\n Math\\n .min(\\n base.totalDebt.mulWadUp(Math.min(1e18, closeFactor)),\\n base.seizeAvailable.divWadUp(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n )\\n .mulDivUp(repay.baseUnit, repay.price),\\n maxLiquidatorAssets < ASSETS_THRESHOLD\\n ? maxLiquidatorAssets.divWadDown(1e18 + memIncentive.lenders)\\n : maxLiquidatorAssets\\n );\\n }\\n\\n /// @notice Allow/rejects seizing of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market where the assets will be seized.\\n function checkSeize(Market repayMarket, Market seizeMarket) external view {\\n // if markets are listed, they also point to the same Auditor\\n if (!markets[seizeMarket].isListed || !markets[repayMarket].isListed) revert MarketNotListed();\\n }\\n\\n /// @notice Calculates the amount of collateral to be seized when a position is undercollateralized.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market from where the assets will be seized by the liquidator.\\n /// @param borrower account in which assets are being seized.\\n /// @param actualRepayAssets amount being repaid.\\n /// @return lendersAssets amount to be added for other lenders as a compensation of bad debt clearing.\\n /// @return seizeAssets amount that can be seized by the liquidator.\\n function calculateSeize(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 actualRepayAssets\\n ) external view returns (uint256 lendersAssets, uint256 seizeAssets) {\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n lendersAssets = actualRepayAssets.mulWadDown(memIncentive.lenders);\\n\\n // read prices for borrowed and collateral markets\\n uint256 priceBorrowed = assetPrice(markets[repayMarket].priceFeed);\\n uint256 priceCollateral = assetPrice(markets[seizeMarket].priceFeed);\\n uint256 baseAmount = actualRepayAssets.mulDivUp(priceBorrowed, 10 ** markets[repayMarket].decimals);\\n\\n seizeAssets = Math.min(\\n baseAmount.mulDivUp(10 ** markets[seizeMarket].decimals, priceCollateral).mulWadUp(\\n 1e18 + memIncentive.liquidator + memIncentive.lenders\\n ),\\n seizeMarket.maxWithdraw(borrower)\\n );\\n }\\n\\n /// @notice Checks if account has debt with no collateral, if so then call `clearBadDebt` from each market.\\n /// @dev Collateral is multiplied by price and adjust factor to be accurately evaluated as positive collateral asset.\\n /// @param account account in which debt is being checked.\\n function handleBadDebt(address account) external {\\n uint256 memMarketMap = accountMarkets[account];\\n uint256 marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 assets = market.maxWithdraw(account);\\n if (assets.mulDivDown(assetPrice(m.priceFeed), 10 ** m.decimals).mulWadDown(m.adjustFactor) > 0) return;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) marketList[i].clearBadDebt(account);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the asset price of a price feed.\\n /// @dev If Chainlink's asset price is <= 0 the call is reverted.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price.\\n /// @return The price of the asset scaled to 18-digit decimals.\\n function assetPrice(IPriceFeed priceFeed) public view returns (uint256) {\\n if (address(priceFeed) == BASE_FEED) return basePrice;\\n\\n int256 price = priceFeed.latestAnswer();\\n if (price <= 0) revert InvalidPrice();\\n return uint256(price) * baseFactor;\\n }\\n\\n /// @notice Retrieves all markets.\\n function allMarkets() external view returns (Market[] memory) {\\n return marketList;\\n }\\n\\n /// @notice Enables a certain market.\\n /// @dev Enabling more than 256 markets will cause an overflow when casting market index to uint8.\\n /// @param market market to add to the protocol.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n /// @param adjustFactor market's adjust factor for the underlying asset.\\n function enableMarket(\\n Market market,\\n IPriceFeed priceFeed,\\n uint128 adjustFactor\\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (market.auditor() != this) revert AuditorMismatch();\\n if (markets[market].isListed) revert MarketAlreadyListed();\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n\\n uint8 decimals = market.decimals();\\n markets[market] = MarketData({\\n isListed: true,\\n adjustFactor: adjustFactor,\\n decimals: decimals,\\n index: uint8(marketList.length),\\n priceFeed: priceFeed\\n });\\n\\n marketList.push(market);\\n\\n emit MarketListed(market, decimals);\\n emit PriceFeedSet(market, priceFeed);\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the adjust factor for a certain market.\\n /// @param market address of the market to change adjust factor for.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n function setAdjustFactor(Market market, uint128 adjustFactor) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (!markets[market].isListed) revert MarketNotListed();\\n\\n markets[market].adjustFactor = adjustFactor;\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the Chainlink Price Feed Aggregator source for a market.\\n /// @param market market address of the asset.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n function setPriceFeed(Market market, IPriceFeed priceFeed) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n markets[market].priceFeed = priceFeed;\\n emit PriceFeedSet(market, priceFeed);\\n }\\n\\n /// @notice Sets liquidation incentive (liquidator and lenders) for the whole ecosystem.\\n /// @param liquidationIncentive_ new liquidation incentive.\\n function setLiquidationIncentive(\\n LiquidationIncentive memory liquidationIncentive_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n liquidationIncentive = liquidationIncentive_;\\n emit LiquidationIncentiveSet(liquidationIncentive_);\\n }\\n\\n /// @notice Emitted when a new market is listed for borrow/lending.\\n /// @param market address of the market that was listed.\\n /// @param decimals decimals of the market's underlying asset.\\n event MarketListed(Market indexed market, uint8 decimals);\\n\\n /// @notice Emitted when an account enters a market to use his deposit as collateral for a loan.\\n /// @param market address of the market that the account entered.\\n /// @param account address of the account that just entered a market.\\n event MarketEntered(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when an account leaves a market.\\n /// Means that they would stop using their deposit as collateral and won't ask for any loans in this market.\\n /// @param market address of the market that the account just left.\\n /// @param account address of the account that just left a market.\\n event MarketExited(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when a adjust factor is changed by admin.\\n /// @param market address of the market that has a new adjust factor.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n event AdjustFactorSet(Market indexed market, uint256 adjustFactor);\\n\\n /// @notice Emitted when a new liquidationIncentive has been set.\\n /// @param liquidationIncentive represented with 18 decimals.\\n event LiquidationIncentiveSet(LiquidationIncentive liquidationIncentive);\\n\\n /// @notice Emitted when a market and prie feed is changed by admin.\\n /// @param market address of the asset used to get the price.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n event PriceFeedSet(Market indexed market, IPriceFeed indexed priceFeed);\\n\\n /// @notice Stores the market parameters used for liquidity calculations.\\n /// @param adjustFactor used to asses the lending power of the market's underlying asset.\\n /// @param decimals number of decimals of the market's underlying asset.\\n /// @param index index of the market in the `marketList`.\\n /// @param isListed true if the market is enabled.\\n /// @param priceFeed address of the price feed used to query the asset's price.\\n struct MarketData {\\n uint128 adjustFactor;\\n uint8 decimals;\\n uint8 index;\\n bool isListed;\\n IPriceFeed priceFeed;\\n }\\n\\n /// @notice Stores the liquidator and lenders factors used in liquidations to calculate the amount to seize.\\n /// @param liquidator factor used to calculate the extra bonus a liquidator can seize.\\n /// @param lenders factor used to calculate the bonus that the pool lenders receive.\\n struct LiquidationIncentive {\\n uint128 liquidator;\\n uint128 lenders;\\n }\\n\\n /// @notice Used as memory access to temporary store account liquidity data.\\n /// @param balance collateral balance of the account.\\n /// @param borrowBalance borrow balance of the account.\\n /// @param price asset price returned by the price feed with 18 decimals.\\n struct AccountLiquidity {\\n uint256 balance;\\n uint256 borrowBalance;\\n uint256 price;\\n }\\n}\\n\\nerror AuditorMismatch();\\nerror InsufficientAccountLiquidity();\\nerror InsufficientShortfall();\\nerror InvalidPrice();\\nerror InvalidPriceFeed();\\nerror MarketAlreadyListed();\\nerror MarketNotListed();\\nerror NotMarket();\\nerror RemainingDebt();\\n\\nstruct MarketVars {\\n uint256 price;\\n uint256 baseUnit;\\n uint128 adjustFactor;\\n}\\n\\nstruct LiquidityVars {\\n uint256 totalDebt;\\n uint256 totalCollateral;\\n uint256 adjustedDebt;\\n uint256 adjustedCollateral;\\n uint256 seizeAvailable;\\n}\\n\",\"keccak256\":\"0xa5facf0b53ee0f3a07843361add23000e569743c9b5a3cdf7817dc51a833040b\",\"license\":\"BUSL-1.1\"},\"contracts/InterestRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract InterestRateModel {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for int256;\\n using SafeCast for uint256;\\n using SafeCast for int256;\\n\\n /// @notice Scale factor of the floating curve.\\n uint256 public immutable floatingCurveA;\\n /// @notice Origin intercept of the floating curve.\\n int256 public immutable floatingCurveB;\\n /// @notice Asymptote of the floating curve.\\n uint256 public immutable floatingMaxUtilization;\\n\\n /// @notice natural level of utilization, represented with 18 decimals.\\n uint256 public immutable naturalUtilization;\\n /// @notice speed of growth for the base rate, represented with 18 decimals.\\n int256 public immutable growthSpeed;\\n /// @notice speed of the sigmoid curve, represented with 18 decimals.\\n int256 public immutable sigmoidSpeed;\\n /// @notice spread factor for the fixed rate, represented with 18 decimals.\\n int256 public immutable spreadFactor;\\n /// @notice speed of maturity for the fixed rate, represented with 18 decimals.\\n int256 public immutable maturitySpeed;\\n /// @notice time preference for the fixed rate, represented with 18 decimals.\\n int256 public immutable timePreference;\\n /// @notice liquidity naturally designated to fixed pools, represented with 18 decimals.\\n uint256 public immutable fixedAllocation;\\n /// @notice maximum interest rate, represented with 18 decimals.\\n uint256 public immutable maxRate;\\n\\n /// @dev maximum input value for expWad, ~ln((2^255 - 1) / 1e18), represented with 18 decimals.\\n int256 internal constant EXP_THRESHOLD = 135305999368893231588;\\n /// @dev auxiliary variable to save an extra operation.\\n int256 internal immutable auxSigmoid;\\n\\n /// @notice set of parameters used to initialize the interest rate model.\\n Parameters internal _parameters;\\n\\n constructor(Parameters memory p, Market market_) {\\n assert(\\n p.minRate > 0 &&\\n p.naturalRate > 0 &&\\n p.maxUtilization > 1e18 &&\\n p.naturalUtilization > 0 &&\\n p.naturalUtilization < 1e18 &&\\n p.growthSpeed > 0 &&\\n p.sigmoidSpeed > 0 &&\\n p.spreadFactor > 0 &&\\n p.maturitySpeed > 0 &&\\n p.maxRate > 0 &&\\n p.maxRate <= 15_000e16\\n );\\n\\n _parameters = p;\\n growthSpeed = p.growthSpeed.toInt256();\\n sigmoidSpeed = p.sigmoidSpeed.toInt256();\\n spreadFactor = p.spreadFactor.toInt256();\\n maturitySpeed = p.maturitySpeed.toInt256();\\n floatingMaxUtilization = p.maxUtilization;\\n naturalUtilization = p.naturalUtilization;\\n\\n floatingCurveA =\\n ((p.naturalRate.mulWadUp(\\n uint256(((growthSpeed * (1e18 - int256(p.naturalUtilization / 2)).lnWad()) / 1e18).expWad())\\n ) - p.minRate) *\\n (p.maxUtilization - p.naturalUtilization) *\\n (p.maxUtilization)) /\\n (p.naturalUtilization * 1e18);\\n floatingCurveB = int256(p.minRate) - int256(floatingCurveA.divWadDown(p.maxUtilization));\\n\\n market = market_;\\n fixedCurveA = address(market_) != address(0) ? floatingCurveA : 0;\\n fixedCurveB = address(market_) != address(0) ? floatingCurveB : int256(0);\\n fixedMaxUtilization = address(market_) != address(0) ? p.maxUtilization : 0;\\n\\n timePreference = p.timePreference;\\n fixedAllocation = p.fixedAllocation;\\n maxRate = p.maxRate;\\n\\n auxSigmoid = int256(naturalUtilization.divWadDown(1e18 - naturalUtilization)).lnWad();\\n\\n // reverts if it's an invalid curve (such as one yielding a negative interest rate).\\n fixedRate(block.timestamp + FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL), 2, 1, 1, 2);\\n baseRate(1e18 - 1, 1e18 - 1);\\n }\\n\\n /// @notice fixed rate with given conditions, represented with 18 decimals.\\n /// @param maturity maturity of the pool.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param uFixed fixed utilization of the pool.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `base * spread` and `maxRate` with given conditions.\\n function fixedRate(\\n uint256 maturity,\\n uint256 maxPools,\\n uint256 uFixed,\\n uint256 uFloating,\\n uint256 uGlobal\\n ) public view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n if (uFixed > uGlobal) revert UtilizationExceeded();\\n if (uGlobal == 0) return baseRate(uFloating, 0);\\n\\n FixedVars memory v;\\n v.sqFNatPools = (maxPools * 1e18).divWadDown(fixedAllocation);\\n v.fNatPools = (v.sqFNatPools * 1e18).sqrt();\\n v.fixedFactor = (maxPools * uFixed).mulDivDown(1e36, uGlobal * fixedAllocation);\\n v.natPools =\\n ((2e18 - v.sqFNatPools.toInt256()) * 1e36) /\\n (v.fNatPools.toInt256() * (1e18 - v.fNatPools.toInt256()));\\n v.maturityFactor = (maturity - block.timestamp).divWadDown(\\n block.timestamp + maxPools * FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL)\\n );\\n\\n uint256 spread = (1e18 +\\n (((maturitySpeed * (v.maturityFactor).toInt256().lnWad()) / 1e18).expWad() *\\n (timePreference +\\n (spreadFactor *\\n ((v.natPools * (v.fixedFactor * 1e18).sqrt().toInt256()) /\\n 1e18 +\\n ((1e18 - v.natPools) * v.fixedFactor.toInt256()) /\\n 1e18 -\\n 1e18)) /\\n 1e18)) /\\n 1e18).toUint256();\\n uint256 base = baseRate(uFloating, uGlobal);\\n\\n if (base >= maxRate.divWadDown(spread)) return maxRate;\\n return base.mulWadUp(spread);\\n }\\n\\n /// @notice base rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the base rate, without capping.\\n function baseRate(uint256 uFloating, uint256 uGlobal) internal view returns (uint256) {\\n if (uFloating > uGlobal) revert UtilizationExceeded();\\n if (uGlobal >= 1e18) return type(uint256).max;\\n\\n uint256 r = ((floatingCurveA.divWadDown(floatingMaxUtilization - uFloating)).toInt256() + floatingCurveB)\\n .toUint256();\\n\\n if (uGlobal == 0) return r;\\n\\n int256 x = -((sigmoidSpeed * (int256(uGlobal.divWadDown(1e18 - uGlobal)).lnWad() - auxSigmoid)) / 1e18);\\n uint256 sigmoid = x > EXP_THRESHOLD ? 0 : uint256(1e18).divWadDown(1e18 + x.expWad().toUint256());\\n x = (-growthSpeed * (1e18 - sigmoid.mulWadDown(uGlobal)).toInt256().lnWad()) / 1e18;\\n uint256 globalFactor = ((x > EXP_THRESHOLD ? EXP_THRESHOLD : x).expWad()).toUint256();\\n\\n if (globalFactor > type(uint256).max / r) return type(uint256).max;\\n\\n return r.mulWadUp(globalFactor);\\n }\\n\\n /// @notice floating rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `baseRate` and `maxRate` with given conditions.\\n function floatingRate(uint256 uFloating, uint256 uGlobal) public view returns (uint256) {\\n return Math.min(baseRate(uFloating, uGlobal), maxRate);\\n }\\n\\n function parameters() external view returns (Parameters memory) {\\n return _parameters;\\n }\\n\\n // Legacy interface, kept for compatibility.\\n\\n /// @notice Market where the interest rate model is used. Keeps compatibility with legacy interest rate model.\\n Market public immutable market;\\n uint256 public immutable fixedCurveA;\\n int256 public immutable fixedCurveB;\\n uint256 public immutable fixedMaxUtilization;\\n\\n /// @dev Deprecated in favor of `floatingRate(uFloating, uGlobal)`.\\n function floatingRate(uint256) public view returns (uint256) {\\n uint256 floatingAssets = market.floatingAssets();\\n uint256 floatingDebt = market.floatingDebt();\\n return\\n floatingRate(\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed())\\n );\\n }\\n\\n /// @dev Deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function fixedBorrowRate(\\n uint256 maturity,\\n uint256 amount,\\n uint256 borrowed,\\n uint256 supplied,\\n uint256\\n ) external view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n uint256 floatingAssets = previewFloatingAssetsAverage(maturity);\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n uint256 newBorrowed = borrowed + amount;\\n uint256 backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, supplied), newBorrowed);\\n\\n return\\n fixedRate(\\n maturity,\\n market.maxFuturePools(),\\n fixedUtilization(supplied, newBorrowed, floatingAssets),\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed() + backupDebtAddition)\\n ).mulDivDown(maturity - block.timestamp, 365 days);\\n }\\n\\n /// @dev deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function minFixedRate(uint256, uint256, uint256) external view returns (uint256 rate, uint256 utilization) {\\n uint256 floatingAssets = market.floatingAssetsAverage();\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n utilization = globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed());\\n rate = baseRate(floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0, utilization);\\n }\\n\\n function previewFloatingAssetsAverage(uint256 maturity) internal view returns (uint256) {\\n FixedLib.Pool memory pool;\\n (pool.borrowed, pool.supplied, pool.unassignedEarnings, pool.lastAccrual) = market.fixedPools(maturity);\\n uint256 memFloatingAssets = market.floatingAssets() +\\n pool.unassignedEarnings.mulDivDown(block.timestamp - pool.lastAccrual, maturity - pool.lastAccrual);\\n uint256 memFloatingAssetsAverage = market.floatingAssetsAverage();\\n uint256 averageFactor = (1e18 -\\n (\\n -int256(\\n memFloatingAssets < memFloatingAssetsAverage\\n ? market.dampSpeedDown()\\n : market.dampSpeedUp() * (block.timestamp - market.lastAverageUpdate())\\n )\\n ).expWad()).toUint256();\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n function globalUtilization(\\n uint256 floatingAssets,\\n uint256 floatingDebt,\\n uint256 backupBorrowed\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 ? (floatingDebt + backupBorrowed).divWadUp(floatingAssets) : 0;\\n }\\n\\n function fixedUtilization(\\n uint256 supplied,\\n uint256 borrowed,\\n uint256 floatingAssets\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(floatingAssets) : 0;\\n }\\n}\\n\\nerror AlreadyMatured();\\nerror UtilizationExceeded();\\n\\nstruct Parameters {\\n uint256 minRate;\\n uint256 naturalRate;\\n uint256 maxUtilization;\\n uint256 naturalUtilization;\\n uint256 growthSpeed;\\n uint256 sigmoidSpeed;\\n uint256 spreadFactor;\\n uint256 maturitySpeed;\\n int256 timePreference;\\n uint256 fixedAllocation;\\n uint256 maxRate;\\n}\\n\\nstruct FixedVars {\\n uint256 sqFNatPools;\\n uint256 fNatPools;\\n uint256 fixedFactor;\\n int256 natPools;\\n uint256 maturityFactor;\\n}\\n\",\"keccak256\":\"0x9df5219d8182a14f123a725c73a586aed83c3d39c17b45a0a59e3923e4fe6532\",\"license\":\"BUSL-1.1\"},\"contracts/Market.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { PausableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { ERC4626, ERC20, SafeTransferLib } from \\\"solmate/src/mixins/ERC4626.sol\\\";\\nimport { InterestRateModel } from \\\"./InterestRateModel.sol\\\";\\nimport { RewardsController } from \\\"./RewardsController.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Auditor } from \\\"./Auditor.sol\\\";\\n\\ncontract Market is Initializable, AccessControlUpgradeable, PausableUpgradeable, ERC4626 {\\n using FixedPointMathLib for int256;\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint128;\\n using SafeTransferLib for ERC20;\\n using FixedLib for FixedLib.Pool;\\n using FixedLib for FixedLib.Position;\\n using FixedLib for uint256;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant EMERGENCY_ADMIN_ROLE = keccak256(\\\"EMERGENCY_ADMIN_ROLE\\\");\\n\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n Auditor public immutable auditor;\\n\\n /// @notice Tracks account's fixed deposit positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedDepositPositions;\\n /// @notice Tracks account's fixed borrow positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedBorrowPositions;\\n /// @notice Tracks fixed pools state by maturity.\\n mapping(uint256 => FixedLib.Pool) public fixedPools;\\n\\n /// @notice Tracks fixed deposit and borrow map and floating borrow shares of an account.\\n mapping(address => Account) public accounts;\\n\\n /// @notice Amount of assets lent by the floating pool to the fixed pools.\\n uint256 public floatingBackupBorrowed;\\n /// @notice Amount of assets lent by the floating pool to accounts.\\n uint256 public floatingDebt;\\n\\n /// @notice Accumulated earnings from extraordinary sources to be gradually distributed.\\n uint256 public earningsAccumulator;\\n /// @notice Rate per second to be charged to delayed fixed pools borrowers after maturity.\\n uint256 public penaltyRate;\\n /// @notice Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\\n uint256 public backupFeeRate;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\\n uint256 public dampSpeedUp;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\\n uint256 public dampSpeedDown;\\n\\n /// @notice Number of fixed pools to be active at the same time.\\n uint8 public maxFuturePools;\\n /// @notice Last time the accumulator distributed earnings.\\n uint32 public lastAccumulatorAccrual;\\n /// @notice Last time the floating debt was updated.\\n uint32 public lastFloatingDebtUpdate;\\n /// @notice Last time the floating assets average was updated.\\n uint32 public lastAverageUpdate;\\n\\n /// @notice Interest rate model contract used to get the borrow rates.\\n InterestRateModel public interestRateModel;\\n\\n /// @notice Factor used for gradual accrual of earnings to the floating pool.\\n uint128 public earningsAccumulatorSmoothFactor;\\n /// @notice Percentage factor that represents the liquidity reserves that can't be borrowed.\\n uint128 public reserveFactor;\\n\\n /// @notice Amount of floating assets deposited to the pool.\\n uint256 public floatingAssets;\\n /// @notice Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\\n uint256 public floatingAssetsAverage;\\n\\n /// @notice Total amount of floating borrow shares assigned to floating borrow accounts.\\n uint256 public totalFloatingBorrowShares;\\n\\n /// @dev gap from deprecated state.\\n /// @custom:oz-renamed-from floatingUtilization\\n uint256 private __gap;\\n\\n /// @notice Address of the treasury that will receive the allocated earnings.\\n address public treasury;\\n /// @notice Rate to be charged by the treasury to floating and fixed borrows.\\n uint256 public treasuryFeeRate;\\n\\n /// @notice Address of the rewards controller that will accrue rewards for accounts operating with the Market.\\n RewardsController public rewardsController;\\n\\n /// @notice Flag to prevent new borrows and deposits.\\n bool public isFrozen;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(ERC20 asset_, Auditor auditor_) ERC4626(asset_, \\\"\\\", \\\"\\\") {\\n auditor = auditor_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(\\n string calldata assetSymbol,\\n uint8 maxFuturePools_,\\n uint128 earningsAccumulatorSmoothFactor_,\\n InterestRateModel interestRateModel_,\\n uint256 penaltyRate_,\\n uint256 backupFeeRate_,\\n uint128 reserveFactor_,\\n uint256 dampSpeedUp_,\\n uint256 dampSpeedDown_\\n ) external initializer {\\n __AccessControl_init();\\n __Pausable_init();\\n\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n lastAverageUpdate = uint32(block.timestamp);\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setAssetSymbol(assetSymbol);\\n setMaxFuturePools(maxFuturePools_);\\n setEarningsAccumulatorSmoothFactor(earningsAccumulatorSmoothFactor_);\\n setInterestRateModel(interestRateModel_);\\n setPenaltyRate(penaltyRate_);\\n setBackupFeeRate(backupFeeRate_);\\n setReserveFactor(reserveFactor_);\\n setDampSpeed(dampSpeedUp_, dampSpeedDown_);\\n }\\n\\n /// @notice Borrows a certain amount from the floating pool.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return borrowShares shares corresponding to the borrowed assets.\\n function borrow(\\n uint256 assets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 borrowShares) {\\n spendAllowance(borrower, assets);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n\\n borrowShares = previewBorrow(assets);\\n\\n uint256 newFloatingDebt = floatingDebt + assets;\\n floatingDebt = newFloatingDebt;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed, also considering the reserves\\n if (floatingBackupBorrowed + newFloatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n\\n totalFloatingBorrowShares += borrowShares;\\n accounts[borrower].floatingBorrowShares += borrowShares;\\n\\n emit Borrow(msg.sender, receiver, borrower, assets, borrowShares);\\n emitMarketUpdate();\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Repays a certain amount of assets to the floating pool.\\n /// @param assets assets to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepay the actual amount that should be transferred into the protocol.\\n /// @return borrowShares subtracted shares from the borrower's accountability.\\n function repay(\\n uint256 assets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepay, uint256 borrowShares) {\\n (actualRepay, borrowShares) = noTransferRefund(previewRepay(assets), borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), actualRepay);\\n }\\n\\n /// @notice Repays a certain amount of shares to the floating pool.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return assets subtracted assets from the borrower's accountability.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function refund(\\n uint256 borrowShares,\\n address borrower\\n ) external whenNotPaused returns (uint256 assets, uint256 actualShares) {\\n (assets, actualShares) = noTransferRefund(borrowShares, borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Allows to (partially) repay a floating borrow. It does not transfer assets.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower the address of the account that has the debt.\\n /// @return assets the actual amount that should be transferred into the protocol.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function noTransferRefund(\\n uint256 borrowShares,\\n address borrower\\n ) internal returns (uint256 assets, uint256 actualShares) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n Account storage account = accounts[borrower];\\n uint256 accountBorrowShares = account.floatingBorrowShares;\\n actualShares = Math.min(borrowShares, accountBorrowShares);\\n assets = previewRefund(actualShares);\\n\\n if (assets == 0) revert ZeroRepay();\\n\\n floatingDebt -= assets;\\n account.floatingBorrowShares = accountBorrowShares - actualShares;\\n totalFloatingBorrowShares -= actualShares;\\n\\n emit Repay(msg.sender, borrower, assets, actualShares);\\n }\\n\\n /// @notice Deposits a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be deposited.\\n /// @param assets amount to receive from the msg.sender.\\n /// @param minAssetsRequired minimum amount of assets required by the depositor for the transaction to be accepted.\\n /// @param receiver address that will be able to withdraw the deposited assets.\\n /// @return positionAssets total amount of assets (principal + fee) to be withdrawn at maturity.\\n function depositAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 minAssetsRequired,\\n address receiver\\n ) external whenNotPaused whenNotFrozen returns (uint256 positionAssets) {\\n if (assets == 0) revert ZeroDeposit();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n floatingAssets += backupEarnings;\\n\\n (uint256 fee, uint256 backupFee) = pool.calculateDeposit(assets, backupFeeRate);\\n positionAssets = assets + fee;\\n if (positionAssets < minAssetsRequired) revert Disagreement();\\n\\n floatingBackupBorrowed -= pool.deposit(assets);\\n pool.unassignedEarnings -= fee + backupFee;\\n earningsAccumulator += backupFee;\\n\\n // update account's position\\n FixedLib.Position storage position = fixedDepositPositions[maturity][receiver];\\n\\n // if account doesn't have a current position, add it to the list\\n if (position.principal == 0) {\\n Account storage account = accounts[receiver];\\n account.fixedDeposits = account.fixedDeposits.setMaturity(maturity);\\n }\\n\\n position.principal += assets;\\n position.fee += fee;\\n\\n emit DepositAtMaturity(maturity, msg.sender, receiver, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Borrows a certain amount from a maturity.\\n /// @param maturity maturity date for repayment.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return assetsOwed total amount of assets (principal + fee) to be repaid at maturity.\\n function borrowAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 maxAssets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 assetsOwed) {\\n if (assets == 0) revert ZeroBorrow();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n {\\n uint256 backupDebtAddition = pool.borrow(assets);\\n if (backupDebtAddition != 0) {\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed + backupDebtAddition;\\n depositToTreasury(updateFloatingDebt());\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n }\\n uint256 fee;\\n {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, floatingBackupBorrowed)\\n );\\n fee = assets.mulWadDown(fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n }\\n assetsOwed = assets + fee;\\n\\n // validate that the account is not taking arbitrary fees\\n if (assetsOwed > maxAssets) revert Disagreement();\\n\\n spendAllowance(borrower, assetsOwed);\\n\\n {\\n // if account doesn't have a current position, add it to the list\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n if (position.principal == 0) {\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.setMaturity(maturity);\\n }\\n\\n // calculate what portion of the fees are to be accrued and what portion goes to earnings accumulator\\n (uint256 newUnassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(fee),\\n assets\\n );\\n if (newUnassignedEarnings != 0) pool.unassignedEarnings += newUnassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n fixedBorrowPositions[maturity][borrower] = FixedLib.Position(position.principal + assets, position.fee + fee);\\n }\\n\\n emit BorrowAtMaturity(maturity, msg.sender, receiver, borrower, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Withdraws a certain amount from a maturity.\\n /// @param maturity maturity date where the assets will be withdrawn.\\n /// @param positionAssets position size to be reduced.\\n /// @param minAssetsRequired minimum amount required by the account (if discount included for early withdrawal).\\n /// @param receiver address that will receive the withdrawn assets.\\n /// @param owner address that previously deposited the assets.\\n /// @return assetsDiscounted amount of assets withdrawn (can include a discount for early withdraw).\\n function withdrawAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 minAssetsRequired,\\n address receiver,\\n address owner\\n ) external whenNotPaused returns (uint256 assetsDiscounted) {\\n if (positionAssets == 0) revert ZeroWithdraw();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n FixedLib.Position memory position = fixedDepositPositions[maturity][owner];\\n\\n if (positionAssets > position.principal + position.fee) positionAssets = position.principal + position.fee;\\n\\n {\\n // remove the supply from the fixed rate pool\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed +\\n pool.withdraw(\\n FixedLib.Position(position.principal, position.fee).scaleProportionally(positionAssets).principal\\n );\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets) revert InsufficientProtocolLiquidity();\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n\\n // verify if there are any penalties/fee for the account because of early withdrawal, if so discount\\n if (block.timestamp < maturity) {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingBackupBorrowed = floatingBackupBorrowed;\\n\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, memFloatingBackupBorrowed)\\n );\\n assetsDiscounted = positionAssets.divWadDown(1e18 + fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n } else {\\n assetsDiscounted = positionAssets;\\n }\\n\\n if (assetsDiscounted < minAssetsRequired) revert Disagreement();\\n\\n spendAllowance(owner, assetsDiscounted);\\n\\n // all the fees go to unassigned or to the floating pool\\n (uint256 unassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(positionAssets - assetsDiscounted),\\n assetsDiscounted\\n );\\n pool.unassignedEarnings += unassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n // the account gets discounted the full amount\\n position.reduceProportionally(positionAssets);\\n if (position.principal | position.fee == 0) {\\n delete fixedDepositPositions[maturity][owner];\\n Account storage account = accounts[owner];\\n account.fixedDeposits = account.fixedDeposits.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedDepositPositions[maturity][owner] = position;\\n }\\n\\n emit WithdrawAtMaturity(maturity, msg.sender, receiver, owner, positionAssets, assetsDiscounted);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransfer(receiver, assetsDiscounted);\\n }\\n\\n /// @notice Repays a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be repaid.\\n /// @param positionAssets amount to be paid for the borrower's debt.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepayAssets the actual amount that was transferred into the protocol.\\n function repayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepayAssets) {\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n actualRepayAssets = noTransferRepayAtMaturity(maturity, positionAssets, maxAssets, borrower, true);\\n emitMarketUpdate();\\n\\n asset.safeTransferFrom(msg.sender, address(this), actualRepayAssets);\\n }\\n\\n /// @notice Allows to (partially) repay a fixed rate position. It does not transfer assets.\\n /// @param maturity the maturity to access the pool.\\n /// @param positionAssets the amount of debt of the pool that should be paid.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower the address of the account that has the debt.\\n /// @param canDiscount should early repay discounts be applied.\\n /// @return actualRepayAssets the actual amount that should be transferred into the protocol.\\n function noTransferRepayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower,\\n bool canDiscount\\n ) internal returns (uint256 actualRepayAssets) {\\n if (positionAssets == 0) revert ZeroRepay();\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n floatingAssets += backupEarnings;\\n\\n FixedLib.Position memory position = fixedBorrowPositions[maturity][borrower];\\n\\n uint256 debtCovered = Math.min(positionAssets, position.principal + position.fee);\\n\\n uint256 principalCovered = FixedLib\\n .Position(position.principal, position.fee)\\n .scaleProportionally(debtCovered)\\n .principal;\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n // early repayment allows a discount from the unassigned earnings\\n if (block.timestamp < maturity) {\\n if (canDiscount) {\\n // calculate the deposit fee considering the amount of debt the account'll pay\\n (uint256 discountFee, uint256 backupFee) = pool.calculateDeposit(principalCovered, backupFeeRate);\\n\\n // remove the fee from unassigned earnings\\n pool.unassignedEarnings -= discountFee + backupFee;\\n\\n // the fee charged to the fixed pool supplier goes to the earnings accumulator\\n earningsAccumulator += backupFee;\\n\\n // the fee gets discounted from the account through `actualRepayAssets`\\n actualRepayAssets = debtCovered - discountFee;\\n } else {\\n actualRepayAssets = debtCovered;\\n }\\n } else {\\n actualRepayAssets = debtCovered + debtCovered.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n\\n // all penalties go to the earnings accumulator\\n earningsAccumulator += actualRepayAssets - debtCovered;\\n }\\n\\n // verify that the account agrees to this discount or penalty\\n if (actualRepayAssets > maxAssets) revert Disagreement();\\n\\n // reduce the borrowed from the pool and might decrease the floating backup borrowed\\n floatingBackupBorrowed -= pool.repay(principalCovered);\\n\\n // update the account position\\n position.reduceProportionally(debtCovered);\\n if (position.principal | position.fee == 0) {\\n delete fixedBorrowPositions[maturity][borrower];\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedBorrowPositions[maturity][borrower] = position;\\n }\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, actualRepayAssets, debtCovered);\\n emitFixedEarningsUpdate(maturity);\\n }\\n\\n /// @notice Liquidates undercollateralized fixed/floating (or both) position(s).\\n /// @dev Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool,\\n /// or/and for multiple fixed pools, seizing a portion of borrower's collateral.\\n /// @param borrower account that has an outstanding debt across floating or fixed pools.\\n /// @param maxAssets maximum amount of debt that the liquidator is willing to accept. (it can be less)\\n /// @param seizeMarket market from which the collateral will be seized to give to the liquidator.\\n /// @return repaidAssets actual amount repaid.\\n function liquidate(\\n address borrower,\\n uint256 maxAssets,\\n Market seizeMarket\\n ) external whenNotPaused returns (uint256 repaidAssets) {\\n if (msg.sender == borrower) revert SelfLiquidation();\\n\\n maxAssets = auditor.checkLiquidation(this, seizeMarket, borrower, maxAssets);\\n if (maxAssets == 0) revert ZeroRepay();\\n\\n Account storage account = accounts[borrower];\\n\\n {\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0 && maxAssets != 0) {\\n if (packedMaturities & 1 != 0) {\\n uint256 actualRepay;\\n if (block.timestamp < maturity) {\\n actualRepay = noTransferRepayAtMaturity(maturity, maxAssets, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n } else {\\n uint256 position;\\n {\\n FixedLib.Position storage p = fixedBorrowPositions[maturity][borrower];\\n position = p.principal + p.fee;\\n }\\n uint256 debt = position + position.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n actualRepay = debt > maxAssets ? maxAssets.mulDivDown(position, debt) : maxAssets;\\n\\n if (actualRepay == 0) maxAssets = 0;\\n else {\\n actualRepay = noTransferRepayAtMaturity(maturity, actualRepay, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n }\\n }\\n repaidAssets += actualRepay;\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n\\n if (maxAssets != 0 && account.floatingBorrowShares != 0) {\\n uint256 borrowShares = previewRepay(maxAssets);\\n if (borrowShares != 0) {\\n (uint256 actualRepayAssets, ) = noTransferRefund(borrowShares, borrower);\\n repaidAssets += actualRepayAssets;\\n }\\n }\\n\\n // reverts on failure\\n (uint256 lendersAssets, uint256 seizeAssets) = auditor.calculateSeize(this, seizeMarket, borrower, repaidAssets);\\n earningsAccumulator += lendersAssets;\\n\\n if (address(seizeMarket) == address(this)) {\\n internalSeize(this, msg.sender, borrower, seizeAssets);\\n } else {\\n seizeMarket.seize(msg.sender, borrower, seizeAssets);\\n\\n emitMarketUpdate();\\n }\\n\\n emit Liquidate(msg.sender, borrower, repaidAssets, lendersAssets, seizeMarket, seizeAssets);\\n\\n auditor.handleBadDebt(borrower);\\n\\n asset.safeTransferFrom(msg.sender, address(this), repaidAssets + lendersAssets);\\n }\\n\\n /// @notice Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\\n /// @dev Can only be called from the auditor.\\n /// @param borrower account with insufficient collateral to be cleared the debt.\\n function clearBadDebt(address borrower) external {\\n if (msg.sender != address(auditor)) revert NotAuditor();\\n\\n floatingAssets += accrueAccumulatedEarnings();\\n Account storage account = accounts[borrower];\\n uint256 accumulator = earningsAccumulator;\\n uint256 totalBadDebt = 0;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 badDebt = position.principal + position.fee;\\n if (accumulator >= badDebt) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n accumulator -= badDebt;\\n totalBadDebt += badDebt;\\n floatingBackupBorrowed -= fixedPools[maturity].repay(position.principal);\\n delete fixedBorrowPositions[maturity][borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, badDebt, badDebt);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n if (account.floatingBorrowShares != 0 && (accumulator = previewRepay(accumulator)) != 0) {\\n (uint256 badDebt, ) = noTransferRefund(accumulator, borrower);\\n totalBadDebt += badDebt;\\n }\\n if (totalBadDebt != 0) {\\n earningsAccumulator -= totalBadDebt;\\n emit SpreadBadDebt(borrower, totalBadDebt);\\n }\\n emitMarketUpdate();\\n }\\n\\n /// @notice Public function to seize a certain amount of assets.\\n /// @dev Public function for liquidator to seize borrowers assets in the floating pool.\\n /// This function will only be called from another Market, on `liquidation` calls.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function seize(address liquidator, address borrower, uint256 assets) external whenNotPaused {\\n internalSeize(Market(msg.sender), liquidator, borrower, assets);\\n }\\n\\n /// @notice Internal function to seize a certain amount of assets.\\n /// @dev Internal function for liquidator to seize borrowers assets in the floating pool.\\n /// Will only be called from this Market on `liquidation` or through `seize` calls from another Market.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param seizeMarket address which is calling the seize function (see `seize` public function).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function internalSeize(Market seizeMarket, address liquidator, address borrower, uint256 assets) internal {\\n if (assets == 0) revert ZeroWithdraw();\\n\\n // reverts on failure\\n auditor.checkSeize(seizeMarket, this);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(borrower);\\n uint256 shares = previewWithdraw(assets);\\n beforeWithdraw(assets, shares);\\n _burn(borrower, shares);\\n emit Withdraw(msg.sender, liquidator, borrower, assets, shares);\\n emit Seize(liquidator, borrower, assets);\\n emitMarketUpdate();\\n\\n asset.safeTransfer(liquidator, assets);\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be withdrawn from the floating pool.\\n function beforeWithdraw(uint256 assets, uint256) internal override whenNotPaused {\\n updateFloatingAssetsAverage();\\n depositToTreasury(updateFloatingDebt());\\n uint256 earnings = accrueAccumulatedEarnings();\\n uint256 newFloatingAssets = floatingAssets + earnings - assets;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed\\n if (floatingBackupBorrowed + floatingDebt > newFloatingAssets) revert InsufficientProtocolLiquidity();\\n floatingAssets = newFloatingAssets;\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be deposited to the floating pool.\\n function afterDeposit(uint256 assets, uint256) internal override whenNotPaused whenNotFrozen {\\n updateFloatingAssetsAverage();\\n uint256 treasuryFee = updateFloatingDebt();\\n uint256 earnings = accrueAccumulatedEarnings();\\n floatingAssets += earnings + assets;\\n depositToTreasury(treasuryFee);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Withdraws the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param assets amount of underlying to be withdrawn.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return shares amount of shares redeemed for underlying asset.\\n function withdraw(uint256 assets, address receiver, address owner) public override returns (uint256 shares) {\\n auditor.checkShortfall(this, owner, assets);\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n shares = super.withdraw(assets, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Redeems the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param shares amount of shares to be redeemed for underlying asset.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return assets amount of underlying asset that was withdrawn.\\n function redeem(uint256 shares, address receiver, address owner) public override returns (uint256 assets) {\\n auditor.checkShortfall(this, owner, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n assets = super.redeem(shares, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n function _mint(address to, uint256 amount) internal override {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(to);\\n super._mint(to, amount);\\n }\\n\\n /// @notice Moves amount of shares from the caller's account to `to`.\\n /// @dev Makes sure that the caller doesn't have shortfall after transferring.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transfer(address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, msg.sender, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(msg.sender);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transfer(to, shares);\\n }\\n\\n /// @notice Moves amount of shares from `from` to `to` using the allowance mechanism.\\n /// @dev Makes sure that `from` address doesn't have shortfall after transferring.\\n /// @param from address from which the assets will be transferred.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transferFrom(address from, address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, from, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(from);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transferFrom(from, to, shares);\\n }\\n\\n /// @notice Gets current snapshot for an account across all maturities.\\n /// @param account account to return status snapshot in the specified maturity date.\\n /// @return the amount deposited to the floating pool and the amount owed to floating and fixed pools.\\n function accountSnapshot(address account) external view returns (uint256, uint256) {\\n return (convertToAssets(balanceOf[account]), previewDebt(account));\\n }\\n\\n /// @notice Gets all borrows and penalties for an account.\\n /// @param borrower account to return status snapshot for fixed and floating borrows.\\n /// @return debt the total debt, denominated in number of assets.\\n function previewDebt(address borrower) public view returns (uint256 debt) {\\n Account storage account = accounts[borrower];\\n uint256 memPenaltyRate = penaltyRate;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n // calculate all maturities using the base maturity and the following bits representing the following intervals\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 positionAssets = position.principal + position.fee;\\n\\n debt += positionAssets;\\n\\n if (block.timestamp > maturity) {\\n debt += positionAssets.mulWadDown((block.timestamp - maturity) * memPenaltyRate);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n // calculate floating borrowed debt\\n uint256 shares = account.floatingBorrowShares;\\n if (shares != 0) debt += previewRefund(shares);\\n }\\n\\n /// @notice Charges treasury fee to certain amount of earnings.\\n /// @param earnings amount of earnings.\\n /// @return earnings minus the fees charged by the treasury.\\n function chargeTreasuryFee(uint256 earnings) internal returns (uint256) {\\n uint256 fee = earnings.mulWadDown(treasuryFeeRate);\\n depositToTreasury(fee);\\n return earnings - fee;\\n }\\n\\n /// @notice Collects all earnings that are charged to borrowers that make use of fixed pool deposits' assets.\\n /// @param earnings amount of earnings.\\n function collectFreeLunch(uint256 earnings) internal {\\n if (earnings == 0) return;\\n\\n if (treasuryFeeRate != 0) {\\n depositToTreasury(earnings);\\n } else {\\n earningsAccumulator += earnings;\\n }\\n }\\n\\n /// @notice Deposits amount of assets on behalf of the treasury address.\\n /// @param fee amount of assets to be deposited.\\n function depositToTreasury(uint256 fee) internal {\\n if (fee != 0) {\\n _mint(treasury, previewDeposit(fee));\\n floatingAssets += fee;\\n }\\n }\\n\\n /// @notice Calculates the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings to be distributed from the accumulator.\\n function accumulatedEarnings() internal view returns (uint256 earnings) {\\n uint256 elapsed = block.timestamp - lastAccumulatorAccrual;\\n if (elapsed == 0) return 0;\\n return\\n earningsAccumulator.mulDivDown(\\n elapsed,\\n elapsed + earningsAccumulatorSmoothFactor.mulWadDown(maxFuturePools * FixedLib.INTERVAL)\\n );\\n }\\n\\n /// @notice Accrues the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings distributed from the accumulator.\\n function accrueAccumulatedEarnings() internal returns (uint256 earnings) {\\n earnings = accumulatedEarnings();\\n\\n earningsAccumulator -= earnings;\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n emit AccumulatorAccrual(block.timestamp);\\n }\\n\\n /// @notice Updates the `floatingAssetsAverage`.\\n function updateFloatingAssetsAverage() internal {\\n floatingAssetsAverage = previewFloatingAssetsAverage();\\n lastAverageUpdate = uint32(block.timestamp);\\n }\\n\\n /// @notice Returns the current `floatingAssetsAverage` without updating the storage variable.\\n /// @return projected `floatingAssetsAverage`.\\n function previewFloatingAssetsAverage() public view returns (uint256) {\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 memFloatingAssetsAverage = floatingAssetsAverage;\\n uint256 dampSpeedFactor = memFloatingAssets < memFloatingAssetsAverage ? dampSpeedDown : dampSpeedUp;\\n uint256 averageFactor = uint256(1e18 - (-int256(dampSpeedFactor * (block.timestamp - lastAverageUpdate))).expWad());\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n /// @notice Updates the floating pool borrows' variables.\\n /// @return treasuryFee amount of fees charged by the treasury to the new calculated floating debt.\\n function updateFloatingDebt() internal returns (uint256 treasuryFee) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 utilization = floatingUtilization(memFloatingAssets, memFloatingDebt);\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(utilization, globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed))\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n\\n memFloatingDebt += newDebt;\\n treasuryFee = newDebt.mulWadDown(treasuryFeeRate);\\n floatingAssets = memFloatingAssets + newDebt - treasuryFee;\\n floatingDebt = memFloatingDebt;\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n emit FloatingDebtUpdate(block.timestamp, utilization);\\n }\\n\\n /// @notice Calculates the total floating debt, considering elapsed time since last update and current interest rate.\\n /// @return actual floating debt plus projected interest.\\n function totalFloatingBorrowAssets() public view returns (uint256) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(\\n floatingUtilization(memFloatingAssets, memFloatingDebt),\\n globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed)\\n )\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n return memFloatingDebt + newDebt;\\n }\\n\\n /// @notice Calculates the floating pool balance plus earnings to be accrued at current timestamp\\n /// from maturities and accumulator.\\n /// @return actual floatingAssets plus earnings to be accrued at current timestamp.\\n function totalAssets() public view override returns (uint256) {\\n unchecked {\\n uint256 backupEarnings = 0;\\n\\n uint256 latestMaturity = block.timestamp - (block.timestamp % FixedLib.INTERVAL);\\n uint256 maxMaturity = latestMaturity + maxFuturePools * FixedLib.INTERVAL;\\n\\n for (uint256 maturity = latestMaturity; maturity <= maxMaturity; maturity += FixedLib.INTERVAL) {\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (maturity > lastAccrual) {\\n backupEarnings += block.timestamp < maturity\\n ? pool.unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual)\\n : pool.unassignedEarnings;\\n }\\n }\\n\\n return\\n floatingAssets +\\n backupEarnings +\\n accumulatedEarnings() +\\n (totalFloatingBorrowAssets() - floatingDebt).mulWadDown(1e18 - treasuryFeeRate);\\n }\\n }\\n\\n /// @notice Simulates the effects of a borrow at the current time, given current contract conditions.\\n /// @param assets amount of assets to borrow.\\n /// @return amount of shares that will be asigned to the account after the borrow.\\n function previewBorrow(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a repay at the current time, given current contract conditions.\\n /// @param assets amount of assets to repay.\\n /// @return amount of shares that will be subtracted from the account after the repay.\\n function previewRepay(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a refund at the current time, given current contract conditions.\\n /// @param shares amount of shares to subtract from caller's accountability.\\n /// @return amount of assets that will be repaid.\\n function previewRefund(uint256 shares) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalFloatingBorrowAssets(), supply);\\n }\\n\\n /// @notice Checks msg.sender's allowance over account's assets.\\n /// @param account account in which the allowance will be checked.\\n /// @param assets assets from account that msg.sender wants to operate on.\\n function spendAllowance(address account, uint256 assets) internal {\\n if (msg.sender != account) {\\n uint256 allowed = allowance[account][msg.sender]; // saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[account][msg.sender] = allowed - previewWithdraw(assets);\\n }\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed amount of the fixed pool.\\n function fixedPoolBorrowed(uint256 maturity) external view returns (uint256) {\\n return fixedPools[maturity].borrowed;\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed and supplied amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed and supplied amount of the fixed pool.\\n function fixedPoolBalance(uint256 maturity) external view returns (uint256, uint256) {\\n return (fixedPools[maturity].borrowed, fixedPools[maturity].supplied);\\n }\\n\\n /// @notice Retrieves fixed utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function fixedUtilization(uint256 supplied, uint256 borrowed, uint256 assets) internal pure returns (uint256) {\\n return assets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves global utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function globalUtilization(uint256 assets, uint256 debt, uint256 backupBorrowed) internal pure returns (uint256) {\\n return assets != 0 ? (debt + backupBorrowed).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves floating utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function floatingUtilization(uint256 assets, uint256 debt) internal pure returns (uint256) {\\n return assets != 0 ? debt.divWadUp(assets) : 0;\\n }\\n\\n /// @notice Emits MarketUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitMarketUpdate() internal {\\n emit MarketUpdate(\\n block.timestamp,\\n totalSupply,\\n floatingAssets,\\n totalFloatingBorrowShares,\\n floatingDebt,\\n earningsAccumulator\\n );\\n }\\n\\n /// @notice Emits FixedEarningsUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitFixedEarningsUpdate(uint256 maturity) internal {\\n emit FixedEarningsUpdate(block.timestamp, maturity, fixedPools[maturity].unassignedEarnings);\\n }\\n\\n /// @notice Sets name and symbol for the Market.\\n /// @param assetSymbol the symbol for the underlying asset.\\n function setAssetSymbol(string calldata assetSymbol) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n name = string.concat(\\\"exactly \\\", assetSymbol);\\n symbol = string.concat(\\\"exa\\\", assetSymbol);\\n }\\n\\n /// @notice Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially\\n /// providing liquidity.\\n /// @param backupFeeRate_ percentage amount represented with 18 decimals.\\n function setBackupFeeRate(uint256 backupFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n backupFeeRate = backupFeeRate_;\\n emit BackupFeeRateSet(backupFeeRate_);\\n }\\n\\n /// @notice Sets the damp speed used to update the floatingAssetsAverage.\\n /// @param up damp speed up, represented with 18 decimals.\\n /// @param down damp speed down, represented with 18 decimals.\\n function setDampSpeed(uint256 up, uint256 down) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n updateFloatingAssetsAverage();\\n dampSpeedUp = up;\\n dampSpeedDown = down;\\n emit DampSpeedSet(up, down);\\n }\\n\\n /// @notice Sets the factor used when smoothly accruing earnings to the floating pool.\\n /// @param earningsAccumulatorSmoothFactor_ represented with 18 decimals.\\n function setEarningsAccumulatorSmoothFactor(\\n uint128 earningsAccumulatorSmoothFactor_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n floatingAssets += accrueAccumulatedEarnings();\\n emitMarketUpdate();\\n earningsAccumulatorSmoothFactor = earningsAccumulatorSmoothFactor_;\\n emit EarningsAccumulatorSmoothFactorSet(earningsAccumulatorSmoothFactor_);\\n }\\n\\n /// @notice Sets the interest rate model to be used to calculate rates.\\n /// @param interestRateModel_ new interest rate model.\\n function setInterestRateModel(InterestRateModel interestRateModel_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(interestRateModel) != address(0)) depositToTreasury(updateFloatingDebt());\\n\\n interestRateModel = interestRateModel_;\\n emitMarketUpdate();\\n emit InterestRateModelSet(interestRateModel_);\\n }\\n\\n /// @notice Sets the rewards controller to update account rewards when operating with the Market.\\n /// @param rewardsController_ new rewards controller.\\n function setRewardsController(RewardsController rewardsController_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n rewardsController = rewardsController_;\\n emit RewardsControllerSet(rewardsController_);\\n }\\n\\n /// @notice Sets the protocol's max future pools for fixed borrowing and lending.\\n /// @dev If value is decreased, VALID maturities will become NOT_READY.\\n /// @param futurePools number of pools to be active at the same time.\\n function setMaxFuturePools(uint8 futurePools) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n maxFuturePools = futurePools;\\n emit MaxFuturePoolsSet(futurePools);\\n }\\n\\n /// @notice Sets the penalty rate per second.\\n /// @param penaltyRate_ percentage represented with 18 decimals.\\n function setPenaltyRate(uint256 penaltyRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n penaltyRate = penaltyRate_;\\n emit PenaltyRateSet(penaltyRate_);\\n }\\n\\n /// @notice Sets the percentage that represents the liquidity reserves that can't be borrowed.\\n /// @param reserveFactor_ parameter represented with 18 decimals.\\n function setReserveFactor(uint128 reserveFactor_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n reserveFactor = reserveFactor_;\\n emit ReserveFactorSet(reserveFactor_);\\n }\\n\\n /// @notice Sets the treasury variables.\\n /// @param treasury_ address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate_ represented with 18 decimals.\\n function setTreasury(address treasury_, uint256 treasuryFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n depositToTreasury(updateFloatingDebt());\\n treasury = treasury_;\\n treasuryFeeRate = treasuryFeeRate_;\\n emit TreasurySet(treasury_, treasuryFeeRate_);\\n }\\n\\n /// @notice Sets the pause state to true in case of emergency, triggered by an authorized account.\\n function pause() external onlyPausingRoles {\\n _pause();\\n }\\n\\n /// @notice Sets the pause state to false when threat is gone, triggered by an authorized account.\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @notice Sets `isFrozen` state, triggered by an authorized account.\\n function setFrozen(bool isFrozen_) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (isFrozen == isFrozen_) return;\\n isFrozen = isFrozen_;\\n emit Frozen(msg.sender, isFrozen_);\\n }\\n\\n /// @dev Throws if the market is frozen.\\n function requireNotFrozen() internal view {\\n if (isFrozen) revert MarketFrozen();\\n }\\n\\n /// @dev Modifier to make a function callable only when the market is not frozen.\\n modifier whenNotFrozen() {\\n requireNotFrozen();\\n _;\\n }\\n\\n /// @dev Throws if the caller is not an `EMERGENCY_ADMIN_ROLE` or `PAUSER_ROLE`.\\n function requirePausingRoles() internal view {\\n if (!hasRole(EMERGENCY_ADMIN_ROLE, msg.sender) && !hasRole(PAUSER_ROLE, msg.sender)) {\\n revert NotPausingRole();\\n }\\n }\\n\\n /// @dev Modifier to make a function callable only by pausing roles.\\n modifier onlyPausingRoles() {\\n requirePausingRoles();\\n _;\\n }\\n\\n /// @notice Event emitted when an account borrows amount of assets from a floating pool.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of assets that were borrowed.\\n /// @param shares amount of borrow shares assigned to the account.\\n event Borrow(\\n address indexed caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /// @notice Emitted when an account repays amount of assets to a floating pool.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of assets that was repaid.\\n /// @param shares amount of borrow shares that were subtracted from the account's accountability.\\n event Repay(address indexed caller, address indexed borrower, uint256 assets, uint256 shares);\\n\\n /// @notice Emitted when an account deposits an amount of an asset to a certain fixed rate pool,\\n /// collecting fees at the end of the period.\\n /// @param maturity maturity at which the account will be able to collect his deposit + his fee.\\n /// @param caller address which deposited the assets.\\n /// @param owner address that will be able to withdraw the deposited assets.\\n /// @param assets amount of the asset that were deposited.\\n /// @param fee is the extra amount that it will be collected at maturity.\\n event DepositAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed owner,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account withdraws from a fixed rate pool.\\n /// @param maturity maturity where the account withdraw its deposits.\\n /// @param caller address which withdraw the asset.\\n /// @param receiver address which will be collecting the assets.\\n /// @param owner address which had the assets withdrawn.\\n /// @param positionAssets position size reduced.\\n /// @param assets amount of assets withdrawn (can include a discount for early withdraw).\\n event WithdrawAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 positionAssets,\\n uint256 assets\\n );\\n\\n /// @notice Emitted when an account borrows amount of an asset from a certain maturity date.\\n /// @param maturity maturity in which the account will have to repay the loan.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of the asset that were borrowed.\\n /// @param fee extra amount that will need to be paid at maturity.\\n event BorrowAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account repays its borrows after maturity.\\n /// @param maturity maturity where the account repaid its borrowed amounts.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount that was repaid.\\n /// @param positionAssets amount of the debt that was covered in this repayment (penalties could have been repaid).\\n event RepayAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed borrower,\\n uint256 assets,\\n uint256 positionAssets\\n );\\n\\n /// @notice Emitted when an account's position had a liquidation.\\n /// @param receiver address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of the asset that were repaid.\\n /// @param lendersAssets incentive paid to lenders.\\n /// @param seizeMarket address of the asset that were seized by the liquidator.\\n /// @param seizedAssets amount seized of the collateral.\\n event Liquidate(\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 lendersAssets,\\n Market indexed seizeMarket,\\n uint256 seizedAssets\\n );\\n\\n /// @notice Emitted when an account's collateral has been seized.\\n /// @param liquidator address which seized this collateral.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount seized of the collateral.\\n event Seize(address indexed liquidator, address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when an account is cleared from bad debt.\\n /// @param borrower address which was cleared from bad debt.\\n /// @param assets amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\\n event SpreadBadDebt(address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when the backupFeeRate parameter is changed by admin.\\n /// @param backupFeeRate rate charged to the fixed pools to be accrued by the floating depositors.\\n event BackupFeeRateSet(uint256 backupFeeRate);\\n\\n /// @notice Emitted when the damp speeds are changed by admin.\\n /// @param dampSpeedUp represented with 18 decimals.\\n /// @param dampSpeedDown represented with 18 decimals.\\n event DampSpeedSet(uint256 dampSpeedUp, uint256 dampSpeedDown);\\n\\n /// @notice Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\\n /// @param earningsAccumulatorSmoothFactor factor represented with 18 decimals.\\n event EarningsAccumulatorSmoothFactorSet(uint256 earningsAccumulatorSmoothFactor);\\n\\n /// @notice Emitted when the interestRateModel is changed by admin.\\n /// @param interestRateModel new interest rate model to be used to calculate rates.\\n event InterestRateModelSet(InterestRateModel indexed interestRateModel);\\n\\n /// @notice Emitted when the maxFuturePools is changed by admin.\\n /// @param maxFuturePools represented with 0 decimals.\\n event MaxFuturePoolsSet(uint256 maxFuturePools);\\n\\n /// @notice Emitted when the penaltyRate is changed by admin.\\n /// @param penaltyRate penaltyRate percentage per second represented with 18 decimals.\\n event PenaltyRateSet(uint256 penaltyRate);\\n\\n /// @notice Emitted when the reserveFactor is changed by admin.\\n /// @param reserveFactor reserveFactor percentage.\\n event ReserveFactorSet(uint256 reserveFactor);\\n\\n /// @notice Emitted when the treasury variables are changed by admin.\\n /// @param treasury address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate represented with 18 decimals.\\n event TreasurySet(address indexed treasury, uint256 treasuryFeeRate);\\n\\n /// @notice Emitted when the rewardsController is changed by admin.\\n /// @param rewardsController new rewards controller to update account rewards when operating with the Market.\\n event RewardsControllerSet(RewardsController indexed rewardsController);\\n\\n /// @notice Emitted when market state is updated.\\n /// @param timestamp current timestamp.\\n /// @param floatingDepositShares total floating supply shares.\\n /// @param floatingAssets total floating supply assets.\\n /// @param floatingBorrowShares total floating borrow shares.\\n /// @param floatingDebt total floating borrow assets.\\n /// @param earningsAccumulator earnings accumulator.\\n event MarketUpdate(\\n uint256 timestamp,\\n uint256 floatingDepositShares,\\n uint256 floatingAssets,\\n uint256 floatingBorrowShares,\\n uint256 floatingDebt,\\n uint256 earningsAccumulator\\n );\\n\\n /// @notice Emitted when the earnings of a maturity are updated.\\n /// @param timestamp current timestamp.\\n /// @param maturity maturity date where the earnings were updated.\\n /// @param unassignedEarnings pending unassigned earnings.\\n event FixedEarningsUpdate(uint256 timestamp, uint256 indexed maturity, uint256 unassignedEarnings);\\n\\n /// @notice Emitted when accumulator distributes earnings.\\n /// @param timestamp current timestamp.\\n event AccumulatorAccrual(uint256 timestamp);\\n\\n /// @notice Emitted when the floating debt is updated.\\n /// @param timestamp current timestamp.\\n /// @param utilization new floating utilization.\\n event FloatingDebtUpdate(uint256 timestamp, uint256 utilization);\\n\\n /// @notice Emitted when `account` sets the `isFrozen` flag.\\n event Frozen(address indexed account, bool isFrozen);\\n\\n /// @notice Stores fixed deposits and fixed borrows map and floating borrow shares of an account.\\n /// @param fixedDeposits encoded map maturity dates where the account supplied to.\\n /// @param fixedBorrows encoded map maturity dates where the account borrowed from.\\n /// @param floatingBorrowShares number of floating borrow shares assigned to the account.\\n struct Account {\\n uint256 fixedDeposits;\\n uint256 fixedBorrows;\\n uint256 floatingBorrowShares;\\n }\\n}\\n\\nerror Disagreement();\\nerror InsufficientProtocolLiquidity();\\nerror MarketFrozen();\\nerror NotAuditor();\\nerror NotPausingRole();\\nerror SelfLiquidation();\\nerror ZeroBorrow();\\nerror ZeroDeposit();\\nerror ZeroRepay();\\nerror ZeroWithdraw();\\n\",\"keccak256\":\"0xdf09a69098df74396067954be63e073deb5d0b9222cae1a1a3b9c2bf69678429\",\"license\":\"BUSL-1.1\"},\"contracts/RewardsController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { SafeTransferLib } from \\\"solmate/src/utils/SafeTransferLib.sol\\\";\\nimport { ERC20 } from \\\"solmate/src/tokens/ERC20.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract RewardsController is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint64;\\n using FixedPointMathLib for int256;\\n using SafeTransferLib for ERC20;\\n\\n /// @notice Max utilization supported by the sigmoid function not to cause a division by zero (1e18 = WAD).\\n uint256 public constant UTILIZATION_CAP = 1e18 - 1;\\n /// @notice Tracks the reward distribution data for a given market.\\n mapping(Market => Distribution) public distribution;\\n /// @notice Tracks enabled asset rewards.\\n mapping(ERC20 => bool) public rewardEnabled;\\n /// @notice Stores registered asset rewards.\\n ERC20[] public rewardList;\\n /// @notice Stores Markets with distributions set.\\n Market[] public marketList;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev Can only be called once.\\n function initialize() external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded deposit.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleDeposit(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n ops[0] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n update(account, market, dist.availableRewards[r], ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded borrow.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleBorrow(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n (, , uint256 accountFloatingBorrowShares) = market.accounts(account);\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n ERC20 reward = dist.availableRewards[r];\\n ops[0] = AccountOperation({\\n operation: true,\\n balance: accountFloatingBorrowShares + accountFixedBorrowShares(market, account, dist.rewards[reward].start)\\n });\\n update(account, Market(msg.sender), reward, ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Claims all `msg.sender` rewards to the given account.\\n /// @param to The address to send the rewards to.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claimAll(address to) external returns (ERC20[] memory rewardsList, uint256[] memory claimedAmounts) {\\n return claim(allMarketsOperations(), to, rewardList);\\n }\\n\\n /// @notice Claims `msg.sender` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param to The address to send the rewards to.\\n /// @param rewardsList The list of rewards assets to claim.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n address to,\\n ERC20[] memory rewardsList\\n ) public claimSender returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n uint256 rewardsCount = rewardsList.length;\\n claimedAmounts = new uint256[](rewardsCount);\\n address sender = _claimSender;\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n uint256 availableRewards = dist.availableRewardsCount;\\n for (uint128 r = 0; r < availableRewards; ) {\\n update(\\n sender,\\n marketOperation.market,\\n dist.availableRewards[r],\\n accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n sender,\\n dist.rewards[dist.availableRewards[r]].start\\n )\\n );\\n unchecked {\\n ++r;\\n }\\n }\\n for (uint256 r = 0; r < rewardsCount; ) {\\n RewardData storage rewardData = dist.rewards[rewardsList[r]];\\n for (uint256 o = 0; o < marketOperation.operations.length; ) {\\n uint256 rewardAmount = rewardData.accounts[sender][marketOperation.operations[o]].accrued;\\n if (rewardAmount != 0) {\\n claimedAmounts[r] += rewardAmount;\\n rewardData.accounts[sender][marketOperation.operations[o]].accrued = 0;\\n }\\n unchecked {\\n ++o;\\n }\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 r = 0; r < rewardsList.length; ) {\\n uint256 claimedAmount = claimedAmounts[r];\\n if (claimedAmount > 0) {\\n rewardsList[r].safeTransfer(to, claimedAmount);\\n emit Claim(sender, rewardsList[r], to, claimedAmount);\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n return (rewardsList, claimedAmounts);\\n }\\n\\n /// @notice Claims `permit.owner` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param permit Arguments and signature from `permit.owner`.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n ClaimPermit calldata permit\\n ) external permitSender(permit) returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n return claim(marketOps, msg.sender, permit.assets);\\n }\\n\\n /// @notice Gets the configuration of a given distribution.\\n /// @param market The market to get the distribution configuration for.\\n /// @param reward The reward asset.\\n /// @return The distribution configuration.\\n function rewardConfig(Market market, ERC20 reward) external view returns (Config memory) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return\\n Config({\\n market: market,\\n reward: reward,\\n priceFeed: rewardData.priceFeed,\\n start: rewardData.start,\\n distributionPeriod: rewardData.end - rewardData.start,\\n targetDebt: rewardData.targetDebt,\\n totalDistribution: rewardData.totalDistribution,\\n undistributedFactor: rewardData.undistributedFactor,\\n flipSpeed: rewardData.flipSpeed,\\n compensationFactor: rewardData.compensationFactor,\\n transitionFactor: rewardData.transitionFactor,\\n borrowAllocationWeightFactor: rewardData.borrowAllocationWeightFactor,\\n depositAllocationWeightAddend: rewardData.depositAllocationWeightAddend,\\n depositAllocationWeightFactor: rewardData.depositAllocationWeightFactor\\n });\\n }\\n\\n /// @notice Gets the amount of reward assets that are being distributed for a Market.\\n /// @param market Market to get the number of available rewards to distribute.\\n /// @return The amount reward assets set to a Market.\\n function availableRewardsCount(Market market) external view returns (uint256) {\\n return distribution[market].availableRewardsCount;\\n }\\n\\n /// @notice Gets the account data of a given account, Market, operation and reward asset.\\n /// @param account The account to get the operation data from.\\n /// @param market The market in which the operation was made.\\n /// @param operation True if the operation was a borrow, false if it was a deposit.\\n /// @param reward The reward asset.\\n /// @return accrued The accrued amount.\\n /// @return index The account index.\\n function accountOperation(\\n address account,\\n Market market,\\n bool operation,\\n ERC20 reward\\n ) external view returns (uint256, uint256) {\\n Account storage operationAccount = distribution[market].rewards[reward].accounts[account][operation];\\n return (operationAccount.accrued, operationAccount.index);\\n }\\n\\n /// @notice Gets the distribution `start`, `end` and `lastUpdate` value of a given market and reward.\\n /// @param market The market to get the distribution times.\\n /// @param reward The reward asset.\\n /// @return The distribution `start`, `end` and `lastUpdate` time.\\n function distributionTime(Market market, ERC20 reward) external view returns (uint32, uint32, uint32) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.start, rewardData.end, rewardData.lastUpdate);\\n }\\n\\n /// @notice Retrieves all rewards addresses.\\n function allRewards() external view returns (ERC20[] memory) {\\n return rewardList;\\n }\\n\\n /// @notice Gets all market and operations.\\n /// @return marketOps The list of market operations.\\n function allMarketsOperations() public view returns (MarketOperation[] memory marketOps) {\\n Market[] memory markets = marketList;\\n marketOps = new MarketOperation[](markets.length);\\n for (uint256 m = 0; m < markets.length; ) {\\n bool[] memory ops = new bool[](2);\\n ops[0] = true;\\n ops[1] = false;\\n marketOps[m] = MarketOperation({ market: markets[m], operations: ops });\\n unchecked {\\n ++m;\\n }\\n }\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account and reward asset.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function allClaimable(address account, ERC20 reward) external view returns (uint256 unclaimedRewards) {\\n return claimable(allMarketsOperations(), account, reward);\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account, Market operations and reward asset.\\n /// @param marketOps The list of Market operations to get the accrued and pending rewards from.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function claimable(\\n MarketOperation[] memory marketOps,\\n address account,\\n ERC20 reward\\n ) public view returns (uint256 unclaimedRewards) {\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n RewardData storage rewardData = dist.rewards[reward];\\n if (dist.availableRewardsCount == 0) {\\n unchecked {\\n ++i;\\n }\\n continue;\\n }\\n\\n AccountOperation[] memory ops = accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n account,\\n rewardData.start\\n );\\n uint256 balance;\\n for (uint256 o = 0; o < ops.length; ) {\\n unclaimedRewards += rewardData.accounts[account][ops[o].operation].accrued;\\n balance += ops[o].balance;\\n unchecked {\\n ++o;\\n }\\n }\\n if (balance > 0) {\\n unclaimedRewards += pendingRewards(\\n account,\\n reward,\\n AccountMarketOperation({ market: marketOperation.market, accountOperations: ops })\\n );\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Iterates and accrues all rewards for the operations of the given account in the given market.\\n /// @param account The account to accrue the rewards for.\\n /// @param market The Market in which the operations where made.\\n /// @param reward The reward asset.\\n /// @param ops The operations to accrue the rewards for.\\n function update(address account, Market market, ERC20 reward, AccountOperation[] memory ops) internal {\\n uint256 baseUnit = distribution[market].baseUnit;\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n {\\n uint256 lastUpdate = rewardData.lastUpdate;\\n // `lastUpdate` can be greater than `block.timestamp` if distribution is set to start on a future date\\n if (block.timestamp > lastUpdate) {\\n (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) = previewAllocation(\\n rewardData,\\n market,\\n block.timestamp - lastUpdate\\n );\\n if (borrowIndex > type(uint128).max || depositIndex > type(uint128).max) revert IndexOverflow();\\n rewardData.borrowIndex = uint128(borrowIndex);\\n rewardData.depositIndex = uint128(depositIndex);\\n rewardData.lastUpdate = uint32(block.timestamp);\\n rewardData.lastUndistributed = newUndistributed;\\n emit IndexUpdate(market, reward, borrowIndex, depositIndex, newUndistributed, block.timestamp);\\n }\\n }\\n\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 i = 0; i < ops.length; ) {\\n AccountOperation memory op = ops[i];\\n Account storage accountData = operationAccount[op.operation];\\n uint256 accountIndex = accountData.index;\\n uint256 newAccountIndex;\\n if (op.operation) {\\n newAccountIndex = rewardData.borrowIndex;\\n } else {\\n newAccountIndex = rewardData.depositIndex;\\n }\\n if (accountIndex != newAccountIndex) {\\n accountData.index = uint128(newAccountIndex);\\n if (op.balance != 0) {\\n uint256 rewardsAccrued = accountRewards(op.balance, newAccountIndex, accountIndex, baseUnit);\\n accountData.accrued += uint128(rewardsAccrued);\\n emit Accrue(market, reward, account, op.operation, accountIndex, newAccountIndex, rewardsAccrued);\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the equivalent of borrow shares from fixed pool principal borrows of an account.\\n /// @param market The Market to get the fixed borrows from.\\n /// @param account The account that borrowed from fixed pools.\\n /// @return fixedDebt The fixed borrow shares.\\n function accountFixedBorrowShares(\\n Market market,\\n address account,\\n uint32 start\\n ) internal view returns (uint256 fixedDebt) {\\n uint256 firstMaturity = start - (start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 principal, ) = market.fixedBorrowPositions(maturity, account);\\n fixedDebt += principal;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n fixedDebt = market.previewRepay(fixedDebt);\\n }\\n\\n /// @notice Gets the reward indexes and last amount of undistributed rewards for a given market and reward asset.\\n /// @param market The market to get the reward indexes for.\\n /// @param reward The reward asset to get the reward indexes for.\\n /// @return borrowIndex The index for the floating and fixed borrow operation.\\n /// @return depositIndex The index for the floating deposit operation.\\n /// @return lastUndistributed The last amount of undistributed rewards.\\n function rewardIndexes(Market market, ERC20 reward) external view returns (uint256, uint256, uint256) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.borrowIndex, rewardData.depositIndex, rewardData.lastUndistributed);\\n }\\n\\n /// @notice Calculates the rewards not accrued yet for the given operations of a given account and reward asset.\\n /// @param account The account to get the pending rewards for.\\n /// @param reward The reward asset to get the pending rewards for.\\n /// @param ops The operations to get the pending rewards for.\\n /// @return rewards The pending rewards for the given operations.\\n function pendingRewards(\\n address account,\\n ERC20 reward,\\n AccountMarketOperation memory ops\\n ) internal view returns (uint256 rewards) {\\n RewardData storage rewardData = distribution[ops.market].rewards[reward];\\n uint256 baseUnit = distribution[ops.market].baseUnit;\\n uint256 lastUpdate = rewardData.lastUpdate;\\n (uint256 borrowIndex, uint256 depositIndex, ) = previewAllocation(\\n rewardData,\\n ops.market,\\n block.timestamp > lastUpdate ? block.timestamp - lastUpdate : 0\\n );\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 o = 0; o < ops.accountOperations.length; ) {\\n uint256 nextIndex;\\n if (ops.accountOperations[o].operation) {\\n nextIndex = borrowIndex;\\n } else {\\n nextIndex = depositIndex;\\n }\\n\\n rewards += accountRewards(\\n ops.accountOperations[o].balance,\\n nextIndex,\\n operationAccount[ops.accountOperations[o].operation].index,\\n baseUnit\\n );\\n unchecked {\\n ++o;\\n }\\n }\\n }\\n\\n /// @notice Calculates and returns the new amount of rewards given by the difference between the `accountIndex` and\\n /// the `globalIndex`.\\n /// @param balance The account's balance in the operation's pool.\\n /// @param globalIndex Current index of the distribution.\\n /// @param accountIndex Last index stored for the account.\\n /// @param baseUnit One unit of the Market's asset (10**decimals).\\n /// @return The amount of new rewards to be accrued by the account.\\n function accountRewards(\\n uint256 balance,\\n uint256 globalIndex,\\n uint256 accountIndex,\\n uint256 baseUnit\\n ) internal pure returns (uint256) {\\n return balance.mulDivDown(globalIndex - accountIndex, baseUnit);\\n }\\n\\n /// @notice Retrieves projected distribution indexes and new undistributed amount for a given `deltaTime`.\\n /// @param market The market to calculate the indexes for.\\n /// @param reward The reward asset to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n Market market,\\n ERC20 reward,\\n uint256 deltaTime\\n ) external view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n return previewAllocation(distribution[market].rewards[reward], market, deltaTime);\\n }\\n\\n /// @notice Calculates and returns the distribution indexes and new undistributed tokens for a given `rewardData`.\\n /// @param rewardData The distribution's data.\\n /// @param market The market to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n RewardData storage rewardData,\\n Market market,\\n uint256 deltaTime\\n ) internal view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n TotalMarketBalance memory m;\\n m.floatingDebt = market.floatingDebt();\\n m.floatingAssets = market.floatingAssets();\\n TimeVars memory t;\\n t.start = rewardData.start;\\n t.end = rewardData.end;\\n {\\n uint256 firstMaturity = t.start - (t.start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n uint256 fixedDebt;\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 borrowed, ) = market.fixedPoolBalance(maturity);\\n fixedDebt += borrowed;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n m.debt = m.floatingDebt + fixedDebt;\\n m.fixedBorrowShares = market.previewRepay(fixedDebt);\\n }\\n uint256 target;\\n {\\n uint256 targetDebt = rewardData.targetDebt;\\n target = m.debt < targetDebt ? m.debt.divWadDown(targetDebt) : 1e18;\\n }\\n uint256 rewards;\\n {\\n uint256 releaseRate = rewardData.releaseRate;\\n uint256 lastUndistributed = rewardData.lastUndistributed;\\n t.period = t.end - t.start;\\n uint256 distributionFactor = t.period > 0\\n ? rewardData.undistributedFactor.mulDivDown(target, t.period * 1e18)\\n : 0;\\n if (block.timestamp <= t.end) {\\n if (distributionFactor > 0) {\\n uint256 exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n } else if (rewardData.lastUpdate > t.end) {\\n newUndistributed =\\n lastUndistributed -\\n lastUndistributed.mulWadUp(1e18 - uint256((-int256(distributionFactor * deltaTime)).expWad()));\\n rewards = uint256(-(int256(newUndistributed) - int256(lastUndistributed)));\\n } else {\\n uint256 exponential;\\n deltaTime = t.end - rewardData.lastUpdate;\\n if (distributionFactor > 0) {\\n exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n exponential = uint256((-int256(distributionFactor * (block.timestamp - t.end))).expWad());\\n newUndistributed = newUndistributed - newUndistributed.mulWadUp(1e18 - exponential);\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n }\\n if (rewards == 0) return (rewardData.borrowIndex, rewardData.depositIndex, newUndistributed);\\n }\\n {\\n AllocationVars memory v;\\n v.globalUtilization = Math.min(\\n m.floatingAssets != 0\\n ? 1e18 - (m.floatingAssets - m.floatingDebt - market.floatingBackupBorrowed()).divWadDown(m.floatingAssets)\\n : 0,\\n UTILIZATION_CAP\\n );\\n v.transitionFactor = rewardData.transitionFactor;\\n v.flipSpeed = rewardData.flipSpeed;\\n v.borrowAllocationWeightFactor = rewardData.borrowAllocationWeightFactor;\\n v.sigmoid = v.globalUtilization > 0\\n ? uint256(1e18).divWadDown(\\n 1e18 +\\n uint256(\\n (-(v.flipSpeed *\\n (int256(v.globalUtilization.divWadDown(1e18 - v.globalUtilization)).lnWad() -\\n int256(v.transitionFactor.divWadDown(1e18 - v.transitionFactor)).lnWad())) / 1e18).expWad()\\n )\\n )\\n : 0;\\n v.borrowRewardRule = rewardData\\n .compensationFactor\\n .mulWadDown(\\n market\\n .interestRateModel()\\n .floatingRate(m.floatingAssets != 0 ? m.floatingDebt.divWadDown(m.floatingAssets) : 0, v.globalUtilization)\\n .mulWadDown(1e18 - v.globalUtilization.mulWadUp(1e18 - market.treasuryFeeRate())) +\\n v.borrowAllocationWeightFactor\\n )\\n .mulWadDown(1e18 - v.sigmoid);\\n v.depositRewardRule =\\n rewardData.depositAllocationWeightAddend.mulWadDown(1e18 - v.sigmoid) +\\n rewardData.depositAllocationWeightFactor.mulWadDown(v.sigmoid);\\n v.borrowAllocation = v.borrowRewardRule.divWadDown(v.borrowRewardRule + v.depositRewardRule);\\n v.depositAllocation = 1e18 - v.borrowAllocation;\\n {\\n uint256 totalDepositSupply = market.totalSupply();\\n uint256 totalBorrowSupply = market.totalFloatingBorrowShares() + m.fixedBorrowShares;\\n uint256 baseUnit = distribution[market].baseUnit;\\n borrowIndex =\\n rewardData.borrowIndex +\\n (totalBorrowSupply > 0 ? rewards.mulWadDown(v.borrowAllocation).mulDivDown(baseUnit, totalBorrowSupply) : 0);\\n depositIndex =\\n rewardData.depositIndex +\\n (\\n totalDepositSupply > 0\\n ? rewards.mulWadDown(v.depositAllocation).mulDivDown(baseUnit, totalDepositSupply)\\n : 0\\n );\\n }\\n }\\n }\\n\\n /// @notice Get account balances of the given Market operations.\\n /// @param market The address of the Market.\\n /// @param ops List of operations to retrieve account balance.\\n /// @param account Account to get the balance from.\\n /// @param distributionStart Timestamp of the start of the distribution to correctly get the rewarded fixed pools.\\n /// @return accountBalanceOps contains a list with account balance per each operation.\\n function accountBalanceOperations(\\n Market market,\\n bool[] memory ops,\\n address account,\\n uint32 distributionStart\\n ) internal view returns (AccountOperation[] memory accountBalanceOps) {\\n accountBalanceOps = new AccountOperation[](ops.length);\\n for (uint256 i = 0; i < ops.length; ) {\\n if (ops[i]) {\\n (, , uint256 floatingBorrowShares) = market.accounts(account);\\n accountBalanceOps[i] = AccountOperation({\\n operation: true,\\n balance: floatingBorrowShares + accountFixedBorrowShares(market, account, distributionStart)\\n });\\n } else {\\n accountBalanceOps[i] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Withdraws the contract's balance of the given asset to the given address.\\n /// @param asset The asset to withdraw.\\n /// @param to The address to withdraw the asset to.\\n function withdraw(ERC20 asset, address to) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n asset.safeTransfer(to, asset.balanceOf(address(this)));\\n }\\n\\n /// @notice Enables or updates the reward distribution for the given markets and rewards.\\n /// @param configs The configurations to update each RewardData with.\\n function config(Config[] memory configs) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n for (uint256 i = 0; i < configs.length; ) {\\n // transitionFactor cannot be eq or higher than 1e18 to avoid division by zero or underflow\\n if (configs[i].transitionFactor >= 1e18) revert InvalidConfig();\\n // depositAllocationWeightFactor cannot be zero to avoid division by zero when sigmoid equals 1e18\\n if (configs[i].depositAllocationWeightFactor == 0) revert InvalidConfig();\\n\\n Distribution storage dist = distribution[configs[i].market];\\n RewardData storage rewardData = dist.rewards[configs[i].reward];\\n\\n if (dist.baseUnit == 0) {\\n // never initialized before, adding to the list of markets\\n marketList.push(configs[i].market);\\n }\\n if (!rewardEnabled[configs[i].reward]) {\\n // add reward address to global rewards list if still not enabled\\n rewardEnabled[configs[i].reward] = true;\\n rewardList.push(configs[i].reward);\\n }\\n if (rewardData.lastUpdate == 0) {\\n // add reward address to distribution data's available rewards if distribution is new\\n dist.availableRewards[dist.availableRewardsCount++] = configs[i].reward;\\n dist.baseUnit = 10 ** configs[i].market.decimals();\\n // set initial parameters if distribution is new\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n } else {\\n uint32 start = rewardData.start;\\n uint32 end = rewardData.end;\\n // update global indexes before updating distribution values\\n bool[] memory ops = new bool[](1);\\n ops[0] = true;\\n update(\\n address(0),\\n configs[i].market,\\n configs[i].reward,\\n accountBalanceOperations(configs[i].market, ops, address(0), start)\\n );\\n // properly update release rate\\n if (block.timestamp < end) {\\n uint256 released = 0;\\n uint256 elapsed = 0;\\n if (block.timestamp > start) {\\n released =\\n rewardData.lastConfigReleased +\\n rewardData.releaseRate *\\n (block.timestamp - rewardData.lastConfig);\\n elapsed = block.timestamp - start;\\n if (configs[i].totalDistribution <= released || configs[i].distributionPeriod <= elapsed) {\\n revert InvalidConfig();\\n }\\n rewardData.lastConfigReleased = released;\\n }\\n\\n rewardData.releaseRate =\\n (configs[i].totalDistribution - released) /\\n (configs[i].distributionPeriod - elapsed);\\n } else if (rewardData.start != configs[i].start) {\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n rewardData.lastConfigReleased = 0;\\n }\\n }\\n rewardData.lastConfig = uint32(block.timestamp);\\n rewardData.end = rewardData.start + uint32(configs[i].distributionPeriod);\\n rewardData.priceFeed = configs[i].priceFeed;\\n // set emission and distribution parameters\\n rewardData.totalDistribution = configs[i].totalDistribution;\\n rewardData.targetDebt = configs[i].targetDebt;\\n rewardData.undistributedFactor = configs[i].undistributedFactor;\\n rewardData.flipSpeed = configs[i].flipSpeed;\\n rewardData.compensationFactor = configs[i].compensationFactor;\\n rewardData.borrowAllocationWeightFactor = configs[i].borrowAllocationWeightFactor;\\n rewardData.depositAllocationWeightAddend = configs[i].depositAllocationWeightAddend;\\n rewardData.transitionFactor = configs[i].transitionFactor;\\n rewardData.depositAllocationWeightFactor = configs[i].depositAllocationWeightFactor;\\n\\n emit DistributionSet(configs[i].market, configs[i].reward, configs[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n mapping(address => uint256) public nonces;\\n\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(\\\"RewardsController\\\"),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n address private _claimSender;\\n modifier claimSender() {\\n if (_claimSender == address(0)) _claimSender = msg.sender;\\n _;\\n delete _claimSender;\\n }\\n\\n modifier permitSender(ClaimPermit calldata permit) {\\n assert(_claimSender == address(0));\\n assert(permit.deadline >= block.timestamp);\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\\"ClaimPermit(address owner,address spender,address[] assets,uint256 deadline)\\\"),\\n permit.owner,\\n msg.sender,\\n permit.assets,\\n nonces[permit.owner]++,\\n permit.deadline\\n )\\n )\\n )\\n ),\\n permit.v,\\n permit.r,\\n permit.s\\n );\\n assert(recoveredAddress != address(0) && recoveredAddress == permit.owner);\\n _claimSender = permit.owner;\\n }\\n _;\\n assert(_claimSender == address(0));\\n }\\n\\n struct TotalMarketBalance {\\n uint256 debt;\\n uint256 fixedBorrowShares;\\n uint256 floatingDebt;\\n uint256 floatingAssets;\\n }\\n\\n struct TimeVars {\\n uint256 start;\\n uint256 end;\\n uint256 period;\\n }\\n\\n struct AllocationVars {\\n uint256 globalUtilization;\\n uint256 sigmoid;\\n uint256 borrowRewardRule;\\n uint256 depositRewardRule;\\n uint256 borrowAllocation;\\n uint256 depositAllocation;\\n uint256 transitionFactor;\\n int256 flipSpeed;\\n uint256 borrowAllocationWeightFactor;\\n }\\n\\n struct AccountOperation {\\n bool operation;\\n uint256 balance;\\n }\\n\\n struct MarketOperation {\\n Market market;\\n bool[] operations;\\n }\\n\\n struct AccountMarketOperation {\\n Market market;\\n AccountOperation[] accountOperations;\\n }\\n\\n struct Account {\\n // liquidity index of the reward distribution for the account\\n uint128 index;\\n // amount of accrued rewards for the account since last account index update\\n uint128 accrued;\\n }\\n\\n struct Config {\\n Market market;\\n ERC20 reward;\\n IPriceFeed priceFeed;\\n uint32 start;\\n uint256 distributionPeriod;\\n uint256 targetDebt;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n }\\n\\n struct RewardData {\\n // distribution model\\n uint256 targetDebt;\\n uint256 releaseRate;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n uint256 lastUndistributed;\\n // allocation model\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n // liquidity indexes of the reward distribution\\n uint128 borrowIndex;\\n uint128 depositIndex;\\n // distribution timestamps\\n uint32 start;\\n uint32 end;\\n uint32 lastUpdate;\\n // config helpers\\n uint32 lastConfig;\\n uint256 lastConfigReleased;\\n // price feed\\n IPriceFeed priceFeed;\\n // account addresses and their rewards data (index & accrued)\\n mapping(address => mapping(bool => Account)) accounts;\\n }\\n\\n struct Distribution {\\n // reward assets and their data\\n mapping(ERC20 => RewardData) rewards;\\n // list of reward asset addresses for the market\\n mapping(uint128 => ERC20) availableRewards;\\n // count of reward tokens for the market\\n uint8 availableRewardsCount;\\n // base unit of the market\\n uint256 baseUnit;\\n }\\n\\n /// @notice Emitted when rewards are accrued by an account.\\n /// @param market Market where the operation was made.\\n /// @param reward reward asset.\\n /// @param account account that accrued the rewards.\\n /// @param operation true if the operation was a borrow, false if it was a deposit.\\n /// @param accountIndex previous account index.\\n /// @param operationIndex new operation index that is assigned to the `accountIndex`.\\n /// @param rewardsAccrued amount of rewards accrued.\\n event Accrue(\\n Market indexed market,\\n ERC20 indexed reward,\\n address indexed account,\\n bool operation,\\n uint256 accountIndex,\\n uint256 operationIndex,\\n uint256 rewardsAccrued\\n );\\n\\n /// @notice Emitted when rewards are claimed by an account.\\n /// @param account account that claimed the rewards.\\n /// @param reward reward asset.\\n /// @param to account that received the rewards.\\n /// @param amount amount of rewards claimed.\\n event Claim(address indexed account, ERC20 indexed reward, address indexed to, uint256 amount);\\n\\n /// @notice Emitted when a distribution is set.\\n /// @param market Market whose distribution was set.\\n /// @param reward reward asset to be distributed when operating with the Market.\\n /// @param config configuration struct containing the distribution parameters.\\n event DistributionSet(Market indexed market, ERC20 indexed reward, Config config);\\n\\n /// @notice Emitted when the distribution indexes are updated.\\n /// @param market Market of the distribution.\\n /// @param reward reward asset.\\n /// @param borrowIndex index of the borrow operations of a distribution.\\n /// @param depositIndex index of the deposit operations of a distribution.\\n /// @param newUndistributed amount of undistributed rewards.\\n /// @param lastUpdate current timestamp.\\n event IndexUpdate(\\n Market indexed market,\\n ERC20 indexed reward,\\n uint256 borrowIndex,\\n uint256 depositIndex,\\n uint256 newUndistributed,\\n uint256 lastUpdate\\n );\\n}\\n\\nerror IndexOverflow();\\nerror InvalidConfig();\\n\\nstruct ClaimPermit {\\n address owner;\\n ERC20[] assets;\\n uint256 deadline;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n}\\n\",\"keccak256\":\"0xb49f89a25450c5d31384afa51595c7e2cf0b32ea73d6e8fd2b2c937cc60c7b5f\",\"license\":\"BUSL-1.1\"},\"contracts/utils/FixedLib.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\nlibrary FixedLib {\\n using FixedPointMathLib for uint256;\\n\\n uint256 internal constant INTERVAL = 4 weeks;\\n\\n /// @notice Gets the amount of revenue sharing between the backup supplier and the new fixed pool supplier.\\n /// @param pool fixed rate pool.\\n /// @param amount amount being provided by the fixed pool supplier.\\n /// @param backupFeeRate rate charged to the fixed pool supplier to be accrued by the backup supplier.\\n /// @return yield amount to be offered to the fixed pool supplier.\\n /// @return backupFee yield to be accrued by the backup supplier for initially providing the liquidity.\\n function calculateDeposit(\\n Pool memory pool,\\n uint256 amount,\\n uint256 backupFeeRate\\n ) internal pure returns (uint256 yield, uint256 backupFee) {\\n uint256 memBackupSupplied = backupSupplied(pool);\\n if (memBackupSupplied != 0) {\\n yield = pool.unassignedEarnings.mulDivDown(Math.min(amount, memBackupSupplied), memBackupSupplied);\\n backupFee = yield.mulWadDown(backupFeeRate);\\n yield -= backupFee;\\n }\\n }\\n\\n /// @notice Registers an operation to add supply to a fixed rate pool and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be added to the supply.\\n /// @param amount amount to be added to the supply.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function deposit(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.supplied = supplied + amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to reduce borrowed amount from a fixed rate pool\\n /// and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be repaid.\\n /// @param amount amount to be added to the fixed rate pool.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function repay(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.borrowed = borrowed - amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to increase borrowed amount of a fixed rate pool\\n /// and potentially increase backup debt.\\n /// @param pool fixed rate pool where an amount will be borrowed.\\n /// @param amount amount to be borrowed from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function borrow(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 newBorrowed = borrowed + amount;\\n\\n backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, pool.supplied), newBorrowed);\\n pool.borrowed = newBorrowed;\\n }\\n\\n /// @notice Registers an operation to reduce supply from a fixed rate pool and potentially increase backup debt.\\n /// @param pool fixed rate pool where amount will be withdrawn.\\n /// @param amountToDiscount amount to be withdrawn from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function withdraw(Pool storage pool, uint256 amountToDiscount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n uint256 newSupply = supplied - amountToDiscount;\\n\\n backupDebtAddition = Math.min(supplied, borrowed) - Math.min(newSupply, borrowed);\\n pool.supplied = newSupply;\\n }\\n\\n /// @notice Accrues backup earnings from `unassignedEarnings` based on the `lastAccrual` time.\\n /// @param pool fixed rate pool where earnings will be accrued.\\n /// @param maturity maturity date of the pool.\\n /// @return backupEarnings amount of earnings to be distributed to the backup supplier.\\n function accrueEarnings(Pool storage pool, uint256 maturity) internal returns (uint256 backupEarnings) {\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (block.timestamp < maturity) {\\n uint256 unassignedEarnings = pool.unassignedEarnings;\\n pool.lastAccrual = block.timestamp;\\n backupEarnings = unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual);\\n pool.unassignedEarnings = unassignedEarnings - backupEarnings;\\n } else if (lastAccrual == maturity) {\\n backupEarnings = 0;\\n } else {\\n pool.lastAccrual = maturity;\\n backupEarnings = pool.unassignedEarnings;\\n pool.unassignedEarnings = 0;\\n }\\n }\\n\\n /// @notice Calculates the amount that a fixed rate pool borrowed from the backup supplier.\\n /// @param pool fixed rate pool.\\n /// @return amount borrowed from the fixed rate pool.\\n function backupSupplied(Pool memory pool) internal pure returns (uint256) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n return borrowed - Math.min(borrowed, supplied);\\n }\\n\\n /// @notice Modify positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it. Needs for the amount to be less than the principal and the fee\\n /// @param position original position to be scaled.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return scaled position.\\n function scaleProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 principal = amount.mulDivDown(position.principal, position.principal + position.fee);\\n position.principal = principal;\\n position.fee = amount - principal;\\n return position;\\n }\\n\\n /// @notice Reduce positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it.\\n /// @param position original position to be reduced.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return reduced position.\\n function reduceProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 positionAssets = position.principal + position.fee;\\n uint256 newPositionAssets = positionAssets - amount;\\n position.principal = newPositionAssets.mulDivDown(position.principal, positionAssets);\\n position.fee = newPositionAssets - position.principal;\\n return position;\\n }\\n\\n /// @notice Calculates what proportion of earnings would `borrowAmount` represent considering `backupSupplied`.\\n /// @param earnings amount to be distributed.\\n /// @param borrowAmount amount that will be checked if came from the backup supplier or fixed rate pool.\\n /// @return unassignedEarnings earnings to be added to `unassignedEarnings`.\\n /// @return backupEarnings earnings to be distributed to the backup supplier.\\n function distributeEarnings(\\n Pool memory pool,\\n uint256 earnings,\\n uint256 borrowAmount\\n ) internal pure returns (uint256 unassignedEarnings, uint256 backupEarnings) {\\n backupEarnings = borrowAmount == 0\\n ? 0\\n : earnings.mulDivDown(borrowAmount - Math.min(backupSupplied(pool), borrowAmount), borrowAmount);\\n unassignedEarnings = earnings - backupEarnings;\\n }\\n\\n /// @notice Adds a maturity date to the borrow or supply positions of the account.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity the new maturity where the account will borrow or supply to.\\n /// @return updated encoded maturity dates.\\n function setMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n // initialize the maturity with also the 1st bit on the 33th position set\\n if (encoded == 0) return maturity | (1 << 32);\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n if (maturity < baseMaturity) {\\n // if the new maturity is lower than the base, set it as the new base\\n // wipe clean the last 32 bits, shift the amount of `INTERVAL` and set the new value with the 33rd bit set\\n uint256 range = (baseMaturity - maturity) / INTERVAL;\\n if (encoded >> (256 - range) != 0) revert MaturityOverflow();\\n encoded = ((encoded >> 32) << (32 + range));\\n return maturity | encoded | (1 << 32);\\n } else {\\n uint256 range = (maturity - baseMaturity) / INTERVAL;\\n if (range > 223) revert MaturityOverflow();\\n return encoded | (1 << (32 + range));\\n }\\n }\\n\\n /// @notice Remove maturity from account's borrow or supplied positions.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity maturity date to be removed.\\n /// @return updated encoded maturity dates.\\n function clearMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n if (encoded == 0 || encoded == maturity | (1 << 32)) return 0;\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n // if the baseMaturity is the one being cleaned\\n if (maturity == baseMaturity) {\\n // wipe 32 bytes + 1 for the old base flag\\n uint256 packed = encoded >> 33;\\n uint256 range = 1;\\n while ((packed & 1) == 0 && packed != 0) {\\n unchecked {\\n ++range;\\n }\\n packed >>= 1;\\n }\\n encoded = ((encoded >> (32 + range)) << 32);\\n return (maturity + (range * INTERVAL)) | encoded;\\n } else {\\n // otherwise just clear the bit\\n return encoded & ~(1 << (32 + ((maturity - baseMaturity) / INTERVAL)));\\n }\\n }\\n\\n /// @notice Verifies that a maturity is `VALID`, `MATURED`, `NOT_READY` or `INVALID`.\\n /// @dev if expected state doesn't match the calculated one, it reverts with a custom error `UnmatchedPoolState`.\\n /// @param maturity timestamp of the maturity date to be verified.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param requiredState state required by the caller to be verified (see `State` for description).\\n /// @param alternativeState state required by the caller to be verified (see `State` for description).\\n function checkPoolState(uint256 maturity, uint8 maxPools, State requiredState, State alternativeState) internal view {\\n State state;\\n if (maturity % INTERVAL != 0) {\\n state = State.INVALID;\\n } else if (maturity <= block.timestamp) {\\n state = State.MATURED;\\n } else if (maturity > block.timestamp - (block.timestamp % INTERVAL) + (INTERVAL * maxPools)) {\\n state = State.NOT_READY;\\n } else {\\n state = State.VALID;\\n }\\n\\n if (state != requiredState && state != alternativeState) {\\n if (alternativeState == State.NONE) revert UnmatchedPoolState(uint8(state), uint8(requiredState));\\n\\n revert UnmatchedPoolStates(uint8(state), uint8(requiredState), uint8(alternativeState));\\n }\\n }\\n\\n /// @notice Stores the accountability of a fixed interest rate pool.\\n /// @param borrowed total amount borrowed from the pool.\\n /// @param supplied total amount supplied to the pool.\\n /// @param unassignedEarnings total amount of earnings not yet distributed and accrued.\\n /// @param lastAccrual timestamp for the last time that some earnings have been distributed to the backup supplier.\\n struct Pool {\\n uint256 borrowed;\\n uint256 supplied;\\n uint256 unassignedEarnings;\\n uint256 lastAccrual;\\n }\\n\\n /// @notice Stores principal and fee of a borrow or a supply position of a account in a fixed rate pool.\\n /// @param principal amount borrowed or supplied to the fixed rate pool.\\n /// @param fee amount of fees to be repaid or earned at the maturity of the fixed rate pool.\\n struct Position {\\n uint256 principal;\\n uint256 fee;\\n }\\n\\n enum State {\\n NONE,\\n INVALID,\\n MATURED,\\n VALID,\\n NOT_READY\\n }\\n}\\n\\nerror MaturityOverflow();\\nerror UnmatchedPoolState(uint8 state, uint8 requiredState);\\nerror UnmatchedPoolStates(uint8 state, uint8 requiredState, uint8 alternativeState);\\n\",\"keccak256\":\"0xb959d7d8c709c18ad668f58ab3d622b942ef36d72e6268e925e632b56a80ddc1\",\"license\":\"BUSL-1.1\"},\"contracts/utils/IPriceFeed.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\ninterface IPriceFeed {\\n function decimals() external view returns (uint8);\\n\\n function latestAnswer() external view returns (int256);\\n}\\n\",\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\"},\"solmate/src/mixins/ERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\nimport {SafeTransferLib} from \\\"../utils/SafeTransferLib.sol\\\";\\nimport {FixedPointMathLib} from \\\"../utils/FixedPointMathLib.sol\\\";\\n\\n/// @notice Minimal ERC4626 tokenized Vault implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)\\nabstract contract ERC4626 is ERC20 {\\n using SafeTransferLib for ERC20;\\n using FixedPointMathLib for uint256;\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /*//////////////////////////////////////////////////////////////\\n IMMUTABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n ERC20 public immutable asset;\\n\\n constructor(\\n ERC20 _asset,\\n string memory _name,\\n string memory _symbol\\n ) ERC20(_name, _symbol, _asset.decimals()) {\\n asset = _asset;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {\\n // Check for rounding error since we round down in previewDeposit.\\n require((shares = previewDeposit(assets)) != 0, \\\"ZERO_SHARES\\\");\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {\\n assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up.\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 shares) {\\n shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up.\\n\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 assets) {\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n // Check for rounding error since we round down in previewRedeem.\\n require((assets = previewRedeem(shares)) != 0, \\\"ZERO_ASSETS\\\");\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ACCOUNTING LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function totalAssets() public view virtual returns (uint256);\\n\\n function convertToShares(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets());\\n }\\n\\n function convertToAssets(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply);\\n }\\n\\n function previewDeposit(uint256 assets) public view virtual returns (uint256) {\\n return convertToShares(assets);\\n }\\n\\n function previewMint(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply);\\n }\\n\\n function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\\n }\\n\\n function previewRedeem(uint256 shares) public view virtual returns (uint256) {\\n return convertToAssets(shares);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LIMIT LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function maxDeposit(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxMint(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxWithdraw(address owner) public view virtual returns (uint256) {\\n return convertToAssets(balanceOf[owner]);\\n }\\n\\n function maxRedeem(address owner) public view virtual returns (uint256) {\\n return balanceOf[owner];\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL HOOKS LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {}\\n\\n function afterDeposit(uint256 assets, uint256 shares) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\"},\"solmate/src/tokens/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\\nabstract contract ERC20 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n uint8 public immutable decimals;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) public balanceOf;\\n\\n mapping(address => mapping(address => uint256)) public allowance;\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal immutable INITIAL_CHAIN_ID;\\n\\n bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\\n\\n mapping(address => uint256) public nonces;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint8 _decimals\\n ) {\\n name = _name;\\n symbol = _symbol;\\n decimals = _decimals;\\n\\n INITIAL_CHAIN_ID = block.chainid;\\n INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 amount) public virtual returns (bool) {\\n allowance[msg.sender][spender] = amount;\\n\\n emit Approval(msg.sender, spender, amount);\\n\\n return true;\\n }\\n\\n function transfer(address to, uint256 amount) public virtual returns (bool) {\\n balanceOf[msg.sender] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(msg.sender, to, amount);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual returns (bool) {\\n uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\\n\\n balanceOf[from] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n return true;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 LOGIC\\n //////////////////////////////////////////////////////////////*/\\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 ) public virtual {\\n require(deadline >= block.timestamp, \\\"PERMIT_DEADLINE_EXPIRED\\\");\\n\\n // Unchecked because the only math done is incrementing\\n // the owner's nonce which cannot realistically overflow.\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\n \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n ),\\n owner,\\n spender,\\n value,\\n nonces[owner]++,\\n deadline\\n )\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"INVALID_SIGNER\\\");\\n\\n allowance[recoveredAddress][spender] = value;\\n }\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\\n return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\\n }\\n\\n function computeDomainSeparator() internal view virtual returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 amount) internal virtual {\\n totalSupply += amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(address(0), to, amount);\\n }\\n\\n function _burn(address from, uint256 amount) internal virtual {\\n balanceOf[from] -= amount;\\n\\n // Cannot underflow because a user's balance\\n // will never be larger than the total supply.\\n unchecked {\\n totalSupply -= amount;\\n }\\n\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\"},\"solmate/src/utils/FixedPointMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Arithmetic library with operations for fixed-point numbers.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)\\nlibrary FixedPointMathLib {\\n /*//////////////////////////////////////////////////////////////\\n SIMPLIFIED FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.\\n\\n function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.\\n }\\n\\n function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.\\n }\\n\\n function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.\\n }\\n\\n function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.\\n }\\n\\n function powWad(int256 x, int256 y) internal pure returns (int256) {\\n // Equivalent to x to the power of y because x ** y = (e ** ln(x)) ** y = e ** (ln(x) * y)\\n return expWad((lnWad(x) * y) / int256(WAD)); // Using ln(x) means x must be greater than 0.\\n }\\n\\n function expWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n // When the result is < 0.5 we return zero. This happens when\\n // x <= floor(log(0.5e18) * 1e18) ~ -42e18\\n if (x <= -42139678854452767551) return 0;\\n\\n // When the result is > (2**255 - 1) / 1e18 we can not represent it as an\\n // int. This happens when x >= floor(log((2**255 - 1) / 1e18) * 1e18) ~ 135.\\n if (x >= 135305999368893231589) revert(\\\"EXP_OVERFLOW\\\");\\n\\n // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96\\n // for more intermediate precision and a binary basis. This base conversion\\n // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.\\n x = (x << 78) / 5**18;\\n\\n // Reduce range of x to (-\\u00bd ln 2, \\u00bd ln 2) * 2**96 by factoring out powers\\n // of two such that exp(x) = exp(x') * 2**k, where k is an integer.\\n // Solving this gives k = round(x / log(2)) and x' = x - k * log(2).\\n int256 k = ((x << 96) / 54916777467707473351141471128 + 2**95) >> 96;\\n x = x - k * 54916777467707473351141471128;\\n\\n // k is in the range [-61, 195].\\n\\n // Evaluate using a (6, 7)-term rational approximation.\\n // p is made monic, we'll multiply by a scale factor later.\\n int256 y = x + 1346386616545796478920950773328;\\n y = ((y * x) >> 96) + 57155421227552351082224309758442;\\n int256 p = y + x - 94201549194550492254356042504812;\\n p = ((p * y) >> 96) + 28719021644029726153956944680412240;\\n p = p * x + (4385272521454847904659076985693276 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n int256 q = x - 2855989394907223263936484059900;\\n q = ((q * x) >> 96) + 50020603652535783019961831881945;\\n q = ((q * x) >> 96) - 533845033583426703283633433725380;\\n q = ((q * x) >> 96) + 3604857256930695427073651918091429;\\n q = ((q * x) >> 96) - 14423608567350463180887372962807573;\\n q = ((q * x) >> 96) + 26449188498355588339934803723976023;\\n\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial won't have zeros in the domain as all its roots are complex.\\n // No scaling is necessary because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r should be in the range (0.09, 0.25) * 2**96.\\n\\n // We now need to multiply r by:\\n // * the scale factor s = ~6.031367120.\\n // * the 2**k factor from the range reduction.\\n // * the 1e18 / 2**96 factor for base conversion.\\n // We do this all at once, with an intermediate result in 2**213\\n // basis, so the final right shift is always by a positive amount.\\n r = int256((uint256(r) * 3822833074963236453042738258902158003155416615667) >> uint256(195 - k));\\n }\\n }\\n\\n function lnWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n // We want to convert x from 10**18 fixed point to 2**96 fixed point.\\n // We do this by multiplying by 2**96 / 10**18. But since\\n // ln(x * C) = ln(x) + ln(C), we can simply do nothing here\\n // and add ln(2**96 / 10**18) at the end.\\n\\n // Reduce range of x to (1, 2) * 2**96\\n // ln(2^k * x) = k * ln(2) + ln(x)\\n int256 k = int256(log2(uint256(x))) - 96;\\n x <<= uint256(159 - k);\\n x = int256(uint256(x) >> 159);\\n\\n // Evaluate using a (8, 8)-term rational approximation.\\n // p is made monic, we will multiply by a scale factor later.\\n int256 p = x + 3273285459638523848632254066296;\\n p = ((p * x) >> 96) + 24828157081833163892658089445524;\\n p = ((p * x) >> 96) + 43456485725739037958740375743393;\\n p = ((p * x) >> 96) - 11111509109440967052023855526967;\\n p = ((p * x) >> 96) - 45023709667254063763336534515857;\\n p = ((p * x) >> 96) - 14706773417378608786704636184526;\\n p = p * x - (795164235651350426258249787498 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n // q is monic by convention.\\n int256 q = x + 5573035233440673466300451813936;\\n q = ((q * x) >> 96) + 71694874799317883764090561454958;\\n q = ((q * x) >> 96) + 283447036172924575727196451306956;\\n q = ((q * x) >> 96) + 401686690394027663651624208769553;\\n q = ((q * x) >> 96) + 204048457590392012362485061816622;\\n q = ((q * x) >> 96) + 31853899698501571402653359427138;\\n q = ((q * x) >> 96) + 909429971244387300277376558375;\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial is known not to have zeros in the domain.\\n // No scaling required because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r is in the range (0, 0.125) * 2**96\\n\\n // Finalization, we need to:\\n // * multiply by the scale factor s = 5.549\\u2026\\n // * add ln(2**96 / 10**18)\\n // * add k * ln(2)\\n // * multiply by 10**18 / 2**96 = 5**18 >> 78\\n\\n // mul s * 5e18 * 2**96, base is now 5**18 * 2**192\\n r *= 1677202110996718588342820967067443963516166;\\n // add ln(2) * k * 5e18 * 2**192\\n r += 16597577552685614221487285958193947469193820559219878177908093499208371 * k;\\n // add ln(2**96 / 10**18) * 5e18 * 2**192\\n r += 600920179829731861736702779321621459595472258049074101567377883020018308;\\n // base conversion: mul 2**18 / 2**192\\n r >>= 174;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n LOW LEVEL FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function mulDivDown(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // Divide z by the denominator.\\n z := div(z, denominator)\\n }\\n }\\n\\n function mulDivUp(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // First, divide z - 1 by the denominator and add 1.\\n // We allow z - 1 to underflow if z is 0, because we multiply the\\n // end result by 0 if z is zero, ensuring we return 0 if z is zero.\\n z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1))\\n }\\n }\\n\\n function rpow(\\n uint256 x,\\n uint256 n,\\n uint256 scalar\\n ) internal pure returns (uint256 z) {\\n assembly {\\n switch x\\n case 0 {\\n switch n\\n case 0 {\\n // 0 ** 0 = 1\\n z := scalar\\n }\\n default {\\n // 0 ** n = 0\\n z := 0\\n }\\n }\\n default {\\n switch mod(n, 2)\\n case 0 {\\n // If n is even, store scalar in z for now.\\n z := scalar\\n }\\n default {\\n // If n is odd, store x in z for now.\\n z := x\\n }\\n\\n // Shifting right by 1 is like dividing by 2.\\n let half := shr(1, scalar)\\n\\n for {\\n // Shift n right by 1 before looping to halve it.\\n n := shr(1, n)\\n } n {\\n // Shift n right by 1 each iteration to halve it.\\n n := shr(1, n)\\n } {\\n // Revert immediately if x ** 2 would overflow.\\n // Equivalent to iszero(eq(div(xx, x), x)) here.\\n if shr(128, x) {\\n revert(0, 0)\\n }\\n\\n // Store x squared.\\n let xx := mul(x, x)\\n\\n // Round to the nearest number.\\n let xxRound := add(xx, half)\\n\\n // Revert if xx + half overflowed.\\n if lt(xxRound, xx) {\\n revert(0, 0)\\n }\\n\\n // Set x to scaled xxRound.\\n x := div(xxRound, scalar)\\n\\n // If n is even:\\n if mod(n, 2) {\\n // Compute z * x.\\n let zx := mul(z, x)\\n\\n // If z * x overflowed:\\n if iszero(eq(div(zx, x), z)) {\\n // Revert if x is non-zero.\\n if iszero(iszero(x)) {\\n revert(0, 0)\\n }\\n }\\n\\n // Round to the nearest number.\\n let zxRound := add(zx, half)\\n\\n // Revert if zx + half overflowed.\\n if lt(zxRound, zx) {\\n revert(0, 0)\\n }\\n\\n // Return properly scaled zxRound.\\n z := div(zxRound, scalar)\\n }\\n }\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n GENERAL NUMBER UTILITIES\\n //////////////////////////////////////////////////////////////*/\\n\\n function sqrt(uint256 x) internal pure returns (uint256 z) {\\n assembly {\\n let y := x // We start y at x, which will help us make our initial estimate.\\n\\n z := 181 // The \\\"correct\\\" value is 1, but this saves a multiplication later.\\n\\n // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad\\n // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.\\n\\n // We check y >= 2^(k + 8) but shift right by k bits\\n // each branch to ensure that if x >= 256, then y >= 256.\\n if iszero(lt(y, 0x10000000000000000000000000000000000)) {\\n y := shr(128, y)\\n z := shl(64, z)\\n }\\n if iszero(lt(y, 0x1000000000000000000)) {\\n y := shr(64, y)\\n z := shl(32, z)\\n }\\n if iszero(lt(y, 0x10000000000)) {\\n y := shr(32, y)\\n z := shl(16, z)\\n }\\n if iszero(lt(y, 0x1000000)) {\\n y := shr(16, y)\\n z := shl(8, z)\\n }\\n\\n // Goal was to get z*z*y within a small factor of x. More iterations could\\n // get y in a tighter range. Currently, we will have y in [256, 256*2^16).\\n // We ensured y >= 256 so that the relative difference between y and y+1 is small.\\n // That's not possible if x < 256 but we can just verify those cases exhaustively.\\n\\n // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.\\n // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.\\n // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.\\n\\n // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range\\n // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.\\n\\n // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate\\n // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.\\n\\n // There is no overflow risk here since y < 2^136 after the first branch above.\\n z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.\\n\\n // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n\\n // If x+1 is a perfect square, the Babylonian method cycles between\\n // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.\\n // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\\n // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.\\n // If you don't care whether the floor or ceil square root is returned, you can remove this statement.\\n z := sub(z, lt(div(x, z), z))\\n }\\n }\\n\\n function log2(uint256 x) internal pure returns (uint256 r) {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n assembly {\\n r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))\\n r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))\\n r := or(r, shl(5, lt(0xffffffff, shr(r, x))))\\n r := or(r, shl(4, lt(0xffff, shr(r, x))))\\n r := or(r, shl(3, lt(0xff, shr(r, x))))\\n r := or(r, shl(2, lt(0xf, shr(r, x))))\\n r := or(r, shl(1, lt(0x3, shr(r, x))))\\n r := or(r, lt(0x1, shr(r, x)))\\n }\\n }\\n\\n function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := mod(x, y)\\n }\\n }\\n\\n function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := div(x, y)\\n }\\n }\\n\\n /// @dev Will return 0 instead of reverting if y is zero.\\n function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // Add 1 to x * y if x % y > 0.\\n z := add(gt(mod(x, y), 0), div(x, y))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\"},\"solmate/src/utils/SafeTransferLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\n\\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)\\n/// @dev Caution! This library won't check that a token has code, responsibility is delegated to the caller.\\nlibrary SafeTransferLib {\\n /*//////////////////////////////////////////////////////////////\\n ETH OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n bool success;\\n\\n assembly {\\n // Transfer the ETH and store if it succeeded or not.\\n success := call(gas(), to, amount, 0, 0, 0, 0)\\n }\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferFrom(\\n ERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\\n mstore(4, from) // Append the \\\"from\\\" argument.\\n mstore(36, to) // Append the \\\"to\\\" argument.\\n mstore(68, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 100 because that's the total length of our calldata (4 + 32 * 3)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 100, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x095ea7b300000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"APPROVE_FAILED\\\");\\n }\\n}\\n\",\"keccak256\":\"0x5f2e1158c68c1f3d15b80e8a7dd92b6849f873066969562ad33c0abb80e536ff\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x610120604052348015610010575f80fd5b5060405161644938038061644983398101604081905261002f9161021c565b8160405180602001604052805f81525060405180602001604052805f8152508181846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100b09190610254565b60c96100bc8482610313565b5060ca6100c98382610313565b5060ff81166080524660a0526100dd610108565b60c0525050506001600160a01b0392831660e05250508116610100526101016101a1565b5050610444565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c960405161013991906103d2565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f54610100900460ff16156101b4575f80fd5b5f5460ff90811614610203575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610219575f80fd5b50565b5f806040838503121561022d575f80fd5b825161023881610205565b602084015190925061024981610205565b809150509250929050565b5f60208284031215610264575f80fd5b815160ff81168114610274575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102a357607f821691505b6020821081036102c157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561030e57805f5260205f20601f840160051c810160208510156102ec5750805b601f840160051c820191505b8181101561030b575f81556001016102f8565b50505b505050565b81516001600160401b0381111561032c5761032c61027b565b6103408161033a845461028f565b846102c7565b602080601f831160018114610373575f841561035c5750858301515b5f19600386901b1c1916600185901b1785556103ca565b5f85815260208120601f198616915b828110156103a157888601518255948401946001909101908401610382565b50858210156103be57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f8083546103df8161028f565b600182811680156103f7576001811461040c57610438565b60ff1984168752821515830287019450610438565b875f526020805f205f5b8581101561042f5781548a820152908401908201610416565b50505082870194505b50929695505050505050565b60805160a05160c05160e05161010051615f276105225f395f81816108070152818161161c015281816117c001528181611e3e015281816120910152818161220b0152818161257101528181612ed7015281816130800152818161316f015281816136990152614b0501525f81816107ac0152818161168001528181611c2201528181611d160152818161227d01528181612337015281816123fe0152818161286501528181612e59015281816136fd01528181614c92015281816151c001526152d501525f611c8f01525f611c5a01525f6107430152615f275ff3fe608060405234801561000f575f80fd5b5060043610610539575f3560e01c80636e76fc8f116102bf578063b2a02ff111610186578063d5164184116100ef578063e63ab1e9116100a9578063ef8b30f711610084578063ef8b30f714610d5e578063f3fdb15a14610d71578063fb0fc4c314610d84578063fea45d9414610d9b575f80fd5b8063e63ab1e914610d26578063e94b3c2114610d4d578063eee8c9e014610d56575f80fd5b8063d516418414610c92578063d547741f14610ca5578063d6b7494f14610cb8578063d905777e14610cc1578063dd62ed3e14610ce9578063e00b262514610d13575f80fd5b8063c63d75b611610140578063c63d75b614610831578063c6e6f59214610bf7578063ccfd8b1114610c0a578063ce96cb7714610c3b578063d2681a0b14610c4e578063d505accf14610c7f575f80fd5b8063b2a02ff114610b85578063b3d7f6b914610b98578063b460af9414610bab578063ba08765214610bbe578063bee36bb314610bd1578063bf722ca214610be4575f80fd5b806391d1485411610228578063a16a8850116101e2578063a16a885014610b27578063a1bab44714610b3c578063a1e8f02b14610b4f578063a217fddf14610b58578063a9059cbb14610b5f578063acb7081514610b72575f80fd5b806391d1485414610ac0578063926bb63314610ad357806394bf804d14610ae657806395d89b4114610af957806397bce8d014610b01578063a05a091a14610b14575f80fd5b80637ecebe00116102795780637ecebe0014610a6b5780638456cb5914610a8a5780638a1baa4614610a925780638bcd401614610a9b5780638c3cba5a14610aae5780638d0e5f0214610ab7575f80fd5b80636e76fc8f146109c05780636eb9ffeb146109e757806370a0823114610a1357806378007e2314610a325780637ad226dc14610a455780637e932d3214610a58575f80fd5b8063313ce567116104035780634322b7141161036c5780635cc2ef83116103265780635cc2ef83146109225780635e5c06e21461093557806361d027b31461097e57806366601032146109915780636bb65f531461099a5780636e553f65146109ad575f80fd5b80634322b7141461085857806347dffde01461088a5780634914c0081461089d5780634cdad506146108b05780634e7c5059146108c35780635c975abb14610917575f80fd5b80633aa18d6f116103bd5780633aa18d6f146107e65780633c6f317f146107ef5780633ec045a6146108025780633f4ba83a14610829578063402d267d1461083157806342da42bf14610845575f80fd5b8063313ce5671461073e57806333eeb1471461076557806334f7d1f2146107795780633644e5151461078c57806336568abe1461079457806338d52e0f146107a7575f80fd5b806313700101116104a5578063248a9ca31161045f578063248a9ca3146106bb57806325fc07a9146106dd57806328acf2cf146106fc5780632c5dcc771461070f5780632e0af008146107225780632f2ff15d1461072b575f80fd5b8063137001011461065d57806318160ddd146106705780631a5b9e62146106795780631a90f1861461068c5780631d43b30b1461069557806323b872dd146106a8575f80fd5b806307a2d13a116104f657806307a2d13a146105d6578063095ea7b3146105e95780630a28a477146105fc5780630ab69be81461060f5780630e52dbec146106365780630f2b75aa14610655575f80fd5b8063014a296f1461053d57806301e1d1141461056a57806301ffc9a714610580578063022d8af5146105a35780630539fa8c146105b857806306fdde03146105c1575b5f80fd5b61055061054b36600461566a565b610dae565b604080519283526020830191909152015b60405180910390f35b610572610de3565b604051908152602001610561565b61059361058e366004615685565b610e8f565b6040519015158152602001610561565b6105b66105b13660046156c7565b610ec5565b005b61057260d85481565b6105c9610f54565b60405161056191906156e0565b6105726105e4366004615715565b610fe0565b6105936105f736600461572c565b61100c565b61057261060a366004615715565b611077565b61055061061d366004615715565b5f90815260d16020526040902080546001909101549091565b60da546106439060ff1681565b60405160ff9091168152602001610561565b610572611096565b6105b661066b366004615794565b61113b565b61057260cb5481565b6105726106873660046157d3565b6111ac565b61057260d45481565b6105726106a336600461566a565b6116b5565b6105936106b6366004615825565b6117b5565b6105726106c9366004615715565b5f9081526065602052604090206001015490565b6105726106eb366004615715565b5f90815260d1602052604090205490565b6105b661070a366004615873565b611916565b6105b661071d36600461572c565b611962565b61057260dd5481565b6105b661073936600461588c565b6119d2565b6106437f000000000000000000000000000000000000000000000000000000000000000081565b60e35461059390600160a01b900460ff1681565b6105726107873660046158ba565b6119fb565b610572611c57565b6105b66107a236600461588c565b611cb1565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610561565b61057260d95481565b6105726107fd3660046158ba565b611cd3565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6105b6611d46565b61057261083f36600461566a565b505f1990565b6105b6610853366004615715565b611d7b565b60dc5461087290600160801b90046001600160801b031681565b6040516001600160801b039091168152602001610561565b610572610898366004615715565b611dba565b6105726108ab3660046158f8565b611dd8565b6105726108be366004615715565b6122af565b6108f76108d1366004615715565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610561565b60975460ff16610593565b6105b6610930366004615937565b6122b9565b61096361094336600461566a565b60d26020525f908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610561565b60e1546107ce906001600160a01b031681565b61057260e25481565b60e3546107ce906001600160a01b031681565b6105726109bb36600461588c565b612313565b6105727f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da546109fe90600160281b900463ffffffff1681565b60405163ffffffff9091168152602001610561565b610572610a2136600461566a565b60cc6020525f908152604090205481565b610572610a40366004615715565b6123b9565b610550610a5336600461588c565b6123d0565b6105b6610a66366004615957565b61242d565b610572610a7936600461566a565b60ce6020525f908152604090205481565b6105b66124aa565b61057260d55481565b6105b6610aa936600461566a565b6124bc565b61057260d35481565b61057260df5481565b610593610ace36600461588c565b61253c565b6105b6610ae136600461566a565b612566565b610572610af436600461588c565b61284c565b6105c96128e7565b6105b6610b0f366004615976565b6128f4565b610572610b223660046157d3565b612a55565b60da546109fe90610100900463ffffffff1681565b6105b6610b4a366004615715565b612e8d565b61057260d75481565b6105725f81565b610593610b6d36600461572c565b612ecc565b610550610b8036600461588c565b613021565b6105b6610b93366004615825565b61303d565b610572610ba6366004615715565b613051565b610572610bb9366004615a1f565b613067565b610572610bcc366004615a1f565b61316c565b6105b6610bdf36600461566a565b613266565b610572610bf2366004615715565b6132ba565b610572610c05366004615715565b6132d9565b610550610c1836600461588c565b60cf60209081525f92835260408084209091529082529020805460019091015482565b610572610c4936600461566a565b6132f0565b610550610c5c36600461588c565b60d060209081525f92835260408084209091529082529020805460019091015482565b6105b6610c8d366004615a53565b613311565b610572610ca0366004615a1f565b6134d6565b6105b6610cb336600461588c565b61372f565b61057260d65481565b610572610ccf36600461566a565b6001600160a01b03165f90815260cc602052604090205490565b610572610cf7366004615abc565b60cd60209081525f928352604080842090915290825290205481565b6105b6610d213660046156c7565b613753565b6105727f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61057260de5481565b6105726137ab565b610572610d6c366004615715565b61388c565b60db546107ce906001600160a01b031681565b60da546109fe90600160481b900463ffffffff1681565b60dc54610872906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610dd190610fe0565b610dda846116b5565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610e55575f81815260d160205260409020600381015480831115610e4957824210610e2f578160020154610e44565b6002820154610e449042839003838603613896565b860195505b50506224ea0001610dfd565b50610e7860e254670de0b6b3a76400000360d454610e716137ab565b03906138b4565b610e806138c8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610ebf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610ecf8161393e565b610ed7613948565b60dd5f828254610ee79190615b10565b90915550610ef590506139c1565b60dc80546fffffffffffffffffffffffffffffffff19166001600160801b0384169081179091556040519081527f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e906020015b60405180910390a15050565b60c98054610f6190615b23565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8d90615b23565b8015610fd85780601f10610faf57610100808354040283529160200191610fd8565b820191905f5260205f20905b815481529060010190602001808311610fbb57829003601f168201915b505050505081565b60cb545f90801561100357610ffe610ff6610de3565b849083613896565b611005565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110669086815260200190565b60405180910390a350600192915050565b60cb545f90801561100357610ffe8161108e610de3565b859190613a27565b60dd5460de545f9190828183106110af5760d8546110b3565b60d9545b60da549091505f906110ee906110d690600160481b900463ffffffff1642615b5b565b6110e09084615b6e565b6110e990615b85565b613a54565b61110090670de0b6b3a7640000615b9f565b905061110c81856138b4565b61112861112183670de0b6b3a7640000615b5b565b85906138b4565b6111329190615b10565b94505050505090565b5f6111458161393e565b8282604051602001611158929190615bbe565b60405160208183030381529060405260c990816111759190615c39565b508282604051602001611189929190615cf5565b60405160208183030381529060405260ca90816111a69190615c39565b50505050565b5f6111b5613bc7565b6111bd613bd6565b845f036111dd5760405163774257f760e01b815260040160405180910390fd5b60da546111f190879060ff1660035f613c01565b5f86815260d1602052604090206112088188613d9b565b60dd5f8282546112189190615b10565b909155505060e3546001600160a01b0316801561128657604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b15801561126f575f80fd5b505af1158015611281573d5f803e3d5ffd5b505050505b5f6112918389613e19565b90508015611324575f8160d3546112a89190615b10565b90506112ba6112b5613e55565b613f65565b60dc546112f5906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b60dd54906001600160801b03166138b4565b60d4546113029083615b10565b111561132057604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061132f611096565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff1661137d8a600101548b5f015489613fa2565b6113878888613fcf565b611394898960d354613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa1580156113ea573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140e9190615d33565b905061143361142c611420428f615b5b565b83906301e13380613896565b8c906138b4565b935050505080886114449190615b10565b93508684111561146757604051632c1b6b4160e21b815260040160405180910390fd5b6114718585614003565b5f89815260d0602090815260408083206001600160a01b0389168452909152812080549091036114c8576001600160a01b0386165f90815260d26020526040902060018101546114c1908c614079565b6001909101555b5f8061150b6114d685614164565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614190565b91509150815f1461152f5781866002015f8282546115299190615b10565b90915550505b611538816141dc565b60405180604001604052808c855f01546115529190615b10565b81526020018585600101546115679190615b10565b90525f8d815260d0602090815260408083206001600160a01b038d811680865291845293829020855181559483015160019095019490945580513381529182018f905281018790529194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139060600160405180910390a46115ee6139c1565b6115f789614208565b604051637b9d893160e01b81523060048201526001600160a01b0386811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b15801561165d575f80fd5b505af115801561166f573d5f803e3d5ffd5b506116a99250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614256565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b811561178a57600182161561176f575f81815260d0602090815260408083206001600160a01b038a16845290915281206001810154815491929161172a9190615b10565b90506117368188615b10565b96508242111561176c5761175f8561174e8542615b5b565b6117589190615b6e565b82906138b4565b6117699088615b10565b96505b50505b60019190911c906117836224ea0082615b10565b90506116e6565b600284015480156117ab5761179e81611dba565b6117a89087615b10565b95505b5050505050919050565b5f6117be613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530866117f8866122af565b6040518463ffffffff1660e01b815260040161181693929190615d4a565b5f6040518083038186803b15801561182c575f80fd5b505afa15801561183e573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561190257604051630149e46f60e01b81526001600160a01b038681166004830152821690630149e46f906024015f604051808303815f87803b158015611895575f80fd5b505af11580156118a7573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b1580156118eb575f80fd5b505af11580156118fd573d5f803e3d5ffd5b505050505b61190d858585614298565b95945050505050565b5f6119208161393e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610f48565b5f61196c8161393e565b6119776112b5613e55565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119ec8161393e565b6119f68383614372565b505050565b5f611a04613bc7565b611a0c613bd6565b835f03611a2c576040516356316e8760e01b815260040160405180910390fd5b60da54611a4090869060ff1660035f613c01565b5f85815260d16020526040812090611a588288613d9b565b90508060dd5f828254611a6b9190615b10565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f918291611ab0918a906143f7565b9092509050611abf8289615b10565b945086851015611ae257604051632c1b6b4160e21b815260040160405180910390fd5b611aec8489614448565b60d35f828254611afc9190615b5b565b90915550611b0c90508183615b10565b846002015f828254611b1e9190615b5b565b925050819055508060d55f828254611b369190615b10565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611b8b576001600160a01b0387165f90815260d2602052604090208054611b88908c614079565b90555b88815f015f828254611b9d9190615b10565b9250508190555082816001015f828254611bb79190615b10565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611c0c6139c1565b611c158a614208565b611c4a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614478565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611c8c57611c876144be565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611cc5575f80fd5b611ccf8282614557565b5050565b5f611cdc613bc7565b60da54611cf190869060ff1660036002613c01565b611cff8585858560016145bd565b9050611d096139c1565b611d3e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611d708161393e565b611d78614919565b50565b5f611d858161393e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610f48565b60df545f90801561100357610ffe611dd06137ab565b849083613a27565b5f611de1613bc7565b6001600160a01b0384163303611e0a576040516344511af160e01b815260040160405180910390fd5b60405163042dcf6b60e31b81523060048201526001600160a01b0383811660248301528581166044830152606482018590527f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890608401602060405180830381865afa158015611e83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea79190615d33565b9250825f03611ec95760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611f0357508515155b15612010576001821615611ff5575f81421015611f3a57611f278288898b5f6145bd565b9050611f338188615b5b565b9650611fe7565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611f6c9190615b10565b9150505f611f9360d6548542611f829190615b5b565b611f8c9190615b6e565b83906138b4565b611f9d9083615b10565b9050888111611fac5788611fb7565b611fb7898383613896565b9250825f03611fc8575f9850611fe4565b611fd584848b8d5f6145bd565b9250611fe1838a615b5b565b98505b50505b611ff18186615b10565b9450505b60019190911c906120096224ea0082615b10565b9050611ef5565b505083158015906120245750600281015415155b15612059575f612033856132ba565b90508015612057575f6120468288614966565b5090506120538185615b10565b9350505b505b604051636e1b003160e01b81523060048201526001600160a01b0384811660248301528681166044830152606482018490525f9182917f00000000000000000000000000000000000000000000000000000000000000001690636e1b0031906084016040805180830381865afa1580156120d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f99190615d6e565b915091508160d55f82825461210e9190615b10565b9091555050306001600160a01b038616036121345761212f30338984614ac0565b612199565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906121649033908b908690600401615d4a565b5f604051808303815f87803b15801561217b575f80fd5b505af115801561218d573d5f803e3d5ffd5b505050506121996139c1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b0388811660048301527f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906024015f604051808303815f87803b15801561224c575f80fd5b505af115801561225e573d5f803e3d5ffd5b505050506122a5333084876122739190615b10565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614478565b5050509392505050565b5f610ebf82610fe0565b5f6122c38161393e565b6122cb614cb9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61231d8361388c565b9050805f0361232a575f80fd5b61235f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614478565b6123698282614ce4565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8382614d57565b60df545f90801561100357610ffe8161108e6137ab565b5f806123da613bc7565b6123e48484614966565b90925090506123f16139c1565b6124266001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614478565b9250929050565b5f6124378161393e565b60e35460ff600160a01b90910416151582151514611ccf5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee6989061249e90851515815260200190565b60405180910390a25050565b6124b2614db6565b6124ba614e32565b565b5f6124c68161393e565b60db546001600160a01b0316156124e2576124e26112b5613e55565b60db80546001600160a01b0319166001600160a01b0384161790556125056139c1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146125af576040516317568c8f60e21b815260040160405180910390fd5b6125b7613948565b60dd5f8282546125c79190615b10565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b81156127a3576001821615612788575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916126439190615b10565b90508086106127855760e3546001600160a01b031680156126b557604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b15801561269e575f80fd5b505af11580156126b0573d5f803e3d5ffd5b505050505b6126bf8288615b5b565b96506126cb8287615b10565b83545f86815260d1602052604090209197506126e79190614e6f565b60d35f8282546126f79190615b5b565b90915550505f84815260d0602090815260408083206001600160a01b038d16845290915281208181556001908101919091558801546127369085614e92565b600189015560408051838152602081018490526001600160a01b038b1691339187917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a4505b50505b60019190911c9061279c6224ea0082615b10565b90506125ff565b6002850154158015906127c057506127ba846132ba565b93508315155b156127e1575f6127d08588614966565b5090506127dd8185615b10565b9350505b821561283c578260d55f8282546127f89190615b5b565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b6128446139c1565b505050505050565b5f61285683613051565b905061288d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b6128978284614ce4565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8184614d57565b60ca8054610f6190615b23565b5f54610100900460ff161580801561291257505f54600160ff909116105b8061292b5750303b15801561292b57505f5460ff166001145b612933575f80fd5b5f805460ff191660011790558015612954575f805461ff0019166101001790555b61295c614f52565b612964614f64565b60da805468ffffffffffffffff0019166101004263ffffffff1690810268ffffffff0000000000191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129b95f33614372565b6129c38b8b61113b565b6129cc89611916565b6129d588610ec5565b6129de876124bc565b6129e786612e8d565b6129f085611d7b565b6129f984613753565b612a0383836122b9565b8015612a48575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a5e613bc7565b845f03612a7e5760405163b8cb621960e01b815260040160405180910390fd5b60da54612a9390879060ff1660036002613c01565b5f86815260d160205260409020612aaa8188613d9b565b60dd5f828254612aba9190615b10565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612b049190615b10565b871115612b1f5760208101518151612b1c9190615b10565b96505b6040805180820190915281518152602080830151908201525f90612b4f90612b47908a614f7e565b518490614fc4565b60d354612b5c9190615b10565b905060dd5460d45482612b6f9190615b10565b1115612b8d57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612cba575f612ba1611096565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bf58a600101548b5f01548a613fa2565b612bff8989613fcf565b612c0a8a8a8a613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa158015612c60573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c849190615d33565b9050612caf612c96611420428f615b5b565b612ca890670de0b6b3a7640000615b10565b8c90615008565b965050505050612cbe565b8692505b85831015612cdf57604051632c1b6b4160e21b815260040160405180910390fd5b612ce98484614003565b5f80612d35612d00612cfb878c615b5b565b614164565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614190565b9150915081846002015f828254612d4c9190615b10565b90915550612d5b9050816141dc565b612d65838a61501c565b5060208301518351175f03612db8575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612db1908c614e92565b9055612de8565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b60408051338152602081018b90529081018690526001600160a01b0380881691908916908c907fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c9060600160405180910390a4612e436139c1565b612e4c8a614208565b612e806001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614256565b5050505095945050505050565b5f612e978161393e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610f48565b5f612ed5613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612f0f866122af565b6040518463ffffffff1660e01b8152600401612f2d93929190615d4a565b5f6040518083038186803b158015612f43575f80fd5b505afa158015612f55573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561301757604051630149e46f60e01b81523360048201526001600160a01b03821690630149e46f906024015f604051808303815f87803b158015612faa575f80fd5b505af1158015612fbc573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b158015613000575f80fd5b505af1158015613012573d5f803e3d5ffd5b505050505b611d3e848461507a565b5f8061302b613bc7565b6123e4613037856132ba565b84614966565b613045613bc7565b6119f633848484614ac0565b60cb545f90801561100357610ffe611dd0610de3565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db5906130b990309086908990600401615d4a565b5f6040518083038186803b1580156130cf575f80fd5b505afa1580156130e1573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561314f57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613138575f80fd5b505af115801561314a573d5f803e3d5ffd5b505050505b61315a8585856150dd565b91506131646139c1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530846131a7886122af565b6040518463ffffffff1660e01b81526004016131c593929190615d4a565b5f6040518083038186803b1580156131db575f80fd5b505afa1580156131ed573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561325b57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613244575f80fd5b505af1158015613256573d5f803e3d5ffd5b505050505b61315a8585856151e7565b5f6132708161393e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f90801561100357610ffe816132d16137ab565b859190613896565b60cb545f90801561100357610ffe816132d1610de3565b6001600160a01b0381165f90815260cc6020526040812054610ebf90610fe0565b4284101561331d575f80fd5b5f6001613328611c57565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613430573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134665750876001600160a01b0316816001600160a01b0316145b61346e575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134df613bc7565b6134e7613bd6565b6134f18285614003565b60e3546001600160a01b0316801561355a57604051636c912dad60e01b81526001600160a01b038481166004830152821690636c912dad906024015f604051808303815f87803b158015613543575f80fd5b505af1158015613555573d5f803e3d5ffd5b505050505b6135656112b5613e55565b61356e856123b9565b91505f8560d45461357f9190615b10565b60d481905560dc549091506135b0906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b8160d3546135be9190615b10565b11156135dc57604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135ed9190615b10565b90915550506001600160a01b0384165f90815260d260205260408120600201805485929061361c908490615b10565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136746139c1565b604051637b9d893160e01b81523060048201526001600160a01b0385811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b1580156136da575f80fd5b505af11580156136ec573d5f803e3d5ffd5b506137269250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614256565b50509392505050565b5f828152606560205260409020600101546137498161393e565b6119f68383614557565b5f61375d8161393e565b60dc80546001600160801b03908116600160801b918516918202179091556040519081527fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90602001610f48565b60d45460dd5460da545f929190839061387890613871906137d990600160281b900463ffffffff1642615b5b565b60db546301e13380906001600160a01b0316637c21fb1d6137fa888a613fcf565b613807898b60d354613fe7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613846573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061386a9190615d33565b9190613896565b84906138b4565b90506138848184615b10565b935050505090565b5f610ebf826132d9565b8282028115158415858304851417166138ad575f80fd5b0492915050565b5f6110058383670de0b6b3a7640000613896565b60da545f9081906138e490610100900463ffffffff1642615b5b565b9050805f036138f4575f91505090565b60da5461393890829061392490613912906224ea009060ff16615b6e565b60dc546001600160801b0316906138b4565b61392e9084615b10565b60d5549190613896565b91505090565b611d7881336152fc565b5f6139516138c8565b90508060d55f8282546139649190615b5b565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a3e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a6d57505f919050565b680755bf798b4a1bf1e58212613a81575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156124ba575f80fd5b60e354600160a01b900460ff16156124ba5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613c0f6224ea0086615d90565b15613c1c57506001613c6f565b428511613c2b57506002613c6f565b613c3b60ff85166224ea00615b6e565b613c486224ea0042615d90565b613c529042615b5b565b613c5c9190615b10565b851115613c6b57506004613c6f565b5060035b826004811115613c8157613c81615da3565b816004811115613c9357613c93615da3565b14158015613cc35750816004811115613cae57613cae615da3565b816004811115613cc057613cc0615da3565b14155b15613d94575f826004811115613cdb57613cdb615da3565b03613d2f57806004811115613cf257613cf2615da3565b836004811115613d0457613d04615da3565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d4157613d41615da3565b836004811115613d5357613d53615da3565b836004811115613d6557613d65615da3565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d26565b5050505050565b60038201545f9042831115613def5760028401544260038601819055613dd890613dc6908490615b5b565b613dd08487615b5b565b839190613896565b9250613de48382615b5b565b600286015550613e12565b828103613dfe575f9150613e12565b600384018390556002840180545f90915591505b5092915050565b81545f9081613e288483615b10565b9050613e41613e3b838760010154615342565b82615357565b613e4b9082615b5b565b9455509192915050565b60d45460dd545f919082613e698284613fcf565b60da549091505f90613ebb9061112190613e9090600160281b900463ffffffff1642615b5b565b60db5460d3546301e13380916001600160a01b031690637c21fb1d908890613807908b908d90613fe7565b9050613ec78185615b10565b9350613ede60e254826138b490919063ffffffff16565b945084613eeb8285615b10565b613ef59190615b5b565b60dd5560d484905560da805468ffffffff00000000001916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611d785760e154613f89906001600160a01b0316613f848361388c565b614ce4565b8060dd5f828254613f9a9190615b10565b909155505050565b5f8115801590613fb157508383115b613fbb575f611d3e565b611d3e82613fc98686615b5b565b90615365565b5f825f03613fdd575f611005565b6110058284615365565b5f835f03613ff5575f611d3e565b611d3e84613fc98486615b10565b336001600160a01b03831614611ccf576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146119f65761404782611077565b6140519082615b5b565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f0361408f57506401000000008117610ebf565b63ffffffff83168083101561410d575f6224ea006140ad8584615b5b565b6140b79190615db7565b90506140c581610100615b5b565b85901c156140e65760405163293cc41f60e21b815260040160405180910390fd5b6140f1816020615b10565b602086901c901b94508484176401000000001792505050610ebf565b5f6224ea0061411c8386615b5b565b6141269190615db7565b905060df81111561414a5760405163293cc41f60e21b815260040160405180910390fd5b614155816020615b10565b6001901b851792505050610ebf565b5f8061417b60e254846138b490919063ffffffff16565b905061418681613f65565b6110058184615b5b565b5f8082156141c4576141bf6141ad6141a787615379565b85615357565b6141b79085615b5b565b859085613896565b6141c6565b5f5b90506141d28185615b5b565b9150935093915050565b805f036141e65750565b60e254156141f757611d7881613f65565b8060d55f828254613f9a9190615b10565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806111a6575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142f1576142cd8382615b5b565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614318908490615b5b565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615ed28339815191529061435f9087815260200190565b60405180910390a3506001949350505050565b61437c828261253c565b611ccf575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143b33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f61440386615379565b9050801561443f576144246144188683615357565b60408801519083613896565b925061443083856138b4565b915061443c8284615b5b565b92505b50935093915050565b815460018301545f919061445c8482615b10565b600186015561190d61446e8383615357565b6141a79084615b5b565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d94575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144ef9190615dca565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614561828261253c565b15611ccf575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145de5760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906145f68289613d9b565b90508060dd5f8282546146099190615b10565b90915550505f88815260d0602090815260408083206001600160a01b038916845282528083208151808301909252805480835260019091015492820183905290929161465f918b9161465a91615b10565b615357565b6040805180820190915283518152602080850151908201529091505f906146869083614f7e565b5160e3549091506001600160a01b031680156146f357604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b1580156146dc575f80fd5b505af11580156146ee573d5f803e3d5ffd5b505050505b8b42101561479b5787156147935760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147419186906143f7565b90925090506147508183615b10565b886002015f8282546147629190615b5b565b925050819055508060d55f82825461477a9190615b10565b9091555061478a90508286615b5b565b985050506147e2565b8296506147e2565b60d6546147b6906147ac8e42615b5b565b6138719190615b6e565b6147c09084615b10565b96506147cc8388615b5b565b60d55f8282546147dc9190615b10565b90915550505b8987111561480357604051632c1b6b4160e21b815260040160405180910390fd5b61480d8683614e6f565b60d35f82825461481d9190615b5b565b9091555061482d9050848461501c565b5060208401518451175f03614889575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d29092529091209081015461487e908e614e92565b6001909101556148b9565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a461490a8c614208565b50505050505095945050505050565b614921615397565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001613a1d565b60e3545f9081906001600160a01b031680156149d357604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b1580156149bc575f80fd5b505af11580156149ce573d5f803e3d5ffd5b505050505b6149de6112b5613e55565b6001600160a01b0384165f90815260d2602052604090206002810154614a048782615357565b9350614a0f84611dba565b9450845f03614a315760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a429190615b5b565b90915550614a5290508482615b5b565b82600201819055508360df5f828254614a6b9190615b5b565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614ae05760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b0385811660048301523060248301527f0000000000000000000000000000000000000000000000000000000000000000169063e16ee720906044015f6040518083038186803b158015614b45575f80fd5b505afa158015614b57573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bc557604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614bae575f80fd5b505af1158015614bc0573d5f803e3d5ffd5b505050505b5f614bcf83611077565b9050614bdb83826153a5565b614be5848261541e565b60408051848152602081018390526001600160a01b03808716929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c7591815260200190565b60405180910390a3614c856139c1565b6128446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614256565b614cc1611096565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d4d57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614d36575f80fd5b505af1158015614d48573d5f803e3d5ffd5b505050505b6119f68383615485565b614d5f613bc7565b614d67613bd6565b614d6f614cb9565b5f614d78613e55565b90505f614d83613948565b9050614d8f8482615b10565b60dd5f828254614d9f9190615b10565b90915550614dae905082613f65565b6111a66139c1565b614de07f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361253c565b158015614e145750614e127f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361253c565b155b156124ba57604051631d006fdb60e31b815260040160405180910390fd5b614e3a613bc7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861494e3390565b815460018301545f9190614e838483615b5b565b855561190d61446e8383615357565b5f821580614ea65750816401000000001783145b15614eb257505f610ebf565b63ffffffff8316808303614f2057602184901c60015b60018216158015614ed857508115155b15614ee957600191821c9101614ec8565b6020614ef58282615b10565b9690961c90951b9485614f0b6224ea0083615b6e565b614f159087615b10565b179350505050610ebf565b6224ea00614f2e8285615b5b565b614f389190615db7565b614f43906020615b10565b6001901b198416915050610ebf565b5f54610100900460ff166124ba575f80fd5b5f54610100900460ff16614f76575f80fd5b6124ba6154d4565b604080518082019091525f8082526020820152825160208401515f91614fa8916132d19082615b10565b8085529050614fb78184615b5b565b6020850152509192915050565b815460018301545f919082614fd98583615b5b565b9050614fe58184615357565b614fef8385615357565b614ff99190615b5b565b60019096015550929392505050565b5f61100583670de0b6b3a764000084613896565b604080518082019091525f8082526020820152602083015183515f9161504191615b10565b90505f61504e8483615b5b565b855190915061505f90829084613896565b80865261506c9082615b5b565b602086015250929392505050565b335f90815260cc602052604081208054839190839061509a908490615b5b565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615ed2833981519152906110669086815260200190565b5f6150e784611077565b9050336001600160a01b03831614615154576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151525761512e8282615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61515e84826153a5565b615168828261541e565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614256565b5f336001600160a01b03831614615253576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146152515761522d8582615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61525c846122af565b9050805f03615269575f80fd5b61527381856153a5565b61527d828561541e565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614256565b615306828261253c565b611ccf57615313816154f2565b61531e836020615504565b60405160200161532f929190615e53565b6040516020818303038152906040525f80fd5b5f8183116153505781611005565b5090919050565b5f8183106153505781611005565b5f61100583670de0b6b3a764000084613a27565b805160208201515f919061538d8282615357565b611d3e9083615b5b565b60975460ff166124ba575f80fd5b6153ad613bc7565b6153b5614cb9565b6153c06112b5613e55565b5f6153c9613948565b90505f838260dd546153db9190615b10565b6153e59190615b5b565b90508060d45460d3546153f89190615b10565b111561541657604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc602052604081208054839290615445908490615b5b565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615ed2833981519152906020015b60405180910390a35050565b8060cb5f8282546154969190615b10565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615ed28339815191529101615479565b5f54610100900460ff166154e6575f80fd5b6097805460ff19169055565b6060610ebf6001600160a01b03831660145b60605f615512836002615b6e565b61551d906002615b10565b67ffffffffffffffff81111561553557615535615be1565b6040519080825280601f01601f19166020018201604052801561555f576020820181803683370190505b509050600360fc1b815f8151811061557957615579615ea8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106155a7576155a7615ea8565b60200101906001600160f81b03191690815f1a9053505f6155c9846002615b6e565b6155d4906001615b10565b90505b600181111561564b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061560857615608615ea8565b1a60f81b82828151811061561e5761561e615ea8565b60200101906001600160f81b03191690815f1a90535060049490941c9361564481615ebc565b90506155d7565b508315611005575f80fd5b6001600160a01b0381168114611d78575f80fd5b5f6020828403121561567a575f80fd5b813561100581615656565b5f60208284031215615695575f80fd5b81356001600160e01b031981168114611005575f80fd5b80356001600160801b03811681146156c2575f80fd5b919050565b5f602082840312156156d7575f80fd5b611005826156ac565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615725575f80fd5b5035919050565b5f806040838503121561573d575f80fd5b823561574881615656565b946020939093013593505050565b5f8083601f840112615766575f80fd5b50813567ffffffffffffffff81111561577d575f80fd5b602083019150836020828501011115612426575f80fd5b5f80602083850312156157a5575f80fd5b823567ffffffffffffffff8111156157bb575f80fd5b6157c785828601615756565b90969095509350505050565b5f805f805f60a086880312156157e7575f80fd5b853594506020860135935060408601359250606086013561580781615656565b9150608086013561581781615656565b809150509295509295909350565b5f805f60608486031215615837575f80fd5b833561584281615656565b9250602084013561585281615656565b929592945050506040919091013590565b803560ff811681146156c2575f80fd5b5f60208284031215615883575f80fd5b61100582615863565b5f806040838503121561589d575f80fd5b8235915060208301356158af81615656565b809150509250929050565b5f805f80608085870312156158cd575f80fd5b84359350602085013592506040850135915060608501356158ed81615656565b939692955090935050565b5f805f6060848603121561590a575f80fd5b833561591581615656565b925060208401359150604084013561592c81615656565b809150509250925092565b5f8060408385031215615948575f80fd5b50508035926020909101359150565b5f60208284031215615967575f80fd5b81358015158114611005575f80fd5b5f805f805f805f805f806101208b8d031215615990575f80fd5b8a3567ffffffffffffffff8111156159a6575f80fd5b6159b28d828e01615756565b909b5099506159c5905060208c01615863565b97506159d360408c016156ac565b965060608b01356159e381615656565b955060808b0135945060a08b013593506159ff60c08c016156ac565b925060e08b013591506101008b013590509295989b9194979a5092959850565b5f805f60608486031215615a31575f80fd5b833592506020840135615a4381615656565b9150604084013561592c81615656565b5f805f805f805f60e0888a031215615a69575f80fd5b8735615a7481615656565b96506020880135615a8481615656565b95506040880135945060608801359350615aa060808901615863565b925060a0880135915060c0880135905092959891949750929550565b5f8060408385031215615acd575f80fd5b8235615ad881615656565b915060208301356158af81615656565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ebf57610ebf615afc565b600181811c90821680615b3757607f821691505b602082108103615b5557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610ebf57610ebf615afc565b8082028115828204841417610ebf57610ebf615afc565b5f600160ff1b8201615b9957615b99615afc565b505f0390565b8181035f831280158383131683831282161715613e1257613e12615afc565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156119f657805f5260205f20601f840160051c81016020851015615c1a5750805b601f840160051c820191505b81811015613d94575f8155600101615c26565b815167ffffffffffffffff811115615c5357615c53615be1565b615c6781615c618454615b23565b84615bf5565b602080601f831160018114615c9a575f8415615c835750858301515b5f19600386901b1c1916600185901b178555612844565b5f85815260208120601f198616915b82811015615cc857888601518255948401946001909101908401615ca9565b5085821015615ce557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b03828116828216039080821115613e1257613e12615afc565b5f60208284031215615d43575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215615d7f575f80fd5b505080516020909101519092909150565b5f82615d9e57615d9e615ae8565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615dc557615dc5615ae8565b500490565b5f808354615dd781615b23565b60018281168015615def5760018114615e0457615e30565b60ff1984168752821515830287019450615e30565b875f526020805f205f5b85811015615e275781548a820152908401908201615e0e565b50505082870194505b50929695505050505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f615e846017830185615e3c565b7001034b99036b4b9b9b4b733903937b6329607d1b815261190d6011820185615e3c565b634e487b7160e01b5f52603260045260245ffd5b5f81615eca57615eca615afc565b505f19019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204485d3d9d92eeb57ec453d55009460985e73455784e22d97a9959ce3f189d91364736f6c63430008190033", - "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610539575f3560e01c80636e76fc8f116102bf578063b2a02ff111610186578063d5164184116100ef578063e63ab1e9116100a9578063ef8b30f711610084578063ef8b30f714610d5e578063f3fdb15a14610d71578063fb0fc4c314610d84578063fea45d9414610d9b575f80fd5b8063e63ab1e914610d26578063e94b3c2114610d4d578063eee8c9e014610d56575f80fd5b8063d516418414610c92578063d547741f14610ca5578063d6b7494f14610cb8578063d905777e14610cc1578063dd62ed3e14610ce9578063e00b262514610d13575f80fd5b8063c63d75b611610140578063c63d75b614610831578063c6e6f59214610bf7578063ccfd8b1114610c0a578063ce96cb7714610c3b578063d2681a0b14610c4e578063d505accf14610c7f575f80fd5b8063b2a02ff114610b85578063b3d7f6b914610b98578063b460af9414610bab578063ba08765214610bbe578063bee36bb314610bd1578063bf722ca214610be4575f80fd5b806391d1485411610228578063a16a8850116101e2578063a16a885014610b27578063a1bab44714610b3c578063a1e8f02b14610b4f578063a217fddf14610b58578063a9059cbb14610b5f578063acb7081514610b72575f80fd5b806391d1485414610ac0578063926bb63314610ad357806394bf804d14610ae657806395d89b4114610af957806397bce8d014610b01578063a05a091a14610b14575f80fd5b80637ecebe00116102795780637ecebe0014610a6b5780638456cb5914610a8a5780638a1baa4614610a925780638bcd401614610a9b5780638c3cba5a14610aae5780638d0e5f0214610ab7575f80fd5b80636e76fc8f146109c05780636eb9ffeb146109e757806370a0823114610a1357806378007e2314610a325780637ad226dc14610a455780637e932d3214610a58575f80fd5b8063313ce567116104035780634322b7141161036c5780635cc2ef83116103265780635cc2ef83146109225780635e5c06e21461093557806361d027b31461097e57806366601032146109915780636bb65f531461099a5780636e553f65146109ad575f80fd5b80634322b7141461085857806347dffde01461088a5780634914c0081461089d5780634cdad506146108b05780634e7c5059146108c35780635c975abb14610917575f80fd5b80633aa18d6f116103bd5780633aa18d6f146107e65780633c6f317f146107ef5780633ec045a6146108025780633f4ba83a14610829578063402d267d1461083157806342da42bf14610845575f80fd5b8063313ce5671461073e57806333eeb1471461076557806334f7d1f2146107795780633644e5151461078c57806336568abe1461079457806338d52e0f146107a7575f80fd5b806313700101116104a5578063248a9ca31161045f578063248a9ca3146106bb57806325fc07a9146106dd57806328acf2cf146106fc5780632c5dcc771461070f5780632e0af008146107225780632f2ff15d1461072b575f80fd5b8063137001011461065d57806318160ddd146106705780631a5b9e62146106795780631a90f1861461068c5780631d43b30b1461069557806323b872dd146106a8575f80fd5b806307a2d13a116104f657806307a2d13a146105d6578063095ea7b3146105e95780630a28a477146105fc5780630ab69be81461060f5780630e52dbec146106365780630f2b75aa14610655575f80fd5b8063014a296f1461053d57806301e1d1141461056a57806301ffc9a714610580578063022d8af5146105a35780630539fa8c146105b857806306fdde03146105c1575b5f80fd5b61055061054b36600461566a565b610dae565b604080519283526020830191909152015b60405180910390f35b610572610de3565b604051908152602001610561565b61059361058e366004615685565b610e8f565b6040519015158152602001610561565b6105b66105b13660046156c7565b610ec5565b005b61057260d85481565b6105c9610f54565b60405161056191906156e0565b6105726105e4366004615715565b610fe0565b6105936105f736600461572c565b61100c565b61057261060a366004615715565b611077565b61055061061d366004615715565b5f90815260d16020526040902080546001909101549091565b60da546106439060ff1681565b60405160ff9091168152602001610561565b610572611096565b6105b661066b366004615794565b61113b565b61057260cb5481565b6105726106873660046157d3565b6111ac565b61057260d45481565b6105726106a336600461566a565b6116b5565b6105936106b6366004615825565b6117b5565b6105726106c9366004615715565b5f9081526065602052604090206001015490565b6105726106eb366004615715565b5f90815260d1602052604090205490565b6105b661070a366004615873565b611916565b6105b661071d36600461572c565b611962565b61057260dd5481565b6105b661073936600461588c565b6119d2565b6106437f000000000000000000000000000000000000000000000000000000000000000081565b60e35461059390600160a01b900460ff1681565b6105726107873660046158ba565b6119fb565b610572611c57565b6105b66107a236600461588c565b611cb1565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610561565b61057260d95481565b6105726107fd3660046158ba565b611cd3565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6105b6611d46565b61057261083f36600461566a565b505f1990565b6105b6610853366004615715565b611d7b565b60dc5461087290600160801b90046001600160801b031681565b6040516001600160801b039091168152602001610561565b610572610898366004615715565b611dba565b6105726108ab3660046158f8565b611dd8565b6105726108be366004615715565b6122af565b6108f76108d1366004615715565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610561565b60975460ff16610593565b6105b6610930366004615937565b6122b9565b61096361094336600461566a565b60d26020525f908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610561565b60e1546107ce906001600160a01b031681565b61057260e25481565b60e3546107ce906001600160a01b031681565b6105726109bb36600461588c565b612313565b6105727f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da546109fe90600160281b900463ffffffff1681565b60405163ffffffff9091168152602001610561565b610572610a2136600461566a565b60cc6020525f908152604090205481565b610572610a40366004615715565b6123b9565b610550610a5336600461588c565b6123d0565b6105b6610a66366004615957565b61242d565b610572610a7936600461566a565b60ce6020525f908152604090205481565b6105b66124aa565b61057260d55481565b6105b6610aa936600461566a565b6124bc565b61057260d35481565b61057260df5481565b610593610ace36600461588c565b61253c565b6105b6610ae136600461566a565b612566565b610572610af436600461588c565b61284c565b6105c96128e7565b6105b6610b0f366004615976565b6128f4565b610572610b223660046157d3565b612a55565b60da546109fe90610100900463ffffffff1681565b6105b6610b4a366004615715565b612e8d565b61057260d75481565b6105725f81565b610593610b6d36600461572c565b612ecc565b610550610b8036600461588c565b613021565b6105b6610b93366004615825565b61303d565b610572610ba6366004615715565b613051565b610572610bb9366004615a1f565b613067565b610572610bcc366004615a1f565b61316c565b6105b6610bdf36600461566a565b613266565b610572610bf2366004615715565b6132ba565b610572610c05366004615715565b6132d9565b610550610c1836600461588c565b60cf60209081525f92835260408084209091529082529020805460019091015482565b610572610c4936600461566a565b6132f0565b610550610c5c36600461588c565b60d060209081525f92835260408084209091529082529020805460019091015482565b6105b6610c8d366004615a53565b613311565b610572610ca0366004615a1f565b6134d6565b6105b6610cb336600461588c565b61372f565b61057260d65481565b610572610ccf36600461566a565b6001600160a01b03165f90815260cc602052604090205490565b610572610cf7366004615abc565b60cd60209081525f928352604080842090915290825290205481565b6105b6610d213660046156c7565b613753565b6105727f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61057260de5481565b6105726137ab565b610572610d6c366004615715565b61388c565b60db546107ce906001600160a01b031681565b60da546109fe90600160481b900463ffffffff1681565b60dc54610872906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610dd190610fe0565b610dda846116b5565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610e55575f81815260d160205260409020600381015480831115610e4957824210610e2f578160020154610e44565b6002820154610e449042839003838603613896565b860195505b50506224ea0001610dfd565b50610e7860e254670de0b6b3a76400000360d454610e716137ab565b03906138b4565b610e806138c8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610ebf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610ecf8161393e565b610ed7613948565b60dd5f828254610ee79190615b10565b90915550610ef590506139c1565b60dc80546fffffffffffffffffffffffffffffffff19166001600160801b0384169081179091556040519081527f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e906020015b60405180910390a15050565b60c98054610f6190615b23565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8d90615b23565b8015610fd85780601f10610faf57610100808354040283529160200191610fd8565b820191905f5260205f20905b815481529060010190602001808311610fbb57829003601f168201915b505050505081565b60cb545f90801561100357610ffe610ff6610de3565b849083613896565b611005565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110669086815260200190565b60405180910390a350600192915050565b60cb545f90801561100357610ffe8161108e610de3565b859190613a27565b60dd5460de545f9190828183106110af5760d8546110b3565b60d9545b60da549091505f906110ee906110d690600160481b900463ffffffff1642615b5b565b6110e09084615b6e565b6110e990615b85565b613a54565b61110090670de0b6b3a7640000615b9f565b905061110c81856138b4565b61112861112183670de0b6b3a7640000615b5b565b85906138b4565b6111329190615b10565b94505050505090565b5f6111458161393e565b8282604051602001611158929190615bbe565b60405160208183030381529060405260c990816111759190615c39565b508282604051602001611189929190615cf5565b60405160208183030381529060405260ca90816111a69190615c39565b50505050565b5f6111b5613bc7565b6111bd613bd6565b845f036111dd5760405163774257f760e01b815260040160405180910390fd5b60da546111f190879060ff1660035f613c01565b5f86815260d1602052604090206112088188613d9b565b60dd5f8282546112189190615b10565b909155505060e3546001600160a01b0316801561128657604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b15801561126f575f80fd5b505af1158015611281573d5f803e3d5ffd5b505050505b5f6112918389613e19565b90508015611324575f8160d3546112a89190615b10565b90506112ba6112b5613e55565b613f65565b60dc546112f5906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b60dd54906001600160801b03166138b4565b60d4546113029083615b10565b111561132057604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061132f611096565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff1661137d8a600101548b5f015489613fa2565b6113878888613fcf565b611394898960d354613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa1580156113ea573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140e9190615d33565b905061143361142c611420428f615b5b565b83906301e13380613896565b8c906138b4565b935050505080886114449190615b10565b93508684111561146757604051632c1b6b4160e21b815260040160405180910390fd5b6114718585614003565b5f89815260d0602090815260408083206001600160a01b0389168452909152812080549091036114c8576001600160a01b0386165f90815260d26020526040902060018101546114c1908c614079565b6001909101555b5f8061150b6114d685614164565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614190565b91509150815f1461152f5781866002015f8282546115299190615b10565b90915550505b611538816141dc565b60405180604001604052808c855f01546115529190615b10565b81526020018585600101546115679190615b10565b90525f8d815260d0602090815260408083206001600160a01b038d811680865291845293829020855181559483015160019095019490945580513381529182018f905281018790529194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139060600160405180910390a46115ee6139c1565b6115f789614208565b604051637b9d893160e01b81523060048201526001600160a01b0386811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b15801561165d575f80fd5b505af115801561166f573d5f803e3d5ffd5b506116a99250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614256565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b811561178a57600182161561176f575f81815260d0602090815260408083206001600160a01b038a16845290915281206001810154815491929161172a9190615b10565b90506117368188615b10565b96508242111561176c5761175f8561174e8542615b5b565b6117589190615b6e565b82906138b4565b6117699088615b10565b96505b50505b60019190911c906117836224ea0082615b10565b90506116e6565b600284015480156117ab5761179e81611dba565b6117a89087615b10565b95505b5050505050919050565b5f6117be613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530866117f8866122af565b6040518463ffffffff1660e01b815260040161181693929190615d4a565b5f6040518083038186803b15801561182c575f80fd5b505afa15801561183e573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561190257604051630149e46f60e01b81526001600160a01b038681166004830152821690630149e46f906024015f604051808303815f87803b158015611895575f80fd5b505af11580156118a7573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b1580156118eb575f80fd5b505af11580156118fd573d5f803e3d5ffd5b505050505b61190d858585614298565b95945050505050565b5f6119208161393e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610f48565b5f61196c8161393e565b6119776112b5613e55565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119ec8161393e565b6119f68383614372565b505050565b5f611a04613bc7565b611a0c613bd6565b835f03611a2c576040516356316e8760e01b815260040160405180910390fd5b60da54611a4090869060ff1660035f613c01565b5f85815260d16020526040812090611a588288613d9b565b90508060dd5f828254611a6b9190615b10565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f918291611ab0918a906143f7565b9092509050611abf8289615b10565b945086851015611ae257604051632c1b6b4160e21b815260040160405180910390fd5b611aec8489614448565b60d35f828254611afc9190615b5b565b90915550611b0c90508183615b10565b846002015f828254611b1e9190615b5b565b925050819055508060d55f828254611b369190615b10565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611b8b576001600160a01b0387165f90815260d2602052604090208054611b88908c614079565b90555b88815f015f828254611b9d9190615b10565b9250508190555082816001015f828254611bb79190615b10565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611c0c6139c1565b611c158a614208565b611c4a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614478565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611c8c57611c876144be565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611cc5575f80fd5b611ccf8282614557565b5050565b5f611cdc613bc7565b60da54611cf190869060ff1660036002613c01565b611cff8585858560016145bd565b9050611d096139c1565b611d3e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611d708161393e565b611d78614919565b50565b5f611d858161393e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610f48565b60df545f90801561100357610ffe611dd06137ab565b849083613a27565b5f611de1613bc7565b6001600160a01b0384163303611e0a576040516344511af160e01b815260040160405180910390fd5b60405163042dcf6b60e31b81523060048201526001600160a01b0383811660248301528581166044830152606482018590527f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890608401602060405180830381865afa158015611e83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea79190615d33565b9250825f03611ec95760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611f0357508515155b15612010576001821615611ff5575f81421015611f3a57611f278288898b5f6145bd565b9050611f338188615b5b565b9650611fe7565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611f6c9190615b10565b9150505f611f9360d6548542611f829190615b5b565b611f8c9190615b6e565b83906138b4565b611f9d9083615b10565b9050888111611fac5788611fb7565b611fb7898383613896565b9250825f03611fc8575f9850611fe4565b611fd584848b8d5f6145bd565b9250611fe1838a615b5b565b98505b50505b611ff18186615b10565b9450505b60019190911c906120096224ea0082615b10565b9050611ef5565b505083158015906120245750600281015415155b15612059575f612033856132ba565b90508015612057575f6120468288614966565b5090506120538185615b10565b9350505b505b604051636e1b003160e01b81523060048201526001600160a01b0384811660248301528681166044830152606482018490525f9182917f00000000000000000000000000000000000000000000000000000000000000001690636e1b0031906084016040805180830381865afa1580156120d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f99190615d6e565b915091508160d55f82825461210e9190615b10565b9091555050306001600160a01b038616036121345761212f30338984614ac0565b612199565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906121649033908b908690600401615d4a565b5f604051808303815f87803b15801561217b575f80fd5b505af115801561218d573d5f803e3d5ffd5b505050506121996139c1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b0388811660048301527f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906024015f604051808303815f87803b15801561224c575f80fd5b505af115801561225e573d5f803e3d5ffd5b505050506122a5333084876122739190615b10565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614478565b5050509392505050565b5f610ebf82610fe0565b5f6122c38161393e565b6122cb614cb9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61231d8361388c565b9050805f0361232a575f80fd5b61235f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614478565b6123698282614ce4565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8382614d57565b60df545f90801561100357610ffe8161108e6137ab565b5f806123da613bc7565b6123e48484614966565b90925090506123f16139c1565b6124266001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614478565b9250929050565b5f6124378161393e565b60e35460ff600160a01b90910416151582151514611ccf5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee6989061249e90851515815260200190565b60405180910390a25050565b6124b2614db6565b6124ba614e32565b565b5f6124c68161393e565b60db546001600160a01b0316156124e2576124e26112b5613e55565b60db80546001600160a01b0319166001600160a01b0384161790556125056139c1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146125af576040516317568c8f60e21b815260040160405180910390fd5b6125b7613948565b60dd5f8282546125c79190615b10565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b81156127a3576001821615612788575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916126439190615b10565b90508086106127855760e3546001600160a01b031680156126b557604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b15801561269e575f80fd5b505af11580156126b0573d5f803e3d5ffd5b505050505b6126bf8288615b5b565b96506126cb8287615b10565b83545f86815260d1602052604090209197506126e79190614e6f565b60d35f8282546126f79190615b5b565b90915550505f84815260d0602090815260408083206001600160a01b038d16845290915281208181556001908101919091558801546127369085614e92565b600189015560408051838152602081018490526001600160a01b038b1691339187917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a4505b50505b60019190911c9061279c6224ea0082615b10565b90506125ff565b6002850154158015906127c057506127ba846132ba565b93508315155b156127e1575f6127d08588614966565b5090506127dd8185615b10565b9350505b821561283c578260d55f8282546127f89190615b5b565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b6128446139c1565b505050505050565b5f61285683613051565b905061288d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b6128978284614ce4565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8184614d57565b60ca8054610f6190615b23565b5f54610100900460ff161580801561291257505f54600160ff909116105b8061292b5750303b15801561292b57505f5460ff166001145b612933575f80fd5b5f805460ff191660011790558015612954575f805461ff0019166101001790555b61295c614f52565b612964614f64565b60da805468ffffffffffffffff0019166101004263ffffffff1690810268ffffffff0000000000191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129b95f33614372565b6129c38b8b61113b565b6129cc89611916565b6129d588610ec5565b6129de876124bc565b6129e786612e8d565b6129f085611d7b565b6129f984613753565b612a0383836122b9565b8015612a48575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a5e613bc7565b845f03612a7e5760405163b8cb621960e01b815260040160405180910390fd5b60da54612a9390879060ff1660036002613c01565b5f86815260d160205260409020612aaa8188613d9b565b60dd5f828254612aba9190615b10565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612b049190615b10565b871115612b1f5760208101518151612b1c9190615b10565b96505b6040805180820190915281518152602080830151908201525f90612b4f90612b47908a614f7e565b518490614fc4565b60d354612b5c9190615b10565b905060dd5460d45482612b6f9190615b10565b1115612b8d57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612cba575f612ba1611096565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bf58a600101548b5f01548a613fa2565b612bff8989613fcf565b612c0a8a8a8a613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa158015612c60573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c849190615d33565b9050612caf612c96611420428f615b5b565b612ca890670de0b6b3a7640000615b10565b8c90615008565b965050505050612cbe565b8692505b85831015612cdf57604051632c1b6b4160e21b815260040160405180910390fd5b612ce98484614003565b5f80612d35612d00612cfb878c615b5b565b614164565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614190565b9150915081846002015f828254612d4c9190615b10565b90915550612d5b9050816141dc565b612d65838a61501c565b5060208301518351175f03612db8575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612db1908c614e92565b9055612de8565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b60408051338152602081018b90529081018690526001600160a01b0380881691908916908c907fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c9060600160405180910390a4612e436139c1565b612e4c8a614208565b612e806001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614256565b5050505095945050505050565b5f612e978161393e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610f48565b5f612ed5613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612f0f866122af565b6040518463ffffffff1660e01b8152600401612f2d93929190615d4a565b5f6040518083038186803b158015612f43575f80fd5b505afa158015612f55573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561301757604051630149e46f60e01b81523360048201526001600160a01b03821690630149e46f906024015f604051808303815f87803b158015612faa575f80fd5b505af1158015612fbc573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b158015613000575f80fd5b505af1158015613012573d5f803e3d5ffd5b505050505b611d3e848461507a565b5f8061302b613bc7565b6123e4613037856132ba565b84614966565b613045613bc7565b6119f633848484614ac0565b60cb545f90801561100357610ffe611dd0610de3565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db5906130b990309086908990600401615d4a565b5f6040518083038186803b1580156130cf575f80fd5b505afa1580156130e1573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561314f57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613138575f80fd5b505af115801561314a573d5f803e3d5ffd5b505050505b61315a8585856150dd565b91506131646139c1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530846131a7886122af565b6040518463ffffffff1660e01b81526004016131c593929190615d4a565b5f6040518083038186803b1580156131db575f80fd5b505afa1580156131ed573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561325b57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613244575f80fd5b505af1158015613256573d5f803e3d5ffd5b505050505b61315a8585856151e7565b5f6132708161393e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f90801561100357610ffe816132d16137ab565b859190613896565b60cb545f90801561100357610ffe816132d1610de3565b6001600160a01b0381165f90815260cc6020526040812054610ebf90610fe0565b4284101561331d575f80fd5b5f6001613328611c57565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613430573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134665750876001600160a01b0316816001600160a01b0316145b61346e575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134df613bc7565b6134e7613bd6565b6134f18285614003565b60e3546001600160a01b0316801561355a57604051636c912dad60e01b81526001600160a01b038481166004830152821690636c912dad906024015f604051808303815f87803b158015613543575f80fd5b505af1158015613555573d5f803e3d5ffd5b505050505b6135656112b5613e55565b61356e856123b9565b91505f8560d45461357f9190615b10565b60d481905560dc549091506135b0906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b8160d3546135be9190615b10565b11156135dc57604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135ed9190615b10565b90915550506001600160a01b0384165f90815260d260205260408120600201805485929061361c908490615b10565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136746139c1565b604051637b9d893160e01b81523060048201526001600160a01b0385811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b1580156136da575f80fd5b505af11580156136ec573d5f803e3d5ffd5b506137269250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614256565b50509392505050565b5f828152606560205260409020600101546137498161393e565b6119f68383614557565b5f61375d8161393e565b60dc80546001600160801b03908116600160801b918516918202179091556040519081527fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90602001610f48565b60d45460dd5460da545f929190839061387890613871906137d990600160281b900463ffffffff1642615b5b565b60db546301e13380906001600160a01b0316637c21fb1d6137fa888a613fcf565b613807898b60d354613fe7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613846573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061386a9190615d33565b9190613896565b84906138b4565b90506138848184615b10565b935050505090565b5f610ebf826132d9565b8282028115158415858304851417166138ad575f80fd5b0492915050565b5f6110058383670de0b6b3a7640000613896565b60da545f9081906138e490610100900463ffffffff1642615b5b565b9050805f036138f4575f91505090565b60da5461393890829061392490613912906224ea009060ff16615b6e565b60dc546001600160801b0316906138b4565b61392e9084615b10565b60d5549190613896565b91505090565b611d7881336152fc565b5f6139516138c8565b90508060d55f8282546139649190615b5b565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a3e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a6d57505f919050565b680755bf798b4a1bf1e58212613a81575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156124ba575f80fd5b60e354600160a01b900460ff16156124ba5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613c0f6224ea0086615d90565b15613c1c57506001613c6f565b428511613c2b57506002613c6f565b613c3b60ff85166224ea00615b6e565b613c486224ea0042615d90565b613c529042615b5b565b613c5c9190615b10565b851115613c6b57506004613c6f565b5060035b826004811115613c8157613c81615da3565b816004811115613c9357613c93615da3565b14158015613cc35750816004811115613cae57613cae615da3565b816004811115613cc057613cc0615da3565b14155b15613d94575f826004811115613cdb57613cdb615da3565b03613d2f57806004811115613cf257613cf2615da3565b836004811115613d0457613d04615da3565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d4157613d41615da3565b836004811115613d5357613d53615da3565b836004811115613d6557613d65615da3565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d26565b5050505050565b60038201545f9042831115613def5760028401544260038601819055613dd890613dc6908490615b5b565b613dd08487615b5b565b839190613896565b9250613de48382615b5b565b600286015550613e12565b828103613dfe575f9150613e12565b600384018390556002840180545f90915591505b5092915050565b81545f9081613e288483615b10565b9050613e41613e3b838760010154615342565b82615357565b613e4b9082615b5b565b9455509192915050565b60d45460dd545f919082613e698284613fcf565b60da549091505f90613ebb9061112190613e9090600160281b900463ffffffff1642615b5b565b60db5460d3546301e13380916001600160a01b031690637c21fb1d908890613807908b908d90613fe7565b9050613ec78185615b10565b9350613ede60e254826138b490919063ffffffff16565b945084613eeb8285615b10565b613ef59190615b5b565b60dd5560d484905560da805468ffffffff00000000001916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611d785760e154613f89906001600160a01b0316613f848361388c565b614ce4565b8060dd5f828254613f9a9190615b10565b909155505050565b5f8115801590613fb157508383115b613fbb575f611d3e565b611d3e82613fc98686615b5b565b90615365565b5f825f03613fdd575f611005565b6110058284615365565b5f835f03613ff5575f611d3e565b611d3e84613fc98486615b10565b336001600160a01b03831614611ccf576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146119f65761404782611077565b6140519082615b5b565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f0361408f57506401000000008117610ebf565b63ffffffff83168083101561410d575f6224ea006140ad8584615b5b565b6140b79190615db7565b90506140c581610100615b5b565b85901c156140e65760405163293cc41f60e21b815260040160405180910390fd5b6140f1816020615b10565b602086901c901b94508484176401000000001792505050610ebf565b5f6224ea0061411c8386615b5b565b6141269190615db7565b905060df81111561414a5760405163293cc41f60e21b815260040160405180910390fd5b614155816020615b10565b6001901b851792505050610ebf565b5f8061417b60e254846138b490919063ffffffff16565b905061418681613f65565b6110058184615b5b565b5f8082156141c4576141bf6141ad6141a787615379565b85615357565b6141b79085615b5b565b859085613896565b6141c6565b5f5b90506141d28185615b5b565b9150935093915050565b805f036141e65750565b60e254156141f757611d7881613f65565b8060d55f828254613f9a9190615b10565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806111a6575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142f1576142cd8382615b5b565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614318908490615b5b565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615ed28339815191529061435f9087815260200190565b60405180910390a3506001949350505050565b61437c828261253c565b611ccf575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143b33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f61440386615379565b9050801561443f576144246144188683615357565b60408801519083613896565b925061443083856138b4565b915061443c8284615b5b565b92505b50935093915050565b815460018301545f919061445c8482615b10565b600186015561190d61446e8383615357565b6141a79084615b5b565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d94575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144ef9190615dca565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614561828261253c565b15611ccf575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145de5760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906145f68289613d9b565b90508060dd5f8282546146099190615b10565b90915550505f88815260d0602090815260408083206001600160a01b038916845282528083208151808301909252805480835260019091015492820183905290929161465f918b9161465a91615b10565b615357565b6040805180820190915283518152602080850151908201529091505f906146869083614f7e565b5160e3549091506001600160a01b031680156146f357604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b1580156146dc575f80fd5b505af11580156146ee573d5f803e3d5ffd5b505050505b8b42101561479b5787156147935760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147419186906143f7565b90925090506147508183615b10565b886002015f8282546147629190615b5b565b925050819055508060d55f82825461477a9190615b10565b9091555061478a90508286615b5b565b985050506147e2565b8296506147e2565b60d6546147b6906147ac8e42615b5b565b6138719190615b6e565b6147c09084615b10565b96506147cc8388615b5b565b60d55f8282546147dc9190615b10565b90915550505b8987111561480357604051632c1b6b4160e21b815260040160405180910390fd5b61480d8683614e6f565b60d35f82825461481d9190615b5b565b9091555061482d9050848461501c565b5060208401518451175f03614889575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d29092529091209081015461487e908e614e92565b6001909101556148b9565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a461490a8c614208565b50505050505095945050505050565b614921615397565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001613a1d565b60e3545f9081906001600160a01b031680156149d357604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b1580156149bc575f80fd5b505af11580156149ce573d5f803e3d5ffd5b505050505b6149de6112b5613e55565b6001600160a01b0384165f90815260d2602052604090206002810154614a048782615357565b9350614a0f84611dba565b9450845f03614a315760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a429190615b5b565b90915550614a5290508482615b5b565b82600201819055508360df5f828254614a6b9190615b5b565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614ae05760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b0385811660048301523060248301527f0000000000000000000000000000000000000000000000000000000000000000169063e16ee720906044015f6040518083038186803b158015614b45575f80fd5b505afa158015614b57573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bc557604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614bae575f80fd5b505af1158015614bc0573d5f803e3d5ffd5b505050505b5f614bcf83611077565b9050614bdb83826153a5565b614be5848261541e565b60408051848152602081018390526001600160a01b03808716929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c7591815260200190565b60405180910390a3614c856139c1565b6128446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614256565b614cc1611096565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d4d57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614d36575f80fd5b505af1158015614d48573d5f803e3d5ffd5b505050505b6119f68383615485565b614d5f613bc7565b614d67613bd6565b614d6f614cb9565b5f614d78613e55565b90505f614d83613948565b9050614d8f8482615b10565b60dd5f828254614d9f9190615b10565b90915550614dae905082613f65565b6111a66139c1565b614de07f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361253c565b158015614e145750614e127f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361253c565b155b156124ba57604051631d006fdb60e31b815260040160405180910390fd5b614e3a613bc7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861494e3390565b815460018301545f9190614e838483615b5b565b855561190d61446e8383615357565b5f821580614ea65750816401000000001783145b15614eb257505f610ebf565b63ffffffff8316808303614f2057602184901c60015b60018216158015614ed857508115155b15614ee957600191821c9101614ec8565b6020614ef58282615b10565b9690961c90951b9485614f0b6224ea0083615b6e565b614f159087615b10565b179350505050610ebf565b6224ea00614f2e8285615b5b565b614f389190615db7565b614f43906020615b10565b6001901b198416915050610ebf565b5f54610100900460ff166124ba575f80fd5b5f54610100900460ff16614f76575f80fd5b6124ba6154d4565b604080518082019091525f8082526020820152825160208401515f91614fa8916132d19082615b10565b8085529050614fb78184615b5b565b6020850152509192915050565b815460018301545f919082614fd98583615b5b565b9050614fe58184615357565b614fef8385615357565b614ff99190615b5b565b60019096015550929392505050565b5f61100583670de0b6b3a764000084613896565b604080518082019091525f8082526020820152602083015183515f9161504191615b10565b90505f61504e8483615b5b565b855190915061505f90829084613896565b80865261506c9082615b5b565b602086015250929392505050565b335f90815260cc602052604081208054839190839061509a908490615b5b565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615ed2833981519152906110669086815260200190565b5f6150e784611077565b9050336001600160a01b03831614615154576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151525761512e8282615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61515e84826153a5565b615168828261541e565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614256565b5f336001600160a01b03831614615253576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146152515761522d8582615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61525c846122af565b9050805f03615269575f80fd5b61527381856153a5565b61527d828561541e565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614256565b615306828261253c565b611ccf57615313816154f2565b61531e836020615504565b60405160200161532f929190615e53565b6040516020818303038152906040525f80fd5b5f8183116153505781611005565b5090919050565b5f8183106153505781611005565b5f61100583670de0b6b3a764000084613a27565b805160208201515f919061538d8282615357565b611d3e9083615b5b565b60975460ff166124ba575f80fd5b6153ad613bc7565b6153b5614cb9565b6153c06112b5613e55565b5f6153c9613948565b90505f838260dd546153db9190615b10565b6153e59190615b5b565b90508060d45460d3546153f89190615b10565b111561541657604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc602052604081208054839290615445908490615b5b565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615ed2833981519152906020015b60405180910390a35050565b8060cb5f8282546154969190615b10565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615ed28339815191529101615479565b5f54610100900460ff166154e6575f80fd5b6097805460ff19169055565b6060610ebf6001600160a01b03831660145b60605f615512836002615b6e565b61551d906002615b10565b67ffffffffffffffff81111561553557615535615be1565b6040519080825280601f01601f19166020018201604052801561555f576020820181803683370190505b509050600360fc1b815f8151811061557957615579615ea8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106155a7576155a7615ea8565b60200101906001600160f81b03191690815f1a9053505f6155c9846002615b6e565b6155d4906001615b10565b90505b600181111561564b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061560857615608615ea8565b1a60f81b82828151811061561e5761561e615ea8565b60200101906001600160f81b03191690815f1a90535060049490941c9361564481615ebc565b90506155d7565b508315611005575f80fd5b6001600160a01b0381168114611d78575f80fd5b5f6020828403121561567a575f80fd5b813561100581615656565b5f60208284031215615695575f80fd5b81356001600160e01b031981168114611005575f80fd5b80356001600160801b03811681146156c2575f80fd5b919050565b5f602082840312156156d7575f80fd5b611005826156ac565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615725575f80fd5b5035919050565b5f806040838503121561573d575f80fd5b823561574881615656565b946020939093013593505050565b5f8083601f840112615766575f80fd5b50813567ffffffffffffffff81111561577d575f80fd5b602083019150836020828501011115612426575f80fd5b5f80602083850312156157a5575f80fd5b823567ffffffffffffffff8111156157bb575f80fd5b6157c785828601615756565b90969095509350505050565b5f805f805f60a086880312156157e7575f80fd5b853594506020860135935060408601359250606086013561580781615656565b9150608086013561581781615656565b809150509295509295909350565b5f805f60608486031215615837575f80fd5b833561584281615656565b9250602084013561585281615656565b929592945050506040919091013590565b803560ff811681146156c2575f80fd5b5f60208284031215615883575f80fd5b61100582615863565b5f806040838503121561589d575f80fd5b8235915060208301356158af81615656565b809150509250929050565b5f805f80608085870312156158cd575f80fd5b84359350602085013592506040850135915060608501356158ed81615656565b939692955090935050565b5f805f6060848603121561590a575f80fd5b833561591581615656565b925060208401359150604084013561592c81615656565b809150509250925092565b5f8060408385031215615948575f80fd5b50508035926020909101359150565b5f60208284031215615967575f80fd5b81358015158114611005575f80fd5b5f805f805f805f805f806101208b8d031215615990575f80fd5b8a3567ffffffffffffffff8111156159a6575f80fd5b6159b28d828e01615756565b909b5099506159c5905060208c01615863565b97506159d360408c016156ac565b965060608b01356159e381615656565b955060808b0135945060a08b013593506159ff60c08c016156ac565b925060e08b013591506101008b013590509295989b9194979a5092959850565b5f805f60608486031215615a31575f80fd5b833592506020840135615a4381615656565b9150604084013561592c81615656565b5f805f805f805f60e0888a031215615a69575f80fd5b8735615a7481615656565b96506020880135615a8481615656565b95506040880135945060608801359350615aa060808901615863565b925060a0880135915060c0880135905092959891949750929550565b5f8060408385031215615acd575f80fd5b8235615ad881615656565b915060208301356158af81615656565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ebf57610ebf615afc565b600181811c90821680615b3757607f821691505b602082108103615b5557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610ebf57610ebf615afc565b8082028115828204841417610ebf57610ebf615afc565b5f600160ff1b8201615b9957615b99615afc565b505f0390565b8181035f831280158383131683831282161715613e1257613e12615afc565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156119f657805f5260205f20601f840160051c81016020851015615c1a5750805b601f840160051c820191505b81811015613d94575f8155600101615c26565b815167ffffffffffffffff811115615c5357615c53615be1565b615c6781615c618454615b23565b84615bf5565b602080601f831160018114615c9a575f8415615c835750858301515b5f19600386901b1c1916600185901b178555612844565b5f85815260208120601f198616915b82811015615cc857888601518255948401946001909101908401615ca9565b5085821015615ce557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b03828116828216039080821115613e1257613e12615afc565b5f60208284031215615d43575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215615d7f575f80fd5b505080516020909101519092909150565b5f82615d9e57615d9e615ae8565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615dc557615dc5615ae8565b500490565b5f808354615dd781615b23565b60018281168015615def5760018114615e0457615e30565b60ff1984168752821515830287019450615e30565b875f526020805f205f5b85811015615e275781548a820152908401908201615e0e565b50505082870194505b50929695505050505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f615e846017830185615e3c565b7001034b99036b4b9b9b4b733903937b6329607d1b815261190d6011820185615e3c565b634e487b7160e01b5f52603260045260245ffd5b5f81615eca57615eca615afc565b505f19019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204485d3d9d92eeb57ec453d55009460985e73455784e22d97a9959ce3f189d91364736f6c63430008190033", - "devdoc": { - "events": { - "AccumulatorAccrual(uint256)": { - "params": { - "timestamp": "current timestamp." - } - }, - "BackupFeeRateSet(uint256)": { - "params": { - "backupFeeRate": "rate charged to the fixed pools to be accrued by the floating depositors." - } - }, - "Borrow(address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets that were borrowed.", - "borrower": "address which will be repaying the borrowed assets.", - "caller": "address which borrowed the asset.", - "receiver": "address that received the borrowed assets.", - "shares": "amount of borrow shares assigned to the account." - } - }, - "BorrowAtMaturity(uint256,address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of the asset that were borrowed.", - "borrower": "address which will be repaying the borrowed assets.", - "caller": "address which borrowed the asset.", - "fee": "extra amount that will need to be paid at maturity.", - "maturity": "maturity in which the account will have to repay the loan.", - "receiver": "address that received the borrowed assets." - } - }, - "DampSpeedSet(uint256,uint256)": { - "params": { - "dampSpeedDown": "represented with 18 decimals.", - "dampSpeedUp": "represented with 18 decimals." - } - }, - "DepositAtMaturity(uint256,address,address,uint256,uint256)": { - "params": { - "assets": "amount of the asset that were deposited.", - "caller": "address which deposited the assets.", - "fee": "is the extra amount that it will be collected at maturity.", - "maturity": "maturity at which the account will be able to collect his deposit + his fee.", - "owner": "address that will be able to withdraw the deposited assets." - } - }, - "EarningsAccumulatorSmoothFactorSet(uint256)": { - "params": { - "earningsAccumulatorSmoothFactor": "factor represented with 18 decimals." - } - }, - "FixedEarningsUpdate(uint256,uint256,uint256)": { - "params": { - "maturity": "maturity date where the earnings were updated.", - "timestamp": "current timestamp.", - "unassignedEarnings": "pending unassigned earnings." - } - }, - "FloatingDebtUpdate(uint256,uint256)": { - "params": { - "timestamp": "current timestamp.", - "utilization": "new floating utilization." - } - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "InterestRateModelSet(address)": { - "params": { - "interestRateModel": "new interest rate model to be used to calculate rates." - } - }, - "Liquidate(address,address,uint256,uint256,address,uint256)": { - "params": { - "assets": "amount of the asset that were repaid.", - "borrower": "address which had the original debt.", - "lendersAssets": "incentive paid to lenders.", - "receiver": "address which repaid the previously borrowed amount.", - "seizeMarket": "address of the asset that were seized by the liquidator.", - "seizedAssets": "amount seized of the collateral." - } - }, - "MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)": { - "params": { - "earningsAccumulator": "earnings accumulator.", - "floatingAssets": "total floating supply assets.", - "floatingBorrowShares": "total floating borrow shares.", - "floatingDebt": "total floating borrow assets.", - "floatingDepositShares": "total floating supply shares.", - "timestamp": "current timestamp." - } - }, - "MaxFuturePoolsSet(uint256)": { - "params": { - "maxFuturePools": "represented with 0 decimals." - } - }, - "Paused(address)": { - "details": "Emitted when the pause is triggered by `account`." - }, - "PenaltyRateSet(uint256)": { - "params": { - "penaltyRate": "penaltyRate percentage per second represented with 18 decimals." - } - }, - "Repay(address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets that was repaid.", - "borrower": "address which had the original debt.", - "caller": "address which repaid the previously borrowed amount.", - "shares": "amount of borrow shares that were subtracted from the account's accountability." - } - }, - "RepayAtMaturity(uint256,address,address,uint256,uint256)": { - "params": { - "assets": "amount that was repaid.", - "borrower": "address which had the original debt.", - "caller": "address which repaid the previously borrowed amount.", - "maturity": "maturity where the account repaid its borrowed amounts.", - "positionAssets": "amount of the debt that was covered in this repayment (penalties could have been repaid)." - } - }, - "ReserveFactorSet(uint256)": { - "params": { - "reserveFactor": "reserveFactor percentage." - } - }, - "RewardsControllerSet(address)": { - "params": { - "rewardsController": "new rewards controller to update account rewards when operating with the Market." - } - }, - "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`)" - }, - "Seize(address,address,uint256)": { - "params": { - "assets": "amount seized of the collateral.", - "borrower": "address which had the original debt.", - "liquidator": "address which seized this collateral." - } - }, - "SpreadBadDebt(address,uint256)": { - "params": { - "assets": "amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.", - "borrower": "address which was cleared from bad debt." - } - }, - "TreasurySet(address,uint256)": { - "params": { - "treasury": "address of the treasury that will receive the minted eTokens.", - "treasuryFeeRate": "represented with 18 decimals." - } - }, - "Unpaused(address)": { - "details": "Emitted when the pause is lifted by `account`." - }, - "WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets withdrawn (can include a discount for early withdraw).", - "caller": "address which withdraw the asset.", - "maturity": "maturity where the account withdraw its deposits.", - "owner": "address which had the assets withdrawn.", - "positionAssets": "position size reduced.", - "receiver": "address which will be collecting the assets." - } - } - }, - "kind": "dev", - "methods": { - "accountSnapshot(address)": { - "params": { - "account": "account to return status snapshot in the specified maturity date." - }, - "returns": { - "_0": "the amount deposited to the floating pool and the amount owed to floating and fixed pools." - } - }, - "borrow(uint256,address,address)": { - "params": { - "assets": "amount to be sent to receiver and repaid by borrower.", - "borrower": "address that will repay the borrowed assets.", - "receiver": "address that will receive the borrowed assets." - }, - "returns": { - "borrowShares": "shares corresponding to the borrowed assets." - } - }, - "borrowAtMaturity(uint256,uint256,uint256,address,address)": { - "params": { - "assets": "amount to be sent to receiver and repaid by borrower.", - "borrower": "address that will repay the borrowed assets.", - "maturity": "maturity date for repayment.", - "maxAssets": "maximum amount of debt that the account is willing to accept.", - "receiver": "address that will receive the borrowed assets." - }, - "returns": { - "assetsOwed": "total amount of assets (principal + fee) to be repaid at maturity." - } - }, - "clearBadDebt(address)": { - "details": "Can only be called from the auditor.", - "params": { - "borrower": "account with insufficient collateral to be cleared the debt." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "depositAtMaturity(uint256,uint256,uint256,address)": { - "params": { - "assets": "amount to receive from the msg.sender.", - "maturity": "maturity date where the assets will be deposited.", - "minAssetsRequired": "minimum amount of assets required by the depositor for the transaction to be accepted.", - "receiver": "address that will be able to withdraw the deposited assets." - }, - "returns": { - "positionAssets": "total amount of assets (principal + fee) to be withdrawn at maturity." - } - }, - "fixedPoolBalance(uint256)": { - "params": { - "maturity": "maturity date of the fixed pool." - }, - "returns": { - "_0": "borrowed and supplied amount of the fixed pool." - } - }, - "fixedPoolBorrowed(uint256)": { - "params": { - "maturity": "maturity date of the fixed pool." - }, - "returns": { - "_0": "borrowed amount of the fixed pool." - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)": { - "details": "can only be called once." - }, - "liquidate(address,uint256,address)": { - "details": "Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.", - "params": { - "borrower": "account that has an outstanding debt across floating or fixed pools.", - "maxAssets": "maximum amount of debt that the liquidator is willing to accept. (it can be less)", - "seizeMarket": "market from which the collateral will be seized to give to the liquidator." - }, - "returns": { - "repaidAssets": "actual amount repaid." - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "previewBorrow(uint256)": { - "params": { - "assets": "amount of assets to borrow." - }, - "returns": { - "_0": "amount of shares that will be asigned to the account after the borrow." - } - }, - "previewDebt(address)": { - "params": { - "borrower": "account to return status snapshot for fixed and floating borrows." - }, - "returns": { - "debt": "the total debt, denominated in number of assets." - } - }, - "previewFloatingAssetsAverage()": { - "returns": { - "_0": "projected `floatingAssetsAverage`." - } - }, - "previewRefund(uint256)": { - "params": { - "shares": "amount of shares to subtract from caller's accountability." - }, - "returns": { - "_0": "amount of assets that will be repaid." - } - }, - "previewRepay(uint256)": { - "params": { - "assets": "amount of assets to repay." - }, - "returns": { - "_0": "amount of shares that will be subtracted from the account after the repay." - } - }, - "redeem(uint256,address,address)": { - "details": "Makes sure that the owner doesn't have shortfall after withdrawing.", - "params": { - "owner": "address which owns the floating pool assets.", - "receiver": "address to which the assets will be transferred.", - "shares": "amount of shares to be redeemed for underlying asset." - }, - "returns": { - "assets": "amount of underlying asset that was withdrawn." - } - }, - "refund(uint256,address)": { - "params": { - "borrowShares": "shares to be subtracted from the borrower's accountability.", - "borrower": "address of the account that has the debt." - }, - "returns": { - "actualShares": "actual subtracted shares from the borrower's accountability.", - "assets": "subtracted assets from the borrower's accountability." - } - }, - "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." - }, - "repay(uint256,address)": { - "params": { - "assets": "assets to be subtracted from the borrower's accountability.", - "borrower": "address of the account that has the debt." - }, - "returns": { - "actualRepay": "the actual amount that should be transferred into the protocol.", - "borrowShares": "subtracted shares from the borrower's accountability." - } - }, - "repayAtMaturity(uint256,uint256,uint256,address)": { - "params": { - "borrower": "address of the account that has the debt.", - "maturity": "maturity date where the assets will be repaid.", - "maxAssets": "maximum amount of debt that the account is willing to accept to be repaid.", - "positionAssets": "amount to be paid for the borrower's debt." - }, - "returns": { - "actualRepayAssets": "the actual amount that was transferred into the protocol." - } - }, - "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." - }, - "seize(address,address,uint256)": { - "details": "Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).", - "params": { - "assets": "amount to be removed from borrower's possession.", - "borrower": "address from which the assets will be seized.", - "liquidator": "address which will receive the seized assets." - } - }, - "setAssetSymbol(string)": { - "params": { - "assetSymbol": "the symbol for the underlying asset." - } - }, - "setBackupFeeRate(uint256)": { - "params": { - "backupFeeRate_": "percentage amount represented with 18 decimals." - } - }, - "setDampSpeed(uint256,uint256)": { - "params": { - "down": "damp speed down, represented with 18 decimals.", - "up": "damp speed up, represented with 18 decimals." - } - }, - "setEarningsAccumulatorSmoothFactor(uint128)": { - "params": { - "earningsAccumulatorSmoothFactor_": "represented with 18 decimals." - } - }, - "setInterestRateModel(address)": { - "params": { - "interestRateModel_": "new interest rate model." - } - }, - "setMaxFuturePools(uint8)": { - "details": "If value is decreased, VALID maturities will become NOT_READY.", - "params": { - "futurePools": "number of pools to be active at the same time." - } - }, - "setPenaltyRate(uint256)": { - "params": { - "penaltyRate_": "percentage represented with 18 decimals." - } - }, - "setReserveFactor(uint128)": { - "params": { - "reserveFactor_": "parameter represented with 18 decimals." - } - }, - "setRewardsController(address)": { - "params": { - "rewardsController_": "new rewards controller." - } - }, - "setTreasury(address,uint256)": { - "params": { - "treasuryFeeRate_": "represented with 18 decimals.", - "treasury_": "address of the treasury that will receive the minted eTokens." - } - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "totalAssets()": { - "returns": { - "_0": "actual floatingAssets plus earnings to be accrued at current timestamp." - } - }, - "totalFloatingBorrowAssets()": { - "returns": { - "_0": "actual floating debt plus projected interest." - } - }, - "transfer(address,uint256)": { - "details": "Makes sure that the caller doesn't have shortfall after transferring.", - "params": { - "shares": "amount of shares to be transferred.", - "to": "address to which the assets will be transferred." - } - }, - "transferFrom(address,address,uint256)": { - "details": "Makes sure that `from` address doesn't have shortfall after transferring.", - "params": { - "from": "address from which the assets will be transferred.", - "shares": "amount of shares to be transferred.", - "to": "address to which the assets will be transferred." - } - }, - "withdraw(uint256,address,address)": { - "details": "Makes sure that the owner doesn't have shortfall after withdrawing.", - "params": { - "assets": "amount of underlying to be withdrawn.", - "owner": "address which owns the floating pool assets.", - "receiver": "address to which the assets will be transferred." - }, - "returns": { - "shares": "amount of shares redeemed for underlying asset." - } - }, - "withdrawAtMaturity(uint256,uint256,uint256,address,address)": { - "params": { - "maturity": "maturity date where the assets will be withdrawn.", - "minAssetsRequired": "minimum amount required by the account (if discount included for early withdrawal).", - "owner": "address that previously deposited the assets.", - "positionAssets": "position size to be reduced.", - "receiver": "address that will receive the withdrawn assets." - }, - "returns": { - "assetsDiscounted": "amount of assets withdrawn (can include a discount for early withdraw)." - } - } - }, - "stateVariables": { - "__gap": { - "custom:oz-renamed-from": "floatingUtilization", - "details": "gap from deprecated state." - }, - "auditor": { - "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" - } - }, - "version": 1 - }, - "userdoc": { - "events": { - "AccumulatorAccrual(uint256)": { - "notice": "Emitted when accumulator distributes earnings." - }, - "BackupFeeRateSet(uint256)": { - "notice": "Emitted when the backupFeeRate parameter is changed by admin." - }, - "Borrow(address,address,address,uint256,uint256)": { - "notice": "Event emitted when an account borrows amount of assets from a floating pool." - }, - "BorrowAtMaturity(uint256,address,address,address,uint256,uint256)": { - "notice": "Emitted when an account borrows amount of an asset from a certain maturity date." - }, - "DampSpeedSet(uint256,uint256)": { - "notice": "Emitted when the damp speeds are changed by admin." - }, - "DepositAtMaturity(uint256,address,address,uint256,uint256)": { - "notice": "Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period." - }, - "EarningsAccumulatorSmoothFactorSet(uint256)": { - "notice": "Emitted when the earningsAccumulatorSmoothFactor is changed by admin." - }, - "FixedEarningsUpdate(uint256,uint256,uint256)": { - "notice": "Emitted when the earnings of a maturity are updated." - }, - "FloatingDebtUpdate(uint256,uint256)": { - "notice": "Emitted when the floating debt is updated." - }, - "Frozen(address,bool)": { - "notice": "Emitted when `account` sets the `isFrozen` flag." - }, - "InterestRateModelSet(address)": { - "notice": "Emitted when the interestRateModel is changed by admin." - }, - "Liquidate(address,address,uint256,uint256,address,uint256)": { - "notice": "Emitted when an account's position had a liquidation." - }, - "MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)": { - "notice": "Emitted when market state is updated." - }, - "MaxFuturePoolsSet(uint256)": { - "notice": "Emitted when the maxFuturePools is changed by admin." - }, - "PenaltyRateSet(uint256)": { - "notice": "Emitted when the penaltyRate is changed by admin." - }, - "Repay(address,address,uint256,uint256)": { - "notice": "Emitted when an account repays amount of assets to a floating pool." - }, - "RepayAtMaturity(uint256,address,address,uint256,uint256)": { - "notice": "Emitted when an account repays its borrows after maturity." - }, - "ReserveFactorSet(uint256)": { - "notice": "Emitted when the reserveFactor is changed by admin." - }, - "RewardsControllerSet(address)": { - "notice": "Emitted when the rewardsController is changed by admin." - }, - "Seize(address,address,uint256)": { - "notice": "Emitted when an account's collateral has been seized." - }, - "SpreadBadDebt(address,uint256)": { - "notice": "Emitted when an account is cleared from bad debt." - }, - "TreasurySet(address,uint256)": { - "notice": "Emitted when the treasury variables are changed by admin." - }, - "WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)": { - "notice": "Emitted when an account withdraws from a fixed rate pool." - } - }, - "kind": "user", - "methods": { - "accountSnapshot(address)": { - "notice": "Gets current snapshot for an account across all maturities." - }, - "accounts(address)": { - "notice": "Tracks fixed deposit and borrow map and floating borrow shares of an account." - }, - "backupFeeRate()": { - "notice": "Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity." - }, - "borrow(uint256,address,address)": { - "notice": "Borrows a certain amount from the floating pool." - }, - "borrowAtMaturity(uint256,uint256,uint256,address,address)": { - "notice": "Borrows a certain amount from a maturity." - }, - "clearBadDebt(address)": { - "notice": "Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`." - }, - "dampSpeedDown()": { - "notice": "Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower." - }, - "dampSpeedUp()": { - "notice": "Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher." - }, - "depositAtMaturity(uint256,uint256,uint256,address)": { - "notice": "Deposits a certain amount to a maturity." - }, - "earningsAccumulator()": { - "notice": "Accumulated earnings from extraordinary sources to be gradually distributed." - }, - "earningsAccumulatorSmoothFactor()": { - "notice": "Factor used for gradual accrual of earnings to the floating pool." - }, - "fixedBorrowPositions(uint256,address)": { - "notice": "Tracks account's fixed borrow positions by maturity, account and position." - }, - "fixedDepositPositions(uint256,address)": { - "notice": "Tracks account's fixed deposit positions by maturity, account and position." - }, - "fixedPoolBalance(uint256)": { - "notice": "Retrieves a fixed pool's borrowed and supplied amount." - }, - "fixedPoolBorrowed(uint256)": { - "notice": "Retrieves a fixed pool's borrowed amount." - }, - "fixedPools(uint256)": { - "notice": "Tracks fixed pools state by maturity." - }, - "floatingAssets()": { - "notice": "Amount of floating assets deposited to the pool." - }, - "floatingAssetsAverage()": { - "notice": "Average of the floating assets to get fixed borrow rates and prevent rate manipulation." - }, - "floatingBackupBorrowed()": { - "notice": "Amount of assets lent by the floating pool to the fixed pools." - }, - "floatingDebt()": { - "notice": "Amount of assets lent by the floating pool to accounts." - }, - "initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)": { - "notice": "Initializes the contract." - }, - "interestRateModel()": { - "notice": "Interest rate model contract used to get the borrow rates." - }, - "isFrozen()": { - "notice": "Flag to prevent new borrows and deposits." - }, - "lastAccumulatorAccrual()": { - "notice": "Last time the accumulator distributed earnings." - }, - "lastAverageUpdate()": { - "notice": "Last time the floating assets average was updated." - }, - "lastFloatingDebtUpdate()": { - "notice": "Last time the floating debt was updated." - }, - "liquidate(address,uint256,address)": { - "notice": "Liquidates undercollateralized fixed/floating (or both) position(s)." - }, - "maxFuturePools()": { - "notice": "Number of fixed pools to be active at the same time." - }, - "pause()": { - "notice": "Sets the pause state to true in case of emergency, triggered by an authorized account." - }, - "penaltyRate()": { - "notice": "Rate per second to be charged to delayed fixed pools borrowers after maturity." - }, - "previewBorrow(uint256)": { - "notice": "Simulates the effects of a borrow at the current time, given current contract conditions." - }, - "previewDebt(address)": { - "notice": "Gets all borrows and penalties for an account." - }, - "previewFloatingAssetsAverage()": { - "notice": "Returns the current `floatingAssetsAverage` without updating the storage variable." - }, - "previewRefund(uint256)": { - "notice": "Simulates the effects of a refund at the current time, given current contract conditions." - }, - "previewRepay(uint256)": { - "notice": "Simulates the effects of a repay at the current time, given current contract conditions." - }, - "redeem(uint256,address,address)": { - "notice": "Redeems the owner's floating pool assets to the receiver address." - }, - "refund(uint256,address)": { - "notice": "Repays a certain amount of shares to the floating pool." - }, - "repay(uint256,address)": { - "notice": "Repays a certain amount of assets to the floating pool." - }, - "repayAtMaturity(uint256,uint256,uint256,address)": { - "notice": "Repays a certain amount to a maturity." - }, - "reserveFactor()": { - "notice": "Percentage factor that represents the liquidity reserves that can't be borrowed." - }, - "rewardsController()": { - "notice": "Address of the rewards controller that will accrue rewards for accounts operating with the Market." - }, - "seize(address,address,uint256)": { - "notice": "Public function to seize a certain amount of assets." - }, - "setAssetSymbol(string)": { - "notice": "Sets name and symbol for the Market." - }, - "setBackupFeeRate(uint256)": { - "notice": "Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity." - }, - "setDampSpeed(uint256,uint256)": { - "notice": "Sets the damp speed used to update the floatingAssetsAverage." - }, - "setEarningsAccumulatorSmoothFactor(uint128)": { - "notice": "Sets the factor used when smoothly accruing earnings to the floating pool." - }, - "setFrozen(bool)": { - "notice": "Sets `isFrozen` state, triggered by an authorized account." - }, - "setInterestRateModel(address)": { - "notice": "Sets the interest rate model to be used to calculate rates." - }, - "setMaxFuturePools(uint8)": { - "notice": "Sets the protocol's max future pools for fixed borrowing and lending." - }, - "setPenaltyRate(uint256)": { - "notice": "Sets the penalty rate per second." - }, - "setReserveFactor(uint128)": { - "notice": "Sets the percentage that represents the liquidity reserves that can't be borrowed." - }, - "setRewardsController(address)": { - "notice": "Sets the rewards controller to update account rewards when operating with the Market." - }, - "setTreasury(address,uint256)": { - "notice": "Sets the treasury variables." - }, - "totalAssets()": { - "notice": "Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator." - }, - "totalFloatingBorrowAssets()": { - "notice": "Calculates the total floating debt, considering elapsed time since last update and current interest rate." - }, - "totalFloatingBorrowShares()": { - "notice": "Total amount of floating borrow shares assigned to floating borrow accounts." - }, - "transfer(address,uint256)": { - "notice": "Moves amount of shares from the caller's account to `to`." - }, - "transferFrom(address,address,uint256)": { - "notice": "Moves amount of shares from `from` to `to` using the allowance mechanism." - }, - "treasury()": { - "notice": "Address of the treasury that will receive the allocated earnings." - }, - "treasuryFeeRate()": { - "notice": "Rate to be charged by the treasury to floating and fixed borrows." - }, - "unpause()": { - "notice": "Sets the pause state to false when threat is gone, triggered by an authorized account." - }, - "withdraw(uint256,address,address)": { - "notice": "Withdraws the owner's floating pool assets to the receiver address." - }, - "withdrawAtMaturity(uint256,uint256,uint256,address,address)": { - "notice": "Withdraws a certain amount from a maturity." - } - }, - "version": 1 - }, + "numDeployments": 4, + "solcInputHash": "6e57950826dfd6055f8dc377807ae48e", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"contract Auditor\",\"name\":\"auditor_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Disagreement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientProtocolLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketFrozen\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaturityOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAuditor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPausingRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SelfLiquidation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolState\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"alternativeState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolStates\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBorrow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRepay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWithdraw\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AccumulatorAccrual\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"backupFeeRate\",\"type\":\"uint256\"}],\"name\":\"BackupFeeRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"BorrowAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedUp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedDown\",\"type\":\"uint256\"}],\"name\":\"DampSpeedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"DepositAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulatorSmoothFactor\",\"type\":\"uint256\"}],\"name\":\"EarningsAccumulatorSmoothFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"}],\"name\":\"FixedEarningsUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilization\",\"type\":\"uint256\"}],\"name\":\"FloatingDebtUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isFrozen\",\"type\":\"bool\"}],\"name\":\"Frozen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel\",\"type\":\"address\"}],\"name\":\"InterestRateModelSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lendersAssets\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizedAssets\",\"type\":\"uint256\"}],\"name\":\"Liquidate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDepositShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDebt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulator\",\"type\":\"uint256\"}],\"name\":\"MarketUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxFuturePools\",\"type\":\"uint256\"}],\"name\":\"MaxFuturePoolsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyRate\",\"type\":\"uint256\"}],\"name\":\"PenaltyRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Repay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"name\":\"RepayAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveFactor\",\"type\":\"uint256\"}],\"name\":\"ReserveFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController\",\"type\":\"address\"}],\"name\":\"RewardsControllerSet\",\"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\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"SpreadBadDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate\",\"type\":\"uint256\"}],\"name\":\"TreasurySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"WithdrawAtMaturity\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EMERGENCY_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"accountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fixedDeposits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fixedBorrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auditor\",\"outputs\":[{\"internalType\":\"contract Auditor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"backupFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrowAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsOwed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"clearBadDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"depositAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulatorSmoothFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedBorrowPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedDepositPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"fixedPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplied\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastAccrual\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingBackupBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"maxFuturePools_\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedUp_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedDown_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAccumulatorAccrual\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAverageUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFloatingDebtUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxFuturePools\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"previewDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"debt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewFloatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRefund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewRepay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repayAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepayAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsController\",\"outputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"}],\"name\":\"setAssetSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setBackupFeeRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"up\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"down\",\"type\":\"uint256\"}],\"name\":\"setDampSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"}],\"name\":\"setEarningsAccumulatorSmoothFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isFrozen_\",\"type\":\"bool\"}],\"name\":\"setFrozen\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"futurePools\",\"type\":\"uint8\"}],\"name\":\"setMaxFuturePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"}],\"name\":\"setReserveFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController_\",\"type\":\"address\"}],\"name\":\"setRewardsController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setTreasury\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasuryFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsDiscounted\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\"}},\"BackupFeeRateSet(uint256)\":{\"params\":{\"backupFeeRate\":\"rate charged to the fixed pools to be accrued by the floating depositors.\"}},\"Borrow(address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"receiver\":\"address that received the borrowed assets.\",\"shares\":\"amount of borrow shares assigned to the account.\"}},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"fee\":\"extra amount that will need to be paid at maturity.\",\"maturity\":\"maturity in which the account will have to repay the loan.\",\"receiver\":\"address that received the borrowed assets.\"}},\"DampSpeedSet(uint256,uint256)\":{\"params\":{\"dampSpeedDown\":\"represented with 18 decimals.\",\"dampSpeedUp\":\"represented with 18 decimals.\"}},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were deposited.\",\"caller\":\"address which deposited the assets.\",\"fee\":\"is the extra amount that it will be collected at maturity.\",\"maturity\":\"maturity at which the account will be able to collect his deposit + his fee.\",\"owner\":\"address that will be able to withdraw the deposited assets.\"}},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"params\":{\"earningsAccumulatorSmoothFactor\":\"factor represented with 18 decimals.\"}},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"params\":{\"maturity\":\"maturity date where the earnings were updated.\",\"timestamp\":\"current timestamp.\",\"unassignedEarnings\":\"pending unassigned earnings.\"}},\"FloatingDebtUpdate(uint256,uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\",\"utilization\":\"new floating utilization.\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InterestRateModelSet(address)\":{\"params\":{\"interestRateModel\":\"new interest rate model to be used to calculate rates.\"}},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were repaid.\",\"borrower\":\"address which had the original debt.\",\"lendersAssets\":\"incentive paid to lenders.\",\"receiver\":\"address which repaid the previously borrowed amount.\",\"seizeMarket\":\"address of the asset that were seized by the liquidator.\",\"seizedAssets\":\"amount seized of the collateral.\"}},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"earningsAccumulator\":\"earnings accumulator.\",\"floatingAssets\":\"total floating supply assets.\",\"floatingBorrowShares\":\"total floating borrow shares.\",\"floatingDebt\":\"total floating borrow assets.\",\"floatingDepositShares\":\"total floating supply shares.\",\"timestamp\":\"current timestamp.\"}},\"MaxFuturePoolsSet(uint256)\":{\"params\":{\"maxFuturePools\":\"represented with 0 decimals.\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PenaltyRateSet(uint256)\":{\"params\":{\"penaltyRate\":\"penaltyRate percentage per second represented with 18 decimals.\"}},\"Repay(address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"shares\":\"amount of borrow shares that were subtracted from the account's accountability.\"}},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"maturity\":\"maturity where the account repaid its borrowed amounts.\",\"positionAssets\":\"amount of the debt that was covered in this repayment (penalties could have been repaid).\"}},\"ReserveFactorSet(uint256)\":{\"params\":{\"reserveFactor\":\"reserveFactor percentage.\"}},\"RewardsControllerSet(address)\":{\"params\":{\"rewardsController\":\"new rewards controller to update account rewards when operating with the Market.\"}},\"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`)\"},\"Seize(address,address,uint256)\":{\"params\":{\"assets\":\"amount seized of the collateral.\",\"borrower\":\"address which had the original debt.\",\"liquidator\":\"address which seized this collateral.\"}},\"SpreadBadDebt(address,uint256)\":{\"params\":{\"assets\":\"amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\",\"borrower\":\"address which was cleared from bad debt.\"}},\"TreasurySet(address,uint256)\":{\"params\":{\"treasury\":\"address of the treasury that will receive the minted eTokens.\",\"treasuryFeeRate\":\"represented with 18 decimals.\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets withdrawn (can include a discount for early withdraw).\",\"caller\":\"address which withdraw the asset.\",\"maturity\":\"maturity where the account withdraw its deposits.\",\"owner\":\"address which had the assets withdrawn.\",\"positionAssets\":\"position size reduced.\",\"receiver\":\"address which will be collecting the assets.\"}}},\"kind\":\"dev\",\"methods\":{\"accountSnapshot(address)\":{\"params\":{\"account\":\"account to return status snapshot in the specified maturity date.\"},\"returns\":{\"_0\":\"the amount deposited to the floating pool and the amount owed to floating and fixed pools.\"}},\"borrow(uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"borrowShares\":\"shares corresponding to the borrowed assets.\"}},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"maturity\":\"maturity date for repayment.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"assetsOwed\":\"total amount of assets (principal + fee) to be repaid at maturity.\"}},\"clearBadDebt(address)\":{\"details\":\"Can only be called from the auditor.\",\"params\":{\"borrower\":\"account with insufficient collateral to be cleared the debt.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"assets\":\"amount to receive from the msg.sender.\",\"maturity\":\"maturity date where the assets will be deposited.\",\"minAssetsRequired\":\"minimum amount of assets required by the depositor for the transaction to be accepted.\",\"receiver\":\"address that will be able to withdraw the deposited assets.\"},\"returns\":{\"positionAssets\":\"total amount of assets (principal + fee) to be withdrawn at maturity.\"}},\"fixedPoolBalance(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed and supplied amount of the fixed pool.\"}},\"fixedPoolBorrowed(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed amount of the fixed pool.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"details\":\"can only be called once.\"},\"liquidate(address,uint256,address)\":{\"details\":\"Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.\",\"params\":{\"borrower\":\"account that has an outstanding debt across floating or fixed pools.\",\"maxAssets\":\"maximum amount of debt that the liquidator is willing to accept. (it can be less)\",\"seizeMarket\":\"market from which the collateral will be seized to give to the liquidator.\"},\"returns\":{\"repaidAssets\":\"actual amount repaid.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"previewBorrow(uint256)\":{\"params\":{\"assets\":\"amount of assets to borrow.\"},\"returns\":{\"_0\":\"amount of shares that will be asigned to the account after the borrow.\"}},\"previewDebt(address)\":{\"params\":{\"borrower\":\"account to return status snapshot for fixed and floating borrows.\"},\"returns\":{\"debt\":\"the total debt, denominated in number of assets.\"}},\"previewFloatingAssetsAverage()\":{\"returns\":{\"_0\":\"projected `floatingAssetsAverage`.\"}},\"previewRefund(uint256)\":{\"params\":{\"shares\":\"amount of shares to subtract from caller's accountability.\"},\"returns\":{\"_0\":\"amount of assets that will be repaid.\"}},\"previewRepay(uint256)\":{\"params\":{\"assets\":\"amount of assets to repay.\"},\"returns\":{\"_0\":\"amount of shares that will be subtracted from the account after the repay.\"}},\"redeem(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\",\"shares\":\"amount of shares to be redeemed for underlying asset.\"},\"returns\":{\"assets\":\"amount of underlying asset that was withdrawn.\"}},\"refund(uint256,address)\":{\"params\":{\"borrowShares\":\"shares to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualShares\":\"actual subtracted shares from the borrower's accountability.\",\"assets\":\"subtracted assets from the borrower's accountability.\"}},\"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.\"},\"repay(uint256,address)\":{\"params\":{\"assets\":\"assets to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualRepay\":\"the actual amount that should be transferred into the protocol.\",\"borrowShares\":\"subtracted shares from the borrower's accountability.\"}},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"borrower\":\"address of the account that has the debt.\",\"maturity\":\"maturity date where the assets will be repaid.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept to be repaid.\",\"positionAssets\":\"amount to be paid for the borrower's debt.\"},\"returns\":{\"actualRepayAssets\":\"the actual amount that was transferred into the protocol.\"}},\"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.\"},\"seize(address,address,uint256)\":{\"details\":\"Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\",\"params\":{\"assets\":\"amount to be removed from borrower's possession.\",\"borrower\":\"address from which the assets will be seized.\",\"liquidator\":\"address which will receive the seized assets.\"}},\"setAssetSymbol(string)\":{\"params\":{\"assetSymbol\":\"the symbol for the underlying asset.\"}},\"setBackupFeeRate(uint256)\":{\"params\":{\"backupFeeRate_\":\"percentage amount represented with 18 decimals.\"}},\"setDampSpeed(uint256,uint256)\":{\"params\":{\"down\":\"damp speed down, represented with 18 decimals.\",\"up\":\"damp speed up, represented with 18 decimals.\"}},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"params\":{\"earningsAccumulatorSmoothFactor_\":\"represented with 18 decimals.\"}},\"setInterestRateModel(address)\":{\"params\":{\"interestRateModel_\":\"new interest rate model.\"}},\"setMaxFuturePools(uint8)\":{\"details\":\"If value is decreased, VALID maturities will become NOT_READY.\",\"params\":{\"futurePools\":\"number of pools to be active at the same time.\"}},\"setPenaltyRate(uint256)\":{\"params\":{\"penaltyRate_\":\"percentage represented with 18 decimals.\"}},\"setReserveFactor(uint128)\":{\"params\":{\"reserveFactor_\":\"parameter represented with 18 decimals.\"}},\"setRewardsController(address)\":{\"params\":{\"rewardsController_\":\"new rewards controller.\"}},\"setTreasury(address,uint256)\":{\"params\":{\"treasuryFeeRate_\":\"represented with 18 decimals.\",\"treasury_\":\"address of the treasury that will receive the minted eTokens.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalAssets()\":{\"returns\":{\"_0\":\"actual floatingAssets plus earnings to be accrued at current timestamp.\"}},\"totalFloatingBorrowAssets()\":{\"returns\":{\"_0\":\"actual floating debt plus projected interest.\"}},\"transfer(address,uint256)\":{\"details\":\"Makes sure that the caller doesn't have shortfall after transferring.\",\"params\":{\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Makes sure that `from` address doesn't have shortfall after transferring.\",\"params\":{\"from\":\"address from which the assets will be transferred.\",\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"withdraw(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"assets\":\"amount of underlying to be withdrawn.\",\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\"},\"returns\":{\"shares\":\"amount of shares redeemed for underlying asset.\"}},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"maturity\":\"maturity date where the assets will be withdrawn.\",\"minAssetsRequired\":\"minimum amount required by the account (if discount included for early withdrawal).\",\"owner\":\"address that previously deposited the assets.\",\"positionAssets\":\"position size to be reduced.\",\"receiver\":\"address that will receive the withdrawn assets.\"},\"returns\":{\"assetsDiscounted\":\"amount of assets withdrawn (can include a discount for early withdraw).\"}}},\"stateVariables\":{\"__gap\":{\"custom:oz-renamed-from\":\"floatingUtilization\",\"details\":\"gap from deprecated state.\"},\"auditor\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"notice\":\"Emitted when accumulator distributes earnings.\"},\"BackupFeeRateSet(uint256)\":{\"notice\":\"Emitted when the backupFeeRate parameter is changed by admin.\"},\"Borrow(address,address,address,uint256,uint256)\":{\"notice\":\"Event emitted when an account borrows amount of assets from a floating pool.\"},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account borrows amount of an asset from a certain maturity date.\"},\"DampSpeedSet(uint256,uint256)\":{\"notice\":\"Emitted when the damp speeds are changed by admin.\"},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period.\"},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"notice\":\"Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\"},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"notice\":\"Emitted when the earnings of a maturity are updated.\"},\"FloatingDebtUpdate(uint256,uint256)\":{\"notice\":\"Emitted when the floating debt is updated.\"},\"Frozen(address,bool)\":{\"notice\":\"Emitted when `account` sets the `isFrozen` flag.\"},\"InterestRateModelSet(address)\":{\"notice\":\"Emitted when the interestRateModel is changed by admin.\"},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"notice\":\"Emitted when an account's position had a liquidation.\"},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when market state is updated.\"},\"MaxFuturePoolsSet(uint256)\":{\"notice\":\"Emitted when the maxFuturePools is changed by admin.\"},\"PenaltyRateSet(uint256)\":{\"notice\":\"Emitted when the penaltyRate is changed by admin.\"},\"Repay(address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays amount of assets to a floating pool.\"},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays its borrows after maturity.\"},\"ReserveFactorSet(uint256)\":{\"notice\":\"Emitted when the reserveFactor is changed by admin.\"},\"RewardsControllerSet(address)\":{\"notice\":\"Emitted when the rewardsController is changed by admin.\"},\"Seize(address,address,uint256)\":{\"notice\":\"Emitted when an account's collateral has been seized.\"},\"SpreadBadDebt(address,uint256)\":{\"notice\":\"Emitted when an account is cleared from bad debt.\"},\"TreasurySet(address,uint256)\":{\"notice\":\"Emitted when the treasury variables are changed by admin.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account withdraws from a fixed rate pool.\"}},\"kind\":\"user\",\"methods\":{\"accountSnapshot(address)\":{\"notice\":\"Gets current snapshot for an account across all maturities.\"},\"accounts(address)\":{\"notice\":\"Tracks fixed deposit and borrow map and floating borrow shares of an account.\"},\"backupFeeRate()\":{\"notice\":\"Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\"},\"borrow(uint256,address,address)\":{\"notice\":\"Borrows a certain amount from the floating pool.\"},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Borrows a certain amount from a maturity.\"},\"clearBadDebt(address)\":{\"notice\":\"Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\"},\"dampSpeedDown()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\"},\"dampSpeedUp()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Deposits a certain amount to a maturity.\"},\"earningsAccumulator()\":{\"notice\":\"Accumulated earnings from extraordinary sources to be gradually distributed.\"},\"earningsAccumulatorSmoothFactor()\":{\"notice\":\"Factor used for gradual accrual of earnings to the floating pool.\"},\"fixedBorrowPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed borrow positions by maturity, account and position.\"},\"fixedDepositPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed deposit positions by maturity, account and position.\"},\"fixedPoolBalance(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed and supplied amount.\"},\"fixedPoolBorrowed(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed amount.\"},\"fixedPools(uint256)\":{\"notice\":\"Tracks fixed pools state by maturity.\"},\"floatingAssets()\":{\"notice\":\"Amount of floating assets deposited to the pool.\"},\"floatingAssetsAverage()\":{\"notice\":\"Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\"},\"floatingBackupBorrowed()\":{\"notice\":\"Amount of assets lent by the floating pool to the fixed pools.\"},\"floatingDebt()\":{\"notice\":\"Amount of assets lent by the floating pool to accounts.\"},\"initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"notice\":\"Initializes the contract.\"},\"interestRateModel()\":{\"notice\":\"Interest rate model contract used to get the borrow rates.\"},\"isFrozen()\":{\"notice\":\"Flag to prevent new borrows and deposits.\"},\"lastAccumulatorAccrual()\":{\"notice\":\"Last time the accumulator distributed earnings.\"},\"lastAverageUpdate()\":{\"notice\":\"Last time the floating assets average was updated.\"},\"lastFloatingDebtUpdate()\":{\"notice\":\"Last time the floating debt was updated.\"},\"liquidate(address,uint256,address)\":{\"notice\":\"Liquidates undercollateralized fixed/floating (or both) position(s).\"},\"maxFuturePools()\":{\"notice\":\"Number of fixed pools to be active at the same time.\"},\"pause()\":{\"notice\":\"Sets the pause state to true in case of emergency, triggered by an authorized account.\"},\"penaltyRate()\":{\"notice\":\"Rate per second to be charged to delayed fixed pools borrowers after maturity.\"},\"previewBorrow(uint256)\":{\"notice\":\"Simulates the effects of a borrow at the current time, given current contract conditions.\"},\"previewDebt(address)\":{\"notice\":\"Gets all borrows and penalties for an account.\"},\"previewFloatingAssetsAverage()\":{\"notice\":\"Returns the current `floatingAssetsAverage` without updating the storage variable.\"},\"previewRefund(uint256)\":{\"notice\":\"Simulates the effects of a refund at the current time, given current contract conditions.\"},\"previewRepay(uint256)\":{\"notice\":\"Simulates the effects of a repay at the current time, given current contract conditions.\"},\"redeem(uint256,address,address)\":{\"notice\":\"Redeems the owner's floating pool assets to the receiver address.\"},\"refund(uint256,address)\":{\"notice\":\"Repays a certain amount of shares to the floating pool.\"},\"repay(uint256,address)\":{\"notice\":\"Repays a certain amount of assets to the floating pool.\"},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Repays a certain amount to a maturity.\"},\"reserveFactor()\":{\"notice\":\"Percentage factor that represents the liquidity reserves that can't be borrowed.\"},\"rewardsController()\":{\"notice\":\"Address of the rewards controller that will accrue rewards for accounts operating with the Market.\"},\"seize(address,address,uint256)\":{\"notice\":\"Public function to seize a certain amount of assets.\"},\"setAssetSymbol(string)\":{\"notice\":\"Sets name and symbol for the Market.\"},\"setBackupFeeRate(uint256)\":{\"notice\":\"Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity.\"},\"setDampSpeed(uint256,uint256)\":{\"notice\":\"Sets the damp speed used to update the floatingAssetsAverage.\"},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"notice\":\"Sets the factor used when smoothly accruing earnings to the floating pool.\"},\"setFrozen(bool)\":{\"notice\":\"Sets `isFrozen` state, triggered by an authorized account.\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model to be used to calculate rates.\"},\"setMaxFuturePools(uint8)\":{\"notice\":\"Sets the protocol's max future pools for fixed borrowing and lending.\"},\"setPenaltyRate(uint256)\":{\"notice\":\"Sets the penalty rate per second.\"},\"setReserveFactor(uint128)\":{\"notice\":\"Sets the percentage that represents the liquidity reserves that can't be borrowed.\"},\"setRewardsController(address)\":{\"notice\":\"Sets the rewards controller to update account rewards when operating with the Market.\"},\"setTreasury(address,uint256)\":{\"notice\":\"Sets the treasury variables.\"},\"totalAssets()\":{\"notice\":\"Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator.\"},\"totalFloatingBorrowAssets()\":{\"notice\":\"Calculates the total floating debt, considering elapsed time since last update and current interest rate.\"},\"totalFloatingBorrowShares()\":{\"notice\":\"Total amount of floating borrow shares assigned to floating borrow accounts.\"},\"transfer(address,uint256)\":{\"notice\":\"Moves amount of shares from the caller's account to `to`.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Moves amount of shares from `from` to `to` using the allowance mechanism.\"},\"treasury()\":{\"notice\":\"Address of the treasury that will receive the allocated earnings.\"},\"treasuryFeeRate()\":{\"notice\":\"Rate to be charged by the treasury to floating and fixed borrows.\"},\"unpause()\":{\"notice\":\"Sets the pause state to false when threat is gone, triggered by an authorized account.\"},\"withdraw(uint256,address,address)\":{\"notice\":\"Withdraws the owner's floating pool assets to the receiver address.\"},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Withdraws a certain amount from a maturity.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Market.sol\":\"Market\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":70},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\":{\"keccak256\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b83b7afa4d2372da3ba5402fb10860a105c35d79812c60dc61007be2afc17618\",\"dweb:/ipfs/QmYX9xPmbNVSKXrepKiUZiG5oL3SdzFp9a4kqspxX1sEUx\"]},\"@openzeppelin/contracts-upgradeable-v4/access/IAccessControlUpgradeable.sol\":{\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://740cf4dc535e3082560cf5a031473029f322690fc8037fe9d5e3a8bef42e757c\",\"dweb:/ipfs/QmTQxFdfxcaueQa23VX34wAPqzruZbkzyeN58tZK2yav2b\"]},\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e\",\"dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv\"]},\"@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol\":{\"keccak256\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6d362da7417bc7d7cc8623f3d3f8f04c3808d043ee6379568c63a63ec14a124e\",\"dweb:/ipfs/QmYm3wDHUcfGh3MNiRqpWEBbSSYnDSyUsppDATy5DVsfui\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b\",\"dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8b06267c5f80bad727af3e48b1382333d591dad51376399ef2f6b0ee6d58bf95\",\"dweb:/ipfs/QmdU5La1agcQvghnfMpWZGDPz2TUDTCxUwTLKmuMRXBpAx\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/StringsUpgradeable.sol\":{\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f8613145881436fc0480fff22da4868d611e2b0c0c3da083334eb4362ce1945a\",\"dweb:/ipfs/QmPqpP3YeRbBdTJRe6Gv2eGsUaANf4J6RwTNRW36iYahfV\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/introspection/ERC165Upgradeable.sol\":{\"keccak256\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1b13befeb3413749292f9fb229de1c7a509a5ce2c8047d9094fc004ca9d3af89\",\"dweb:/ipfs/QmRzJ2hZSwRtMejHUZAYTPRKgZsnfb112Fno9Jf3EiDfwA\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/introspection/IERC165Upgradeable.sol\":{\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://92ad7e572cf44e6b4b37631b44b62f9eb9fb1cf14d9ce51c1504d5dc7ccaf758\",\"dweb:/ipfs/QmcnbqX85tsWnUXPmtuPLE4SczME2sJaTfmqEFkuAJvWhy\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\":{\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2b2835c737d073ef8b82a4cc246495a9740f43e7ff2cf130906b2449ff9bfb91\",\"dweb:/ipfs/QmSCWfNoSvvTN57ic7o1RW6NqSxxGAqbBTnLKc7QHe27qB\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/math/SignedMathUpgradeable.sol\":{\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://88ace2d60f265752f18903d839910be4e4e104340b2957678585b812447825d4\",\"dweb:/ipfs/QmXFkNxMc3AAGzhs2wUEZyErWQjsvoTGyYjuU5oZkFki5Z\"]},\"@openzeppelin/contracts-v4/utils/math/Math.sol\":{\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c\",\"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS\"]},\"@openzeppelin/contracts-v4/utils/math/SafeCast.sol\":{\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://495145362c7ff1c9ca88c58bbbbcb412e3c2004406647412394486552ff6c278\",\"dweb:/ipfs/QmNNCeng6d5eRPDn6tkWSQhjE39XWfQEfjA63rRwHmr1iH\"]},\"contracts/Auditor.sol\":{\"keccak256\":\"0x5110a03bc02c12d47bc64ccb39250e2c9eaa4c4089e63ed143e0513bf7ede5d8\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e61331e636beec80bc57e2b751fa672ee98dab4fb489c9ea4cf19cd68acbddfd\",\"dweb:/ipfs/QmPgu5ZNy8b7ywz6fX658A5ETWTKdGLXCwtX5eAPEiZfH8\"]},\"contracts/InterestRateModel.sol\":{\"keccak256\":\"0x21b3897afb0da4e23559f3122f2292deb79516d8850a4995ece47b8c4d278004\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://a8aad4f1b7340db20e72e3c115e951ad5c71c87fb6139729f9b3279289f82908\",\"dweb:/ipfs/QmZ1UAp33jbcHJZFmsDSokVM6tSCPTPXi3zEranQDP4ZQE\"]},\"contracts/Market.sol\":{\"keccak256\":\"0xea262e9a46d356f8626b4ea1d2bf9017e009b3d4f95809f5f33331b0236b3ce6\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e05e0132c04440fa2a3bd7d991940f4f14f70efe0414f7b8085f5a2247aea6ec\",\"dweb:/ipfs/QmWwjTo5nRbuY1GywEXUPdA9tDvN6CgA8pL147dQdPTacW\"]},\"contracts/RewardsController.sol\":{\"keccak256\":\"0xab502e9e6c6fdd56878d80fde0aee78c360234b15b1db8d7cb6508fe3c430163\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://08502c85c6753a61ff24aeab55809674dd47cb206ad02aa615c81a53820acb06\",\"dweb:/ipfs/Qmazc5RbGCq7QXsuqqfkC5yC4LgkTUQLg5Xn1YCyi5Rxi4\"]},\"contracts/utils/FixedLib.sol\":{\"keccak256\":\"0x9eb04f02cac9a0c2fd049587524799c8ab4fa1840d9550bad02d87d81074187c\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://885545fb71ae6e82d70b364dd2fc021e25435b01131f1e7a63755c303a350928\",\"dweb:/ipfs/QmaejvpPc1qX1GWvwodnUaHgKzob8WpsU3kz84qpk7vRn3\"]},\"contracts/utils/IPriceFeed.sol\":{\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://b06913f9c7e4fe67bbb1ddf3d9335a2a6c0e7a537aae8ed7d8b5825c61e80514\",\"dweb:/ipfs/Qmb34jWcW4Pv8Upsq2rtoYoncPHoUgDUET6JHBBsTo583L\"]},\"solmate/src/mixins/ERC4626.sol\":{\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1dca20fc42d20ce7b6023fafd744dc7e91ed2d1f6c5f1fb45e3004b1d5f33100\",\"dweb:/ipfs/Qmf7MtQTTSJYEhsJ3HDmegt4PFSG13msyFAv4DFAoqyypa\"]},\"solmate/src/tokens/ERC20.sol\":{\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb440672ebad7d487c1600e406e140fd1ffc4bd7520c86b5709183ca2602da58\",\"dweb:/ipfs/QmNgZaBoAZwnwm4mTL1cUZnMtvt1iZnruMnfpJnDu6upuc\"]},\"solmate/src/utils/FixedPointMathLib.sol\":{\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://737232ccd46bfbe6f34a3e5bc24c345777da47e6ea27bcc46d2c3931883c2257\",\"dweb:/ipfs/QmeA6ikG9dQKZgkJYUVGXcApuCii34h7qtmguToRdSU3qZ\"]},\"solmate/src/utils/SafeTransferLib.sol\":{\"keccak256\":\"0xbb4580ec2c735b5f31bb176567c886a87c2800b3eff132eda15ddc2b28cc2932\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://27ce4609ece6f8635dafd662cf8a45a4e0b5c3240e6f26c6b0081df880039152\",\"dweb:/ipfs/QmYPBJ1DPeFNUTPSPka3G9iwpSfbyJnYQeo5YGvbfyQFGC\"]}},\"version\":1}", + "bytecode": "0x610120604052348015610010575f80fd5b5060405161651138038061651183398101604081905261002f9161021c565b8160405180602001604052805f81525060405180602001604052805f8152508181846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100b09190610254565b60c96100bc8482610313565b5060ca6100c98382610313565b5060ff81166080524660a0526100dd610108565b60c0525050506001600160a01b0392831660e05250508116610100526101016101a1565b505061043e565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c960405161013991906103cd565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f54610100900460ff16156101b4575f80fd5b5f5460ff90811614610203575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610219575f80fd5b50565b5f806040838503121561022d575f80fd5b825161023881610205565b602084015190925061024981610205565b809150509250929050565b5f60208284031215610264575f80fd5b815160ff81168114610274575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102a357607f821691505b6020821081036102c157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561030e57805f5260205f20601f840160051c810160208510156102ec5750805b601f840160051c820191505b8181101561030b575f81556001016102f8565b50505b505050565b81516001600160401b0381111561032c5761032c61027b565b6103408161033a845461028f565b846102c7565b6020601f821160018114610372575f831561035b5750848201515b5f19600385901b1c1916600184901b17845561030b565b5f84815260208120601f198516915b828110156103a15787850151825560209485019460019092019101610381565b50848210156103be57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f8083546103da8161028f565b6001821680156103f1576001811461040657610433565b60ff1983168652811515820286019350610433565b865f5260205f205f5b8381101561042b5781548882015260019091019060200161040f565b505081860193505b509195945050505050565b60805160a05160c05160e05161010051615ff561051c5f395f81816107840152818161154d015281816116fe01528181611d7a01528181611faa01528181612184015281816124b201528181612e8b0152818161303c0152818161312e015281816136700152614b2801525f8181610734015281816115be01528181611b7101528181611c650152818161206c015281816122780152818161233f0152818161282e01528181612e0d015281816136e101528181614cb2015281816151cd01526152cf01525f611bde01525f611ba901525f6106cb0152615ff55ff3fe608060405234801561000f575f80fd5b50600436106104c1575f3560e01c80636e76fc8f11610283578063b2a02ff111610168578063d5164184116100e0578063e63ab1e91161009a578063e63ab1e914610c98578063e94b3c2114610cac578063eee8c9e014610cb5578063ef8b30f714610cbd578063f3fdb15a14610cd0578063fb0fc4c314610ce3578063fea45d9414610cfa575f80fd5b8063d516418414610c04578063d547741f14610c17578063d6b7494f14610c2a578063d905777e14610c33578063dd62ed3e14610c5b578063e00b262514610c85575f80fd5b8063b2a02ff114610af7578063b3d7f6b914610b0a578063b460af9414610b1d578063ba08765214610b30578063bee36bb314610b43578063bf722ca214610b56578063c63d75b6146107ae578063c6e6f59214610b69578063ccfd8b1114610b7c578063ce96cb7714610bad578063d2681a0b14610bc0578063d505accf14610bf1575f80fd5b806391d14854116101fb57806391d1485414610a32578063926bb63314610a4557806394bf804d14610a5857806395d89b4114610a6b57806397bce8d014610a73578063a05a091a14610a86578063a16a885014610a99578063a1bab44714610aae578063a1e8f02b14610ac1578063a217fddf14610aca578063a9059cbb14610ad1578063acb7081514610ae4575f80fd5b80636e76fc8f146109325780636eb9ffeb1461095957806370a082311461098557806378007e23146109a45780637ad226dc146109b75780637e932d32146109ca5780637ecebe00146109dd5780638456cb59146109fc5780638a1baa4614610a045780638bcd401614610a0d5780638c3cba5a14610a205780638d0e5f0214610a29575f80fd5b8063313ce567116103a95780634322b714116103215780634322b714146107d557806347dffde0146107fc5780634914c0081461080f5780634cdad506146108225780634e7c5059146108355780635c975abb146108895780635cc2ef83146108945780635e5c06e2146108a757806361d027b3146108f057806366601032146109035780636bb65f531461090c5780636e553f651461091f575f80fd5b8063313ce567146106c657806333eeb147146106ed57806334f7d1f2146107015780633644e5151461071457806336568abe1461071c57806338d52e0f1461072f5780633aa18d6f146107635780633c6f317f1461076c5780633ec045a61461077f5780633f4ba83a146107a6578063402d267d146107ae57806342da42bf146107c2575f80fd5b8063137001011161043c57806313700101146105e557806318160ddd146105f85780631a5b9e62146106015780631a90f186146106145780631d43b30b1461061d57806323b872dd14610630578063248a9ca31461064357806325fc07a91461066557806328acf2cf146106845780632c5dcc77146106975780632e0af008146106aa5780632f2ff15d146106b3575f80fd5b8063014a296f146104c557806301e1d114146104f257806301ffc9a714610508578063022d8af51461052b5780630539fa8c1461054057806306fdde031461054957806307a2d13a1461055e578063095ea7b3146105715780630a28a477146105845780630ab69be8146105975780630e52dbec146105be5780630f2b75aa146105dd575b5f80fd5b6104d86104d336600461564e565b610d0d565b604080519283526020830191909152015b60405180910390f35b6104fa610d42565b6040519081526020016104e9565b61051b610516366004615669565b610dee565b60405190151581526020016104e9565b61053e6105393660046156ab565b610e24565b005b6104fa60d85481565b610551610eab565b6040516104e991906156c4565b6104fa61056c3660046156f9565b610f37565b61051b61057f366004615710565b610f63565b6104fa6105923660046156f9565b610fce565b6104d86105a53660046156f9565b5f90815260d16020526040902080546001909101549091565b60da546105cb9060ff1681565b60405160ff90911681526020016104e9565b6104fa610fed565b61053e6105f3366004615777565b611092565b6104fa60cb5481565b6104fa61060f3660046157b5565b611103565b6104fa60d45481565b6104fa61062b36600461564e565b6115f3565b61051b61063e366004615807565b6116f3565b6104fa6106513660046156f9565b5f9081526065602052604090206001015490565b6104fa6106733660046156f9565b5f90815260d1602052604090205490565b61053e610692366004615855565b61185a565b61053e6106a5366004615710565b6118a6565b6104fa60dd5481565b61053e6106c136600461586e565b611916565b6105cb7f000000000000000000000000000000000000000000000000000000000000000081565b60e35461051b90600160a01b900460ff1681565b6104fa61070f36600461589c565b61193f565b6104fa611ba6565b61053e61072a36600461586e565b611c00565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b6040516104e991906158da565b6104fa60d95481565b6104fa61077a36600461589c565b611c22565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b61053e611c95565b6104fa6107bc36600461564e565b505f1990565b61053e6107d03660046156f9565b611cb7565b60dc546107ef90600160801b90046001600160801b031681565b6040516104e991906158ee565b6104fa61080a3660046156f9565b611cf6565b6104fa61081d366004615902565b611d14565b6104fa6108303660046156f9565b6121f0565b6108696108433660046156f9565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016104e9565b60975460ff1661051b565b61053e6108a2366004615941565b6121fa565b6108d56108b536600461564e565b60d26020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016104e9565b60e154610756906001600160a01b031681565b6104fa60e25481565b60e354610756906001600160a01b031681565b6104fa61092d36600461586e565b612254565b6104fa7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da5461097090600160281b900463ffffffff1681565b60405163ffffffff90911681526020016104e9565b6104fa61099336600461564e565b60cc6020525f908152604090205481565b6104fa6109b23660046156f9565b6122fa565b6104d86109c536600461586e565b612311565b61053e6109d8366004615961565b61236e565b6104fa6109eb36600461564e565b60ce6020525f908152604090205481565b61053e6123eb565b6104fa60d55481565b61053e610a1b36600461564e565b6123fd565b6104fa60d35481565b6104fa60df5481565b61051b610a4036600461586e565b61247d565b61053e610a5336600461564e565b6124a7565b6104fa610a6636600461586e565b612815565b6105516128b0565b61053e610a81366004615980565b6128bd565b6104fa610a943660046157b5565b612a1c565b60da5461097090610100900463ffffffff1681565b61053e610abc3660046156f9565b612e41565b6104fa60d75481565b6104fa5f81565b61051b610adf366004615710565b612e80565b6104d8610af236600461586e565b612fdd565b61053e610b05366004615807565b612ff9565b6104fa610b183660046156f9565b61300d565b6104fa610b2b366004615a2b565b613023565b6104fa610b3e366004615a2b565b61312b565b61053e610b5136600461564e565b613228565b6104fa610b643660046156f9565b61327c565b6104fa610b773660046156f9565b61329b565b6104d8610b8a36600461586e565b60cf60209081525f92835260408084209091529082529020805460019091015482565b6104fa610bbb36600461564e565b6132b2565b6104d8610bce36600461586e565b60d060209081525f92835260408084209091529082529020805460019091015482565b61053e610bff366004615a5f565b6132d3565b6104fa610c12366004615a2b565b613498565b61053e610c2536600461586e565b613713565b6104fa60d65481565b6104fa610c4136600461564e565b6001600160a01b03165f90815260cc602052604090205490565b6104fa610c69366004615ac9565b60cd60209081525f928352604080842090915290825290205481565b61053e610c933660046156ab565b613737565b6104fa5f80516020615f8083398151915281565b6104fa60de5481565b6104fa61378b565b6104fa610ccb3660046156f9565b61386c565b60db54610756906001600160a01b031681565b60da5461097090600160481b900463ffffffff1681565b60dc546107ef906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610d3090610f37565b610d39846115f3565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610db4575f81815260d160205260409020600381015480831115610da857824210610d8e578160020154610da3565b6002820154610da39042839003838603613876565b860195505b50506224ea0001610d5c565b50610dd760e254670de0b6b3a76400000360d454610dd061378b565b0390613894565b610ddf6138a8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610e1e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610e2e8161391e565b610e36613928565b60dd5f828254610e469190615b1d565b90915550610e5490506139a1565b60dc80546001600160801b0319166001600160801b0384161790556040517f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e90610e9f9084906158ee565b60405180910390a15050565b60c98054610eb890615b30565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee490615b30565b8015610f2f5780601f10610f0657610100808354040283529160200191610f2f565b820191905f5260205f20905b815481529060010190602001808311610f1257829003601f168201915b505050505081565b60cb545f908015610f5a57610f55610f4d610d42565b849083613876565b610f5c565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fbd9086815260200190565b60405180910390a350600192915050565b60cb545f908015610f5a57610f5581610fe5610d42565b859190613a07565b60dd5460de545f9190828183106110065760d85461100a565b60d9545b60da549091505f906110459061102d90600160481b900463ffffffff1642615b68565b6110379084615b7b565b61104090615b92565b613a34565b61105790670de0b6b3a7640000615bac565b90506110638185613894565b61107f61107883670de0b6b3a7640000615b68565b8590613894565b6110899190615b1d565b94505050505090565b5f61109c8161391e565b82826040516020016110af929190615bcb565b60405160208183030381529060405260c990816110cc9190615c46565b5082826040516020016110e0929190615d00565b60405160208183030381529060405260ca90816110fd9190615c46565b50505050565b5f61110c613ba7565b611114613bb6565b845f036111345760405163774257f760e01b815260040160405180910390fd5b60da5461114890879060ff1660035f613be1565b5f86815260d160205260409020611165611160613d7b565b613e89565b61116f8188613ec6565b60dd5f82825461117f9190615b1d565b909155505060e3546001600160a01b031680156111f057604051636c912dad60e01b81526001600160a01b03821690636c912dad906111c29087906004016158da565b5f604051808303815f87803b1580156111d9575f80fd5b505af11580156111eb573d5f803e3d5ffd5b505050505b5f6111fb8389613f44565b9050801561127f575f8160d3546112129190615b1d565b60dc549091506112509061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b60dd54906001600160801b0316613894565b60d45461125d9083615b1d565b111561127b57604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061128a610fed565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff166112d88a600101548b5f015489613f80565b6112e28888613fad565b6112ef898960d354613fc5565b6040518663ffffffff1660e01b815260040161130f959493929190615d3d565b602060405180830381865afa15801561132a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061134e9190615d63565b905061137361136c611360428f615b68565b83906301e13380613876565b8c90613fe1565b935050505080886113849190615b1d565b9350868411156113a757604051632c1b6b4160e21b815260040160405180910390fd5b6113b18585613ff5565b5f89815260d0602090815260408083206001600160a01b038916845290915281208054909103611408576001600160a01b0386165f90815260d2602052604090206001810154611401908c61406b565b6001909101555b5f8061144b61141685614154565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614180565b91509150815f1461146f5781866002015f8282546114699190615b1d565b90915550505b611478816141cc565b60405180604001604052808c855f01546114929190615b1d565b81526020018585600101546114a79190615b1d565b90525f8d815260d0602090815260408083206001600160a01b03808e168086529184529382902085518155949092015160019094019390935591519194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139061151d9033908e908890615d7a565b60405180910390a461152d6139a1565b611536896141f8565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906115849030908990600401615d9b565b5f604051808303815f87803b15801561159b575f80fd5b505af11580156115ad573d5f803e3d5ffd5b506115e79250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614246565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b81156116c85760018216156116ad575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916116689190615b1d565b90506116748188615b1d565b9650824211156116aa5761169d8561168c8542615b68565b6116969190615b7b565b8290613894565b6116a79088615b1d565b96505b50505b60019190911c906116c16224ea0082615b1d565b9050611624565b600284015480156116e9576116dc81611cf6565b6116e69087615b1d565b95505b5050505050919050565b5f6116fc613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53086611736866121f0565b6040518463ffffffff1660e01b815260040161175493929190615db5565b5f6040518083038186803b15801561176a575f80fd5b505afa15801561177c573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561184657604051630149e46f60e01b81526001600160a01b03821690630149e46f906117bf9088906004016158da565b5f604051808303815f87803b1580156117d6575f80fd5b505af11580156117e8573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f91506118189087906004016158da565b5f604051808303815f87803b15801561182f575f80fd5b505af1158015611841573d5f803e3d5ffd5b505050505b611851858585614291565b95945050505050565b5f6118648161391e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610e9f565b5f6118b08161391e565b6118bb611160613d7b565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119308161391e565b61193a838361436b565b505050565b5f611948613ba7565b611950613bb6565b835f03611970576040516356316e8760e01b815260040160405180910390fd5b60da5461198490869060ff1660035f613be1565b5f85815260d1602052604081209061199c8288613ec6565b90506119a9611160613d7b565b8060dd5f8282546119ba9190615b1d565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f9182916119ff918a906143f0565b9092509050611a0e8289615b1d565b945086851015611a3157604051632c1b6b4160e21b815260040160405180910390fd5b611a3b8489614441565b60d35f828254611a4b9190615b68565b90915550611a5b90508183615b1d565b846002015f828254611a6d9190615b68565b925050819055508060d55f828254611a859190615b1d565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611ada576001600160a01b0387165f90815260d2602052604090208054611ad7908c61406b565b90555b88815f015f828254611aec9190615b1d565b9250508190555082816001015f828254611b069190615b1d565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611b5b6139a1565b611b648a6141f8565b611b996001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614471565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611bdb57611bd66144c9565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611c14575f80fd5b611c1e8282614562565b5050565b5f611c2b613ba7565b60da54611c4090869060ff1660036002613be1565b611c4e8585858560016145c8565b9050611c586139a1565b611c8d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b949350505050565b5f80516020615f80833981519152611cac8161391e565b611cb4614952565b50565b5f611cc18161391e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610e9f565b60df545f908015610f5a57610f55611d0c61378b565b849083613a07565b5f611d1d613ba7565b6001600160a01b0384163303611d46576040516344511af160e01b815260040160405180910390fd5b611d4e613928565b60dd5f828254611d5e9190615b1d565b909155505060405163042dcf6b60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890611db5903090869089908990600401615dd9565b602060405180830381865afa158015611dd0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df49190615d63565b9250825f03611e165760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611e5057508515155b15611f5d576001821615611f42575f81421015611e8757611e748288898b5f6145c8565b9050611e808188615b68565b9650611f34565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611eb99190615b1d565b9150505f611ee060d6548542611ecf9190615b68565b611ed99190615b7b565b8390613894565b611eea9083615b1d565b9050888111611ef95788611f04565b611f04898383613876565b9250825f03611f15575f9850611f31565b611f2284848b8d5f6145c8565b9250611f2e838a615b68565b98505b50505b611f3e8186615b1d565b9450505b60019190911c90611f566224ea0082615b1d565b9050611e42565b50508315801590611f715750600281015415155b15611fa6575f611f808561327c565b90508015611fa4575f611f938288614994565b509050611fa08185615b1d565b9350505b505b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1b003130878a886040518563ffffffff1660e01b8152600401611ffa9493929190615dd9565b6040805180830381865afa158015612014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120389190615e03565b915091508160d55f82825461204d9190615b1d565b90915550612094905033306120628588615b1d565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614471565b306001600160a01b038616036120b5576120b030338984614af1565b61211a565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906120e59033908b908690600401615db5565b5f604051808303815f87803b1580156120fc575f80fd5b505af115801561210e573d5f803e3d5ffd5b5050505061211a6139a1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906121b9908a906004016158da565b5f604051808303815f87803b1580156121d0575f80fd5b505af11580156121e2573d5f803e3d5ffd5b505050505050509392505050565b5f610e1e82610f37565b5f6122048161391e565b61220c614cd9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61225e8361386c565b9050805f0361226b575f80fd5b6122a06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614471565b6122aa8282614d04565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8382614d7a565b60df545f908015610f5a57610f5581610fe561378b565b5f8061231b613ba7565b6123258484614994565b90925090506123326139a1565b6123676001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614471565b9250929050565b5f6123788161391e565b60e35460ff600160a01b90910416151582151514611c1e5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee698906123df90851515815260200190565b60405180910390a25050565b6123f3614dd9565b6123fb614e42565b565b5f6124078161391e565b60db546001600160a01b03161561242357612423611160613d7b565b60db80546001600160a01b0319166001600160a01b0384161790556124466139a1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146124f0576040516317568c8f60e21b815260040160405180910390fd5b6124f8613928565b60dd5f8282546125089190615b1d565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b811561276c576001821615612751575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916125849190615b1d565b905080861061274e5760e3546001600160a01b031680156125f957604051636c912dad60e01b81526001600160a01b03821690636c912dad906125cb908c906004016158da565b5f604051808303815f87803b1580156125e2575f80fd5b505af11580156125f4573d5f803e3d5ffd5b505050505b6126038288615b68565b965061260f8287615b1d565b83545f86815260d1602052604081209298509161262b91614e7f565b905080156126c4578060d35f8282546126449190615b68565b909155505083545f906126739061265b9084614e9e565b5f88815260d160205260409020600201549084613876565b90508060d15f8881526020019081526020015f206002015f8282546126989190615b68565b925050819055508060d55f8282546126b09190615b1d565b909155506126c09050818a615b1d565b9850505b5f85815260d0602090815260408083206001600160a01b038e16845290915281208181556001908101919091558901546126fe9086614eb3565b60018a015560408051848152602081018590526001600160a01b038c1691339188917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a450505b50505b60019190911c906127656224ea0082615b1d565b9050612540565b60028501541580159061278957506127838461327c565b93508315155b156127aa575f6127998588614994565b5090506127a68185615b1d565b9350505b8215612805578260d55f8282546127c19190615b68565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b61280d6139a1565b505050505050565b5f61281f8361300d565b90506128566001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b6128608284614d04565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8184614d7a565b60ca8054610eb890615b30565b5f54610100900460ff16158080156128db57505f54600160ff909116105b806128f45750303b1580156128f457505f5460ff166001145b6128fc575f80fd5b5f805460ff19166001179055801561291d575f805461ff0019166101001790555b612925614f72565b61292d614f84565b60da805468ffffffffffffffff0019166101004263ffffffff1690810263ffffffff60281b191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129805f3361436b565b61298a8b8b611092565b6129938961185a565b61299c88610e24565b6129a5876123fd565b6129ae86612e41565b6129b785611cb7565b6129c084613737565b6129ca83836121fa565b8015612a0f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a25613ba7565b845f03612a455760405163b8cb621960e01b815260040160405180910390fd5b60da54612a5a90879060ff1660036002613be1565b5f86815260d160205260409020612a72611160613d7b565b612a7c8188613ec6565b60dd5f828254612a8c9190615b1d565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612ad69190615b1d565b871115612af15760208101518151612aee9190615b1d565b96505b6040805180820190915281518152602080830151908201525f90612b2190612b19908a614f9e565b518490614fe4565b60d354612b2e9190615b1d565b905060dd5460d45482612b419190615b1d565b1115612b5f57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612c71575f612b73610fed565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bc78a600101548b5f01548a613f80565b612bd18989613fad565b612bdc8a8a8a613fc5565b6040518663ffffffff1660e01b8152600401612bfc959493929190615d3d565b602060405180830381865afa158015612c17573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c3b9190615d63565b9050612c66612c4d611360428f615b68565b612c5f90670de0b6b3a7640000615b1d565b8c90615028565b965050505050612c75565b8692505b85831015612c9657604051632c1b6b4160e21b815260040160405180910390fd5b612ca08484613ff5565b5f80612cec612cb7612cb2878c615b68565b614154565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614180565b9150915081846002015f828254612d039190615b1d565b90915550612d129050816141cc565b612d1c838a61503c565b5060208301518351175f03612d6f575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612d68908c614eb3565b9055612d9f565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b856001600160a01b0316876001600160a01b03168b7fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c338d8a604051612de793929190615d7a565b60405180910390a4612df76139a1565b612e008a6141f8565b612e346001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614246565b5050505095945050505050565b5f612e4b8161391e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610e9f565b5f612e89613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612ec3866121f0565b6040518463ffffffff1660e01b8152600401612ee193929190615db5565b5f6040518083038186803b158015612ef7575f80fd5b505afa158015612f09573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015612fd357604051630149e46f60e01b81526001600160a01b03821690630149e46f90612f4c9033906004016158da565b5f604051808303815f87803b158015612f63575f80fd5b505af1158015612f75573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f9150612fa59087906004016158da565b5f604051808303815f87803b158015612fbc575f80fd5b505af1158015612fce573d5f803e3d5ffd5b505050505b611c8d848461509a565b5f80612fe7613ba7565b612325612ff38561327c565b84614994565b613001613ba7565b61193a33848484614af1565b60cb545f908015610f5a57610f55611d0c610d42565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db59061307590309086908990600401615db5565b5f6040518083038186803b15801561308b575f80fd5b505afa15801561309d573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561310e57604051630149e46f60e01b81526001600160a01b03821690630149e46f906130e09086906004016158da565b5f604051808303815f87803b1580156130f7575f80fd5b505af1158015613109573d5f803e3d5ffd5b505050505b6131198585856150fd565b91506131236139a1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53084613166886121f0565b6040518463ffffffff1660e01b815260040161318493929190615db5565b5f6040518083038186803b15801561319a575f80fd5b505afa1580156131ac573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561321d57604051630149e46f60e01b81526001600160a01b03821690630149e46f906131ef9086906004016158da565b5f604051808303815f87803b158015613206575f80fd5b505af1158015613218573d5f803e3d5ffd5b505050505b6131198585856151f4565b5f6132328161391e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f908015610f5a57610f558161329361378b565b859190613876565b60cb545f908015610f5a57610f5581613293610d42565b6001600160a01b0381165f90815260cc6020526040812054610e1e90610f37565b428410156132df575f80fd5b5f60016132ea611ba6565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156133f2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134285750876001600160a01b0316816001600160a01b0316145b613430575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134a1613ba7565b6134a9613bb6565b835f036134c95760405163774257f760e01b815260040160405180910390fd5b6134d38285613ff5565b60e3546001600160a01b0316801561353f57604051636c912dad60e01b81526001600160a01b03821690636c912dad906135119086906004016158da565b5f604051808303815f87803b158015613528575f80fd5b505af115801561353a573d5f803e3d5ffd5b505050505b61354a611160613d7b565b613553856122fa565b91505f8560d4546135649190615b1d565b60d481905560dc549091506135959061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b8160d3546135a39190615b1d565b11156135c157604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135d29190615b1d565b90915550506001600160a01b0384165f90815260d2602052604081206002018054859290613601908490615b1d565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136596139a1565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906136a79030908890600401615d9b565b5f604051808303815f87803b1580156136be575f80fd5b505af11580156136d0573d5f803e3d5ffd5b5061370a9250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614246565b50509392505050565b5f8281526065602052604090206001015461372d8161391e565b61193a8383614562565b5f6137418161391e565b60dc80546001600160801b03808516600160801b0291161790556040517fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90610e9f9084906158ee565b60d45460dd5460da545f929190839061385890613851906137b990600160281b900463ffffffff1642615b68565b60db546301e13380906001600160a01b0316637c21fb1d6137da888a613fad565b6137e7898b60d354613fc5565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613826573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061384a9190615d63565b9190613876565b8490613894565b90506138648184615b1d565b935050505090565b5f610e1e8261329b565b82820281151584158583048514171661388d575f80fd5b0492915050565b5f610f5c8383670de0b6b3a7640000613876565b60da545f9081906138c490610100900463ffffffff1642615b68565b9050805f036138d4575f91505090565b60da54613918908290613904906138f2906224ea009060ff16615b7b565b60dc546001600160801b031690613894565b61390e9084615b1d565b60d5549190613876565b91505090565b611cb481336152f6565b5f6139316138a8565b90508060d55f8282546139449190615b68565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a1e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a4d57505f919050565b680755bf798b4a1bf1e58212613a61575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156123fb575f80fd5b60e354600160a01b900460ff16156123fb5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613bef6224ea0086615e25565b15613bfc57506001613c4f565b428511613c0b57506002613c4f565b613c1b60ff85166224ea00615b7b565b613c286224ea0042615e25565b613c329042615b68565b613c3c9190615b1d565b851115613c4b57506004613c4f565b5060035b826004811115613c6157613c61615e38565b816004811115613c7357613c73615e38565b14158015613ca35750816004811115613c8e57613c8e615e38565b816004811115613ca057613ca0615e38565b14155b15613d74575f826004811115613cbb57613cbb615e38565b03613d0f57806004811115613cd257613cd2615e38565b836004811115613ce457613ce4615e38565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d2157613d21615e38565b836004811115613d3357613d33615e38565b836004811115613d4557613d45615e38565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d06565b5050505050565b60d45460dd545f919082613d8f8284613fad565b60da549091505f90613de19061107890613db690600160281b900463ffffffff1642615b68565b60db5460d3546301e13380916001600160a01b031690637c21fb1d9088906137e7908b908d90613fc5565b9050613ded8185615b1d565b9350613e0460e2548261389490919063ffffffff16565b945084613e118285615b1d565b613e1b9190615b68565b60dd5560d484905560da805463ffffffff60281b1916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611cb45760e154613ead906001600160a01b0316613ea88361386c565b614d04565b8060dd5f828254613ebe9190615b1d565b909155505050565b60038201545f9042831115613f1a5760028401544260038601819055613f0390613ef1908490615b68565b613efb8487615b68565b839190613876565b9250613f0f8382615b68565b600286015550613f3d565b828103613f29575f9150613f3d565b600384018390556002840180545f90915591505b5092915050565b81545f9081613f538483615b1d565b9050613f6c613f6683876001015461533c565b82614e9e565b613f769082615b68565b9455509192915050565b5f8115801590613f8f57508383115b613f99575f611c8d565b611c8d82613fa78686615b68565b9061534a565b5f825f03613fbb575f610f5c565b610f5c828461534a565b5f835f03613fd3575f611c8d565b611c8d84613fa78486615b1d565b5f610f5c8383670de0b6b3a7640000613a07565b336001600160a01b03831614611c1e576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461193a5761403982610fce565b6140439082615b68565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f036140805750600160201b8117610e1e565b63ffffffff8316808310156140fd575f6224ea0061409e8584615b68565b6140a89190615e4c565b90506140b681610100615b68565b85901c156140d75760405163293cc41f60e21b815260040160405180910390fd5b6140e2816020615b1d565b602086901c901b9450848417600160201b1792505050610e1e565b5f6224ea0061410c8386615b68565b6141169190615e4c565b905060df81111561413a5760405163293cc41f60e21b815260040160405180910390fd5b614145816020615b1d565b6001901b851792505050610e1e565b5f8061416b60e2548461389490919063ffffffff16565b905061417681613e89565b610f5c8184615b68565b5f8082156141b4576141af61419d6141978761535e565b85614e9e565b6141a79085615b68565b859085613876565b6141b6565b5f5b90506141c28185615b68565b9150935093915050565b805f036141d65750565b60e254156141e757611cb481613e89565b8060d55f828254613ebe9190615b1d565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806110fd575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142ea576142c68382615b68565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614311908490615b68565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615fa0833981519152906143589087815260200190565b60405180910390a3506001949350505050565b614375828261247d565b611c1e575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f6143fc8661535e565b905080156144385761441d6144118683614e9e565b60408801519083613876565b92506144298385613894565b91506144358284615b68565b92505b50935093915050565b815460018301545f91906144558482615b1d565b60018601556118516144678383614e9e565b6141979084615b68565b5f6040516323b872dd60e01b5f526001600160a01b0385166004526001600160a01b0384166024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d74575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144fa9190615e5f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61456c828261247d565b15611c1e575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145e95760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906146018289613ec6565b905061460e611160613d7b565b8060dd5f82825461461f9190615b1d565b90915550505f88815260d0602090815260408083206001600160a01b0389168452825280832081518083019092528054808352600190910154928201839052909291614675918b9161467091615b1d565b614e9e565b6040805180820190915283518152602080850151908201529091505f9061469c9083614f9e565b5160e3549091506001600160a01b0316801561470c57604051636c912dad60e01b81526001600160a01b03821690636c912dad906146de908c906004016158da565b5f604051808303815f87803b1580156146f5575f80fd5b505af1158015614707573d5f803e3d5ffd5b505050505b8b4210156147d45760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147549186906143f0565b90925090506147638183615b1d565b886002015f8282546147759190615b68565b909155505089156147a8578060d55f8282546147919190615b1d565b909155506147a190508286615b68565b98506147cd565b6147b28183615b1d565b60d55f8282546147c29190615b1d565b925050819055508498505b505061481b565b60d6546147ef906147e58e42615b68565b6138519190615b7b565b6147f99084615b1d565b96506148058388615b68565b60d55f8282546148159190615b1d565b90915550505b8987111561483c57604051632c1b6b4160e21b815260040160405180910390fd5b6148468683614e7f565b60d35f8282546148569190615b68565b909155506148669050848461503c565b5060208401518451175f036148c2575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d2909252909120908101546148b7908e614eb3565b6001909101556148f2565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a46149438c6141f8565b50505050505095945050505050565b61495a61537c565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516139fd91906158da565b60e3545f9081906001600160a01b03168015614a0457604051636c912dad60e01b81526001600160a01b03821690636c912dad906149d69087906004016158da565b5f604051808303815f87803b1580156149ed575f80fd5b505af11580156149ff573d5f803e3d5ffd5b505050505b614a0f611160613d7b565b6001600160a01b0384165f90815260d2602052604090206002810154614a358782614e9e565b9350614a4084611cf6565b9450845f03614a625760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a739190615b68565b90915550614a8390508482615b68565b82600201819055508360df5f828254614a9c9190615b68565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614b115760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e16ee72090614b5f9087903090600401615d9b565b5f6040518083038186803b158015614b75575f80fd5b505afa158015614b87573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bf857604051630149e46f60e01b81526001600160a01b03821690630149e46f90614bca9086906004016158da565b5f604051808303815f87803b158015614be1575f80fd5b505af1158015614bf3573d5f803e3d5ffd5b505050505b5f614c0283610fce565b9050614c0e838261538a565b614c188482615403565b60408051848152602081018390526001600160a01b03808716929088169133915f80516020615f60833981519152910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c9591815260200190565b60405180910390a3614ca56139a1565b61280d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614246565b614ce1610fed565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d7057604051630149e46f60e01b81526001600160a01b03821690630149e46f90614d429086906004016158da565b5f604051808303815f87803b158015614d59575f80fd5b505af1158015614d6b573d5f803e3d5ffd5b505050505b61193a838361546a565b614d82613ba7565b614d8a613bb6565b614d92614cd9565b5f614d9b613d7b565b90505f614da6613928565b9050614db28482615b1d565b60dd5f828254614dc29190615b1d565b90915550614dd1905082613e89565b6110fd6139a1565b614e037f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361247d565b158015614e245750614e225f80516020615f808339815191523361247d565b155b156123fb57604051631d006fdb60e31b815260040160405180910390fd5b614e4a613ba7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586149873390565b815460018301545f9190614e938483615b68565b855561185161446783835b5f818310614eac5781610f5c565b5090919050565b5f821580614ec6575081600160201b1783145b15614ed257505f610e1e565b63ffffffff8316808303614f4057602184901c60015b60018216158015614ef857508115155b15614f0957600191821c9101614ee8565b6020614f158282615b1d565b9690961c90951b9485614f2b6224ea0083615b7b565b614f359087615b1d565b179350505050610e1e565b6224ea00614f4e8285615b68565b614f589190615e4c565b614f63906020615b1d565b6001901b198416915050610e1e565b5f54610100900460ff166123fb575f80fd5b5f54610100900460ff16614f96575f80fd5b6123fb6154b9565b604080518082019091525f8082526020820152825160208401515f91614fc8916132939082615b1d565b8085529050614fd78184615b68565b6020850152509192915050565b815460018301545f919082614ff98583615b68565b90506150058184614e9e565b61500f8385614e9e565b6150199190615b68565b60019096015550929392505050565b5f610f5c83670de0b6b3a764000084613876565b604080518082019091525f8082526020820152602083015183515f9161506191615b1d565b90505f61506e8483615b68565b855190915061507f90829084613876565b80865261508c9082615b68565b602086015250929392505050565b335f90815260cc60205260408120805483919083906150ba908490615b68565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615fa083398151915290610fbd9086815260200190565b5f61510784610fce565b9050336001600160a01b03831614615174576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151725761514e8282615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61517e848261538a565b6151888282615403565b60408051858152602081018390526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614246565b5f336001600160a01b03831614615260576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461525e5761523a8582615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b615269846121f0565b9050805f03615276575f80fd5b615280818561538a565b61528a8285615403565b60408051828152602081018690526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614246565b615300828261247d565b611c1e5761530d816154d7565b6153188360206154e9565b604051602001615329929190615ee7565b6040516020818303038152906040525f80fd5b5f818311614eac5781610f5c565b5f610f5c83670de0b6b3a764000084613a07565b805160208201515f91906153728282614e9e565b611c8d9083615b68565b60975460ff166123fb575f80fd5b615392613ba7565b61539a614cd9565b6153a5611160613d7b565b5f6153ae613928565b90505f838260dd546153c09190615b1d565b6153ca9190615b68565b90508060d45460d3546153dd9190615b1d565b11156153fb57604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc60205260408120805483929061542a908490615b68565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615fa0833981519152906020015b60405180910390a35050565b8060cb5f82825461547b9190615b1d565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615fa0833981519152910161545e565b5f54610100900460ff166154cb575f80fd5b6097805460ff19169055565b6060610e1e6001600160a01b03831660145b60605f6154f7836002615b7b565b615502906002615b1d565b6001600160401b0381111561551957615519615bee565b6040519080825280601f01601f191660200182016040528015615543576020820181803683370190505b509050600360fc1b815f8151811061555d5761555d615f36565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061558b5761558b615f36565b60200101906001600160f81b03191690815f1a9053505f6155ad846002615b7b565b6155b8906001615b1d565b90505b600181111561562f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106155ec576155ec615f36565b1a60f81b82828151811061560257615602615f36565b60200101906001600160f81b03191690815f1a90535060049490941c9361562881615f4a565b90506155bb565b508315610f5c575f80fd5b6001600160a01b0381168114611cb4575f80fd5b5f6020828403121561565e575f80fd5b8135610f5c8161563a565b5f60208284031215615679575f80fd5b81356001600160e01b031981168114610f5c575f80fd5b80356001600160801b03811681146156a6575f80fd5b919050565b5f602082840312156156bb575f80fd5b610f5c82615690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615709575f80fd5b5035919050565b5f8060408385031215615721575f80fd5b823561572c8161563a565b946020939093013593505050565b5f8083601f84011261574a575f80fd5b5081356001600160401b03811115615760575f80fd5b602083019150836020828501011115612367575f80fd5b5f8060208385031215615788575f80fd5b82356001600160401b0381111561579d575f80fd5b6157a98582860161573a565b90969095509350505050565b5f805f805f60a086880312156157c9575f80fd5b85359450602086013593506040860135925060608601356157e98161563a565b915060808601356157f98161563a565b809150509295509295909350565b5f805f60608486031215615819575f80fd5b83356158248161563a565b925060208401356158348161563a565b929592945050506040919091013590565b803560ff811681146156a6575f80fd5b5f60208284031215615865575f80fd5b610f5c82615845565b5f806040838503121561587f575f80fd5b8235915060208301356158918161563a565b809150509250929050565b5f805f80608085870312156158af575f80fd5b84359350602085013592506040850135915060608501356158cf8161563a565b939692955090935050565b6001600160a01b0391909116815260200190565b6001600160801b0391909116815260200190565b5f805f60608486031215615914575f80fd5b833561591f8161563a565b92506020840135915060408401356159368161563a565b809150509250925092565b5f8060408385031215615952575f80fd5b50508035926020909101359150565b5f60208284031215615971575f80fd5b81358015158114610f5c575f80fd5b5f805f805f805f805f806101208b8d03121561599a575f80fd5b8a356001600160401b038111156159af575f80fd5b6159bb8d828e0161573a565b909b5099506159ce905060208c01615845565b97506159dc60408c01615690565b965060608b01356159ec8161563a565b955060808b0135945060a08b01359350615a0860c08c01615690565b999c989b50969995989497939650919460e0810135936101009091013592509050565b5f805f60608486031215615a3d575f80fd5b833592506020840135615a4f8161563a565b915060408401356159368161563a565b5f805f805f805f60e0888a031215615a75575f80fd5b8735615a808161563a565b96506020880135615a908161563a565b95506040880135945060608801359350615aac60808901615845565b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215615ada575f80fd5b8235615ae58161563a565b915060208301356158918161563a565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610e1e57610e1e615b09565b600181811c90821680615b4457607f821691505b602082108103615b6257634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610e1e57610e1e615b09565b8082028115828204841417610e1e57610e1e615b09565b5f600160ff1b8201615ba657615ba6615b09565b505f0390565b8181035f831280158383131683831282161715613f3d57613f3d615b09565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f82111561193a57805f5260205f20601f840160051c81016020851015615c275750805b601f840160051c820191505b81811015613d74575f8155600101615c33565b81516001600160401b03811115615c5f57615c5f615bee565b615c7381615c6d8454615b30565b84615c02565b6020601f821160018114615ca5575f8315615c8e5750848201515b5f19600385901b1c1916600184901b178455613d74565b5f84815260208120601f198516915b82811015615cd45787850151825560209485019460019092019101615cb4565b5084821015615cf157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b038281168282160390811115610e1e57610e1e615b09565b94855260ff93909316602085015260408401919091526060830152608082015260a00190565b5f60208284031215615d73575f80fd5b5051919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b5f8060408385031215615e14575f80fd5b505080516020909101519092909150565b5f82615e3357615e33615af5565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615e5a57615e5a615af5565b500490565b5f808354615e6c81615b30565b600182168015615e835760018114615e9857615ec5565b60ff1983168652811515820286019350615ec5565b865f5260205f205f5b83811015615ebd57815488820152600190910190602001615ea1565b505081860193505b509195945050505050565b5f81518060208401855e5f93019283525090919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81525f615f126017830185615ed0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526118516011820185615ed0565b634e487b7160e01b5f52603260045260245ffd5b5f81615f5857615f58615b09565b505f19019056fefbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122005ec196d152ea67004b2106a9e8456d6fce9e4ca698150d3a643ce4c0c94880d64736f6c634300081a0033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106104c1575f3560e01c80636e76fc8f11610283578063b2a02ff111610168578063d5164184116100e0578063e63ab1e91161009a578063e63ab1e914610c98578063e94b3c2114610cac578063eee8c9e014610cb5578063ef8b30f714610cbd578063f3fdb15a14610cd0578063fb0fc4c314610ce3578063fea45d9414610cfa575f80fd5b8063d516418414610c04578063d547741f14610c17578063d6b7494f14610c2a578063d905777e14610c33578063dd62ed3e14610c5b578063e00b262514610c85575f80fd5b8063b2a02ff114610af7578063b3d7f6b914610b0a578063b460af9414610b1d578063ba08765214610b30578063bee36bb314610b43578063bf722ca214610b56578063c63d75b6146107ae578063c6e6f59214610b69578063ccfd8b1114610b7c578063ce96cb7714610bad578063d2681a0b14610bc0578063d505accf14610bf1575f80fd5b806391d14854116101fb57806391d1485414610a32578063926bb63314610a4557806394bf804d14610a5857806395d89b4114610a6b57806397bce8d014610a73578063a05a091a14610a86578063a16a885014610a99578063a1bab44714610aae578063a1e8f02b14610ac1578063a217fddf14610aca578063a9059cbb14610ad1578063acb7081514610ae4575f80fd5b80636e76fc8f146109325780636eb9ffeb1461095957806370a082311461098557806378007e23146109a45780637ad226dc146109b75780637e932d32146109ca5780637ecebe00146109dd5780638456cb59146109fc5780638a1baa4614610a045780638bcd401614610a0d5780638c3cba5a14610a205780638d0e5f0214610a29575f80fd5b8063313ce567116103a95780634322b714116103215780634322b714146107d557806347dffde0146107fc5780634914c0081461080f5780634cdad506146108225780634e7c5059146108355780635c975abb146108895780635cc2ef83146108945780635e5c06e2146108a757806361d027b3146108f057806366601032146109035780636bb65f531461090c5780636e553f651461091f575f80fd5b8063313ce567146106c657806333eeb147146106ed57806334f7d1f2146107015780633644e5151461071457806336568abe1461071c57806338d52e0f1461072f5780633aa18d6f146107635780633c6f317f1461076c5780633ec045a61461077f5780633f4ba83a146107a6578063402d267d146107ae57806342da42bf146107c2575f80fd5b8063137001011161043c57806313700101146105e557806318160ddd146105f85780631a5b9e62146106015780631a90f186146106145780631d43b30b1461061d57806323b872dd14610630578063248a9ca31461064357806325fc07a91461066557806328acf2cf146106845780632c5dcc77146106975780632e0af008146106aa5780632f2ff15d146106b3575f80fd5b8063014a296f146104c557806301e1d114146104f257806301ffc9a714610508578063022d8af51461052b5780630539fa8c1461054057806306fdde031461054957806307a2d13a1461055e578063095ea7b3146105715780630a28a477146105845780630ab69be8146105975780630e52dbec146105be5780630f2b75aa146105dd575b5f80fd5b6104d86104d336600461564e565b610d0d565b604080519283526020830191909152015b60405180910390f35b6104fa610d42565b6040519081526020016104e9565b61051b610516366004615669565b610dee565b60405190151581526020016104e9565b61053e6105393660046156ab565b610e24565b005b6104fa60d85481565b610551610eab565b6040516104e991906156c4565b6104fa61056c3660046156f9565b610f37565b61051b61057f366004615710565b610f63565b6104fa6105923660046156f9565b610fce565b6104d86105a53660046156f9565b5f90815260d16020526040902080546001909101549091565b60da546105cb9060ff1681565b60405160ff90911681526020016104e9565b6104fa610fed565b61053e6105f3366004615777565b611092565b6104fa60cb5481565b6104fa61060f3660046157b5565b611103565b6104fa60d45481565b6104fa61062b36600461564e565b6115f3565b61051b61063e366004615807565b6116f3565b6104fa6106513660046156f9565b5f9081526065602052604090206001015490565b6104fa6106733660046156f9565b5f90815260d1602052604090205490565b61053e610692366004615855565b61185a565b61053e6106a5366004615710565b6118a6565b6104fa60dd5481565b61053e6106c136600461586e565b611916565b6105cb7f000000000000000000000000000000000000000000000000000000000000000081565b60e35461051b90600160a01b900460ff1681565b6104fa61070f36600461589c565b61193f565b6104fa611ba6565b61053e61072a36600461586e565b611c00565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b6040516104e991906158da565b6104fa60d95481565b6104fa61077a36600461589c565b611c22565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b61053e611c95565b6104fa6107bc36600461564e565b505f1990565b61053e6107d03660046156f9565b611cb7565b60dc546107ef90600160801b90046001600160801b031681565b6040516104e991906158ee565b6104fa61080a3660046156f9565b611cf6565b6104fa61081d366004615902565b611d14565b6104fa6108303660046156f9565b6121f0565b6108696108433660046156f9565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016104e9565b60975460ff1661051b565b61053e6108a2366004615941565b6121fa565b6108d56108b536600461564e565b60d26020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016104e9565b60e154610756906001600160a01b031681565b6104fa60e25481565b60e354610756906001600160a01b031681565b6104fa61092d36600461586e565b612254565b6104fa7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da5461097090600160281b900463ffffffff1681565b60405163ffffffff90911681526020016104e9565b6104fa61099336600461564e565b60cc6020525f908152604090205481565b6104fa6109b23660046156f9565b6122fa565b6104d86109c536600461586e565b612311565b61053e6109d8366004615961565b61236e565b6104fa6109eb36600461564e565b60ce6020525f908152604090205481565b61053e6123eb565b6104fa60d55481565b61053e610a1b36600461564e565b6123fd565b6104fa60d35481565b6104fa60df5481565b61051b610a4036600461586e565b61247d565b61053e610a5336600461564e565b6124a7565b6104fa610a6636600461586e565b612815565b6105516128b0565b61053e610a81366004615980565b6128bd565b6104fa610a943660046157b5565b612a1c565b60da5461097090610100900463ffffffff1681565b61053e610abc3660046156f9565b612e41565b6104fa60d75481565b6104fa5f81565b61051b610adf366004615710565b612e80565b6104d8610af236600461586e565b612fdd565b61053e610b05366004615807565b612ff9565b6104fa610b183660046156f9565b61300d565b6104fa610b2b366004615a2b565b613023565b6104fa610b3e366004615a2b565b61312b565b61053e610b5136600461564e565b613228565b6104fa610b643660046156f9565b61327c565b6104fa610b773660046156f9565b61329b565b6104d8610b8a36600461586e565b60cf60209081525f92835260408084209091529082529020805460019091015482565b6104fa610bbb36600461564e565b6132b2565b6104d8610bce36600461586e565b60d060209081525f92835260408084209091529082529020805460019091015482565b61053e610bff366004615a5f565b6132d3565b6104fa610c12366004615a2b565b613498565b61053e610c2536600461586e565b613713565b6104fa60d65481565b6104fa610c4136600461564e565b6001600160a01b03165f90815260cc602052604090205490565b6104fa610c69366004615ac9565b60cd60209081525f928352604080842090915290825290205481565b61053e610c933660046156ab565b613737565b6104fa5f80516020615f8083398151915281565b6104fa60de5481565b6104fa61378b565b6104fa610ccb3660046156f9565b61386c565b60db54610756906001600160a01b031681565b60da5461097090600160481b900463ffffffff1681565b60dc546107ef906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610d3090610f37565b610d39846115f3565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610db4575f81815260d160205260409020600381015480831115610da857824210610d8e578160020154610da3565b6002820154610da39042839003838603613876565b860195505b50506224ea0001610d5c565b50610dd760e254670de0b6b3a76400000360d454610dd061378b565b0390613894565b610ddf6138a8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610e1e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610e2e8161391e565b610e36613928565b60dd5f828254610e469190615b1d565b90915550610e5490506139a1565b60dc80546001600160801b0319166001600160801b0384161790556040517f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e90610e9f9084906158ee565b60405180910390a15050565b60c98054610eb890615b30565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee490615b30565b8015610f2f5780601f10610f0657610100808354040283529160200191610f2f565b820191905f5260205f20905b815481529060010190602001808311610f1257829003601f168201915b505050505081565b60cb545f908015610f5a57610f55610f4d610d42565b849083613876565b610f5c565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fbd9086815260200190565b60405180910390a350600192915050565b60cb545f908015610f5a57610f5581610fe5610d42565b859190613a07565b60dd5460de545f9190828183106110065760d85461100a565b60d9545b60da549091505f906110459061102d90600160481b900463ffffffff1642615b68565b6110379084615b7b565b61104090615b92565b613a34565b61105790670de0b6b3a7640000615bac565b90506110638185613894565b61107f61107883670de0b6b3a7640000615b68565b8590613894565b6110899190615b1d565b94505050505090565b5f61109c8161391e565b82826040516020016110af929190615bcb565b60405160208183030381529060405260c990816110cc9190615c46565b5082826040516020016110e0929190615d00565b60405160208183030381529060405260ca90816110fd9190615c46565b50505050565b5f61110c613ba7565b611114613bb6565b845f036111345760405163774257f760e01b815260040160405180910390fd5b60da5461114890879060ff1660035f613be1565b5f86815260d160205260409020611165611160613d7b565b613e89565b61116f8188613ec6565b60dd5f82825461117f9190615b1d565b909155505060e3546001600160a01b031680156111f057604051636c912dad60e01b81526001600160a01b03821690636c912dad906111c29087906004016158da565b5f604051808303815f87803b1580156111d9575f80fd5b505af11580156111eb573d5f803e3d5ffd5b505050505b5f6111fb8389613f44565b9050801561127f575f8160d3546112129190615b1d565b60dc549091506112509061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b60dd54906001600160801b0316613894565b60d45461125d9083615b1d565b111561127b57604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061128a610fed565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff166112d88a600101548b5f015489613f80565b6112e28888613fad565b6112ef898960d354613fc5565b6040518663ffffffff1660e01b815260040161130f959493929190615d3d565b602060405180830381865afa15801561132a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061134e9190615d63565b905061137361136c611360428f615b68565b83906301e13380613876565b8c90613fe1565b935050505080886113849190615b1d565b9350868411156113a757604051632c1b6b4160e21b815260040160405180910390fd5b6113b18585613ff5565b5f89815260d0602090815260408083206001600160a01b038916845290915281208054909103611408576001600160a01b0386165f90815260d2602052604090206001810154611401908c61406b565b6001909101555b5f8061144b61141685614154565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614180565b91509150815f1461146f5781866002015f8282546114699190615b1d565b90915550505b611478816141cc565b60405180604001604052808c855f01546114929190615b1d565b81526020018585600101546114a79190615b1d565b90525f8d815260d0602090815260408083206001600160a01b03808e168086529184529382902085518155949092015160019094019390935591519194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139061151d9033908e908890615d7a565b60405180910390a461152d6139a1565b611536896141f8565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906115849030908990600401615d9b565b5f604051808303815f87803b15801561159b575f80fd5b505af11580156115ad573d5f803e3d5ffd5b506115e79250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614246565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b81156116c85760018216156116ad575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916116689190615b1d565b90506116748188615b1d565b9650824211156116aa5761169d8561168c8542615b68565b6116969190615b7b565b8290613894565b6116a79088615b1d565b96505b50505b60019190911c906116c16224ea0082615b1d565b9050611624565b600284015480156116e9576116dc81611cf6565b6116e69087615b1d565b95505b5050505050919050565b5f6116fc613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53086611736866121f0565b6040518463ffffffff1660e01b815260040161175493929190615db5565b5f6040518083038186803b15801561176a575f80fd5b505afa15801561177c573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561184657604051630149e46f60e01b81526001600160a01b03821690630149e46f906117bf9088906004016158da565b5f604051808303815f87803b1580156117d6575f80fd5b505af11580156117e8573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f91506118189087906004016158da565b5f604051808303815f87803b15801561182f575f80fd5b505af1158015611841573d5f803e3d5ffd5b505050505b611851858585614291565b95945050505050565b5f6118648161391e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610e9f565b5f6118b08161391e565b6118bb611160613d7b565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119308161391e565b61193a838361436b565b505050565b5f611948613ba7565b611950613bb6565b835f03611970576040516356316e8760e01b815260040160405180910390fd5b60da5461198490869060ff1660035f613be1565b5f85815260d1602052604081209061199c8288613ec6565b90506119a9611160613d7b565b8060dd5f8282546119ba9190615b1d565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f9182916119ff918a906143f0565b9092509050611a0e8289615b1d565b945086851015611a3157604051632c1b6b4160e21b815260040160405180910390fd5b611a3b8489614441565b60d35f828254611a4b9190615b68565b90915550611a5b90508183615b1d565b846002015f828254611a6d9190615b68565b925050819055508060d55f828254611a859190615b1d565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611ada576001600160a01b0387165f90815260d2602052604090208054611ad7908c61406b565b90555b88815f015f828254611aec9190615b1d565b9250508190555082816001015f828254611b069190615b1d565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611b5b6139a1565b611b648a6141f8565b611b996001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614471565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611bdb57611bd66144c9565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611c14575f80fd5b611c1e8282614562565b5050565b5f611c2b613ba7565b60da54611c4090869060ff1660036002613be1565b611c4e8585858560016145c8565b9050611c586139a1565b611c8d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b949350505050565b5f80516020615f80833981519152611cac8161391e565b611cb4614952565b50565b5f611cc18161391e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610e9f565b60df545f908015610f5a57610f55611d0c61378b565b849083613a07565b5f611d1d613ba7565b6001600160a01b0384163303611d46576040516344511af160e01b815260040160405180910390fd5b611d4e613928565b60dd5f828254611d5e9190615b1d565b909155505060405163042dcf6b60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890611db5903090869089908990600401615dd9565b602060405180830381865afa158015611dd0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df49190615d63565b9250825f03611e165760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611e5057508515155b15611f5d576001821615611f42575f81421015611e8757611e748288898b5f6145c8565b9050611e808188615b68565b9650611f34565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611eb99190615b1d565b9150505f611ee060d6548542611ecf9190615b68565b611ed99190615b7b565b8390613894565b611eea9083615b1d565b9050888111611ef95788611f04565b611f04898383613876565b9250825f03611f15575f9850611f31565b611f2284848b8d5f6145c8565b9250611f2e838a615b68565b98505b50505b611f3e8186615b1d565b9450505b60019190911c90611f566224ea0082615b1d565b9050611e42565b50508315801590611f715750600281015415155b15611fa6575f611f808561327c565b90508015611fa4575f611f938288614994565b509050611fa08185615b1d565b9350505b505b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1b003130878a886040518563ffffffff1660e01b8152600401611ffa9493929190615dd9565b6040805180830381865afa158015612014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120389190615e03565b915091508160d55f82825461204d9190615b1d565b90915550612094905033306120628588615b1d565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614471565b306001600160a01b038616036120b5576120b030338984614af1565b61211a565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906120e59033908b908690600401615db5565b5f604051808303815f87803b1580156120fc575f80fd5b505af115801561210e573d5f803e3d5ffd5b5050505061211a6139a1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906121b9908a906004016158da565b5f604051808303815f87803b1580156121d0575f80fd5b505af11580156121e2573d5f803e3d5ffd5b505050505050509392505050565b5f610e1e82610f37565b5f6122048161391e565b61220c614cd9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61225e8361386c565b9050805f0361226b575f80fd5b6122a06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614471565b6122aa8282614d04565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8382614d7a565b60df545f908015610f5a57610f5581610fe561378b565b5f8061231b613ba7565b6123258484614994565b90925090506123326139a1565b6123676001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614471565b9250929050565b5f6123788161391e565b60e35460ff600160a01b90910416151582151514611c1e5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee698906123df90851515815260200190565b60405180910390a25050565b6123f3614dd9565b6123fb614e42565b565b5f6124078161391e565b60db546001600160a01b03161561242357612423611160613d7b565b60db80546001600160a01b0319166001600160a01b0384161790556124466139a1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146124f0576040516317568c8f60e21b815260040160405180910390fd5b6124f8613928565b60dd5f8282546125089190615b1d565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b811561276c576001821615612751575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916125849190615b1d565b905080861061274e5760e3546001600160a01b031680156125f957604051636c912dad60e01b81526001600160a01b03821690636c912dad906125cb908c906004016158da565b5f604051808303815f87803b1580156125e2575f80fd5b505af11580156125f4573d5f803e3d5ffd5b505050505b6126038288615b68565b965061260f8287615b1d565b83545f86815260d1602052604081209298509161262b91614e7f565b905080156126c4578060d35f8282546126449190615b68565b909155505083545f906126739061265b9084614e9e565b5f88815260d160205260409020600201549084613876565b90508060d15f8881526020019081526020015f206002015f8282546126989190615b68565b925050819055508060d55f8282546126b09190615b1d565b909155506126c09050818a615b1d565b9850505b5f85815260d0602090815260408083206001600160a01b038e16845290915281208181556001908101919091558901546126fe9086614eb3565b60018a015560408051848152602081018590526001600160a01b038c1691339188917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a450505b50505b60019190911c906127656224ea0082615b1d565b9050612540565b60028501541580159061278957506127838461327c565b93508315155b156127aa575f6127998588614994565b5090506127a68185615b1d565b9350505b8215612805578260d55f8282546127c19190615b68565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b61280d6139a1565b505050505050565b5f61281f8361300d565b90506128566001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b6128608284614d04565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8184614d7a565b60ca8054610eb890615b30565b5f54610100900460ff16158080156128db57505f54600160ff909116105b806128f45750303b1580156128f457505f5460ff166001145b6128fc575f80fd5b5f805460ff19166001179055801561291d575f805461ff0019166101001790555b612925614f72565b61292d614f84565b60da805468ffffffffffffffff0019166101004263ffffffff1690810263ffffffff60281b191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129805f3361436b565b61298a8b8b611092565b6129938961185a565b61299c88610e24565b6129a5876123fd565b6129ae86612e41565b6129b785611cb7565b6129c084613737565b6129ca83836121fa565b8015612a0f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a25613ba7565b845f03612a455760405163b8cb621960e01b815260040160405180910390fd5b60da54612a5a90879060ff1660036002613be1565b5f86815260d160205260409020612a72611160613d7b565b612a7c8188613ec6565b60dd5f828254612a8c9190615b1d565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612ad69190615b1d565b871115612af15760208101518151612aee9190615b1d565b96505b6040805180820190915281518152602080830151908201525f90612b2190612b19908a614f9e565b518490614fe4565b60d354612b2e9190615b1d565b905060dd5460d45482612b419190615b1d565b1115612b5f57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612c71575f612b73610fed565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bc78a600101548b5f01548a613f80565b612bd18989613fad565b612bdc8a8a8a613fc5565b6040518663ffffffff1660e01b8152600401612bfc959493929190615d3d565b602060405180830381865afa158015612c17573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c3b9190615d63565b9050612c66612c4d611360428f615b68565b612c5f90670de0b6b3a7640000615b1d565b8c90615028565b965050505050612c75565b8692505b85831015612c9657604051632c1b6b4160e21b815260040160405180910390fd5b612ca08484613ff5565b5f80612cec612cb7612cb2878c615b68565b614154565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614180565b9150915081846002015f828254612d039190615b1d565b90915550612d129050816141cc565b612d1c838a61503c565b5060208301518351175f03612d6f575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612d68908c614eb3565b9055612d9f565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b856001600160a01b0316876001600160a01b03168b7fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c338d8a604051612de793929190615d7a565b60405180910390a4612df76139a1565b612e008a6141f8565b612e346001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614246565b5050505095945050505050565b5f612e4b8161391e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610e9f565b5f612e89613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612ec3866121f0565b6040518463ffffffff1660e01b8152600401612ee193929190615db5565b5f6040518083038186803b158015612ef7575f80fd5b505afa158015612f09573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015612fd357604051630149e46f60e01b81526001600160a01b03821690630149e46f90612f4c9033906004016158da565b5f604051808303815f87803b158015612f63575f80fd5b505af1158015612f75573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f9150612fa59087906004016158da565b5f604051808303815f87803b158015612fbc575f80fd5b505af1158015612fce573d5f803e3d5ffd5b505050505b611c8d848461509a565b5f80612fe7613ba7565b612325612ff38561327c565b84614994565b613001613ba7565b61193a33848484614af1565b60cb545f908015610f5a57610f55611d0c610d42565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db59061307590309086908990600401615db5565b5f6040518083038186803b15801561308b575f80fd5b505afa15801561309d573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561310e57604051630149e46f60e01b81526001600160a01b03821690630149e46f906130e09086906004016158da565b5f604051808303815f87803b1580156130f7575f80fd5b505af1158015613109573d5f803e3d5ffd5b505050505b6131198585856150fd565b91506131236139a1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53084613166886121f0565b6040518463ffffffff1660e01b815260040161318493929190615db5565b5f6040518083038186803b15801561319a575f80fd5b505afa1580156131ac573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561321d57604051630149e46f60e01b81526001600160a01b03821690630149e46f906131ef9086906004016158da565b5f604051808303815f87803b158015613206575f80fd5b505af1158015613218573d5f803e3d5ffd5b505050505b6131198585856151f4565b5f6132328161391e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f908015610f5a57610f558161329361378b565b859190613876565b60cb545f908015610f5a57610f5581613293610d42565b6001600160a01b0381165f90815260cc6020526040812054610e1e90610f37565b428410156132df575f80fd5b5f60016132ea611ba6565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156133f2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134285750876001600160a01b0316816001600160a01b0316145b613430575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134a1613ba7565b6134a9613bb6565b835f036134c95760405163774257f760e01b815260040160405180910390fd5b6134d38285613ff5565b60e3546001600160a01b0316801561353f57604051636c912dad60e01b81526001600160a01b03821690636c912dad906135119086906004016158da565b5f604051808303815f87803b158015613528575f80fd5b505af115801561353a573d5f803e3d5ffd5b505050505b61354a611160613d7b565b613553856122fa565b91505f8560d4546135649190615b1d565b60d481905560dc549091506135959061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b8160d3546135a39190615b1d565b11156135c157604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135d29190615b1d565b90915550506001600160a01b0384165f90815260d2602052604081206002018054859290613601908490615b1d565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136596139a1565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906136a79030908890600401615d9b565b5f604051808303815f87803b1580156136be575f80fd5b505af11580156136d0573d5f803e3d5ffd5b5061370a9250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614246565b50509392505050565b5f8281526065602052604090206001015461372d8161391e565b61193a8383614562565b5f6137418161391e565b60dc80546001600160801b03808516600160801b0291161790556040517fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90610e9f9084906158ee565b60d45460dd5460da545f929190839061385890613851906137b990600160281b900463ffffffff1642615b68565b60db546301e13380906001600160a01b0316637c21fb1d6137da888a613fad565b6137e7898b60d354613fc5565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613826573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061384a9190615d63565b9190613876565b8490613894565b90506138648184615b1d565b935050505090565b5f610e1e8261329b565b82820281151584158583048514171661388d575f80fd5b0492915050565b5f610f5c8383670de0b6b3a7640000613876565b60da545f9081906138c490610100900463ffffffff1642615b68565b9050805f036138d4575f91505090565b60da54613918908290613904906138f2906224ea009060ff16615b7b565b60dc546001600160801b031690613894565b61390e9084615b1d565b60d5549190613876565b91505090565b611cb481336152f6565b5f6139316138a8565b90508060d55f8282546139449190615b68565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a1e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a4d57505f919050565b680755bf798b4a1bf1e58212613a61575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156123fb575f80fd5b60e354600160a01b900460ff16156123fb5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613bef6224ea0086615e25565b15613bfc57506001613c4f565b428511613c0b57506002613c4f565b613c1b60ff85166224ea00615b7b565b613c286224ea0042615e25565b613c329042615b68565b613c3c9190615b1d565b851115613c4b57506004613c4f565b5060035b826004811115613c6157613c61615e38565b816004811115613c7357613c73615e38565b14158015613ca35750816004811115613c8e57613c8e615e38565b816004811115613ca057613ca0615e38565b14155b15613d74575f826004811115613cbb57613cbb615e38565b03613d0f57806004811115613cd257613cd2615e38565b836004811115613ce457613ce4615e38565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d2157613d21615e38565b836004811115613d3357613d33615e38565b836004811115613d4557613d45615e38565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d06565b5050505050565b60d45460dd545f919082613d8f8284613fad565b60da549091505f90613de19061107890613db690600160281b900463ffffffff1642615b68565b60db5460d3546301e13380916001600160a01b031690637c21fb1d9088906137e7908b908d90613fc5565b9050613ded8185615b1d565b9350613e0460e2548261389490919063ffffffff16565b945084613e118285615b1d565b613e1b9190615b68565b60dd5560d484905560da805463ffffffff60281b1916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611cb45760e154613ead906001600160a01b0316613ea88361386c565b614d04565b8060dd5f828254613ebe9190615b1d565b909155505050565b60038201545f9042831115613f1a5760028401544260038601819055613f0390613ef1908490615b68565b613efb8487615b68565b839190613876565b9250613f0f8382615b68565b600286015550613f3d565b828103613f29575f9150613f3d565b600384018390556002840180545f90915591505b5092915050565b81545f9081613f538483615b1d565b9050613f6c613f6683876001015461533c565b82614e9e565b613f769082615b68565b9455509192915050565b5f8115801590613f8f57508383115b613f99575f611c8d565b611c8d82613fa78686615b68565b9061534a565b5f825f03613fbb575f610f5c565b610f5c828461534a565b5f835f03613fd3575f611c8d565b611c8d84613fa78486615b1d565b5f610f5c8383670de0b6b3a7640000613a07565b336001600160a01b03831614611c1e576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461193a5761403982610fce565b6140439082615b68565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f036140805750600160201b8117610e1e565b63ffffffff8316808310156140fd575f6224ea0061409e8584615b68565b6140a89190615e4c565b90506140b681610100615b68565b85901c156140d75760405163293cc41f60e21b815260040160405180910390fd5b6140e2816020615b1d565b602086901c901b9450848417600160201b1792505050610e1e565b5f6224ea0061410c8386615b68565b6141169190615e4c565b905060df81111561413a5760405163293cc41f60e21b815260040160405180910390fd5b614145816020615b1d565b6001901b851792505050610e1e565b5f8061416b60e2548461389490919063ffffffff16565b905061417681613e89565b610f5c8184615b68565b5f8082156141b4576141af61419d6141978761535e565b85614e9e565b6141a79085615b68565b859085613876565b6141b6565b5f5b90506141c28185615b68565b9150935093915050565b805f036141d65750565b60e254156141e757611cb481613e89565b8060d55f828254613ebe9190615b1d565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806110fd575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142ea576142c68382615b68565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614311908490615b68565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615fa0833981519152906143589087815260200190565b60405180910390a3506001949350505050565b614375828261247d565b611c1e575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f6143fc8661535e565b905080156144385761441d6144118683614e9e565b60408801519083613876565b92506144298385613894565b91506144358284615b68565b92505b50935093915050565b815460018301545f91906144558482615b1d565b60018601556118516144678383614e9e565b6141979084615b68565b5f6040516323b872dd60e01b5f526001600160a01b0385166004526001600160a01b0384166024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d74575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144fa9190615e5f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61456c828261247d565b15611c1e575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145e95760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906146018289613ec6565b905061460e611160613d7b565b8060dd5f82825461461f9190615b1d565b90915550505f88815260d0602090815260408083206001600160a01b0389168452825280832081518083019092528054808352600190910154928201839052909291614675918b9161467091615b1d565b614e9e565b6040805180820190915283518152602080850151908201529091505f9061469c9083614f9e565b5160e3549091506001600160a01b0316801561470c57604051636c912dad60e01b81526001600160a01b03821690636c912dad906146de908c906004016158da565b5f604051808303815f87803b1580156146f5575f80fd5b505af1158015614707573d5f803e3d5ffd5b505050505b8b4210156147d45760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147549186906143f0565b90925090506147638183615b1d565b886002015f8282546147759190615b68565b909155505089156147a8578060d55f8282546147919190615b1d565b909155506147a190508286615b68565b98506147cd565b6147b28183615b1d565b60d55f8282546147c29190615b1d565b925050819055508498505b505061481b565b60d6546147ef906147e58e42615b68565b6138519190615b7b565b6147f99084615b1d565b96506148058388615b68565b60d55f8282546148159190615b1d565b90915550505b8987111561483c57604051632c1b6b4160e21b815260040160405180910390fd5b6148468683614e7f565b60d35f8282546148569190615b68565b909155506148669050848461503c565b5060208401518451175f036148c2575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d2909252909120908101546148b7908e614eb3565b6001909101556148f2565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a46149438c6141f8565b50505050505095945050505050565b61495a61537c565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516139fd91906158da565b60e3545f9081906001600160a01b03168015614a0457604051636c912dad60e01b81526001600160a01b03821690636c912dad906149d69087906004016158da565b5f604051808303815f87803b1580156149ed575f80fd5b505af11580156149ff573d5f803e3d5ffd5b505050505b614a0f611160613d7b565b6001600160a01b0384165f90815260d2602052604090206002810154614a358782614e9e565b9350614a4084611cf6565b9450845f03614a625760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a739190615b68565b90915550614a8390508482615b68565b82600201819055508360df5f828254614a9c9190615b68565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614b115760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e16ee72090614b5f9087903090600401615d9b565b5f6040518083038186803b158015614b75575f80fd5b505afa158015614b87573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bf857604051630149e46f60e01b81526001600160a01b03821690630149e46f90614bca9086906004016158da565b5f604051808303815f87803b158015614be1575f80fd5b505af1158015614bf3573d5f803e3d5ffd5b505050505b5f614c0283610fce565b9050614c0e838261538a565b614c188482615403565b60408051848152602081018390526001600160a01b03808716929088169133915f80516020615f60833981519152910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c9591815260200190565b60405180910390a3614ca56139a1565b61280d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614246565b614ce1610fed565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d7057604051630149e46f60e01b81526001600160a01b03821690630149e46f90614d429086906004016158da565b5f604051808303815f87803b158015614d59575f80fd5b505af1158015614d6b573d5f803e3d5ffd5b505050505b61193a838361546a565b614d82613ba7565b614d8a613bb6565b614d92614cd9565b5f614d9b613d7b565b90505f614da6613928565b9050614db28482615b1d565b60dd5f828254614dc29190615b1d565b90915550614dd1905082613e89565b6110fd6139a1565b614e037f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361247d565b158015614e245750614e225f80516020615f808339815191523361247d565b155b156123fb57604051631d006fdb60e31b815260040160405180910390fd5b614e4a613ba7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586149873390565b815460018301545f9190614e938483615b68565b855561185161446783835b5f818310614eac5781610f5c565b5090919050565b5f821580614ec6575081600160201b1783145b15614ed257505f610e1e565b63ffffffff8316808303614f4057602184901c60015b60018216158015614ef857508115155b15614f0957600191821c9101614ee8565b6020614f158282615b1d565b9690961c90951b9485614f2b6224ea0083615b7b565b614f359087615b1d565b179350505050610e1e565b6224ea00614f4e8285615b68565b614f589190615e4c565b614f63906020615b1d565b6001901b198416915050610e1e565b5f54610100900460ff166123fb575f80fd5b5f54610100900460ff16614f96575f80fd5b6123fb6154b9565b604080518082019091525f8082526020820152825160208401515f91614fc8916132939082615b1d565b8085529050614fd78184615b68565b6020850152509192915050565b815460018301545f919082614ff98583615b68565b90506150058184614e9e565b61500f8385614e9e565b6150199190615b68565b60019096015550929392505050565b5f610f5c83670de0b6b3a764000084613876565b604080518082019091525f8082526020820152602083015183515f9161506191615b1d565b90505f61506e8483615b68565b855190915061507f90829084613876565b80865261508c9082615b68565b602086015250929392505050565b335f90815260cc60205260408120805483919083906150ba908490615b68565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615fa083398151915290610fbd9086815260200190565b5f61510784610fce565b9050336001600160a01b03831614615174576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151725761514e8282615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61517e848261538a565b6151888282615403565b60408051858152602081018390526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614246565b5f336001600160a01b03831614615260576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461525e5761523a8582615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b615269846121f0565b9050805f03615276575f80fd5b615280818561538a565b61528a8285615403565b60408051828152602081018690526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614246565b615300828261247d565b611c1e5761530d816154d7565b6153188360206154e9565b604051602001615329929190615ee7565b6040516020818303038152906040525f80fd5b5f818311614eac5781610f5c565b5f610f5c83670de0b6b3a764000084613a07565b805160208201515f91906153728282614e9e565b611c8d9083615b68565b60975460ff166123fb575f80fd5b615392613ba7565b61539a614cd9565b6153a5611160613d7b565b5f6153ae613928565b90505f838260dd546153c09190615b1d565b6153ca9190615b68565b90508060d45460d3546153dd9190615b1d565b11156153fb57604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc60205260408120805483929061542a908490615b68565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615fa0833981519152906020015b60405180910390a35050565b8060cb5f82825461547b9190615b1d565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615fa0833981519152910161545e565b5f54610100900460ff166154cb575f80fd5b6097805460ff19169055565b6060610e1e6001600160a01b03831660145b60605f6154f7836002615b7b565b615502906002615b1d565b6001600160401b0381111561551957615519615bee565b6040519080825280601f01601f191660200182016040528015615543576020820181803683370190505b509050600360fc1b815f8151811061555d5761555d615f36565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061558b5761558b615f36565b60200101906001600160f81b03191690815f1a9053505f6155ad846002615b7b565b6155b8906001615b1d565b90505b600181111561562f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106155ec576155ec615f36565b1a60f81b82828151811061560257615602615f36565b60200101906001600160f81b03191690815f1a90535060049490941c9361562881615f4a565b90506155bb565b508315610f5c575f80fd5b6001600160a01b0381168114611cb4575f80fd5b5f6020828403121561565e575f80fd5b8135610f5c8161563a565b5f60208284031215615679575f80fd5b81356001600160e01b031981168114610f5c575f80fd5b80356001600160801b03811681146156a6575f80fd5b919050565b5f602082840312156156bb575f80fd5b610f5c82615690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615709575f80fd5b5035919050565b5f8060408385031215615721575f80fd5b823561572c8161563a565b946020939093013593505050565b5f8083601f84011261574a575f80fd5b5081356001600160401b03811115615760575f80fd5b602083019150836020828501011115612367575f80fd5b5f8060208385031215615788575f80fd5b82356001600160401b0381111561579d575f80fd5b6157a98582860161573a565b90969095509350505050565b5f805f805f60a086880312156157c9575f80fd5b85359450602086013593506040860135925060608601356157e98161563a565b915060808601356157f98161563a565b809150509295509295909350565b5f805f60608486031215615819575f80fd5b83356158248161563a565b925060208401356158348161563a565b929592945050506040919091013590565b803560ff811681146156a6575f80fd5b5f60208284031215615865575f80fd5b610f5c82615845565b5f806040838503121561587f575f80fd5b8235915060208301356158918161563a565b809150509250929050565b5f805f80608085870312156158af575f80fd5b84359350602085013592506040850135915060608501356158cf8161563a565b939692955090935050565b6001600160a01b0391909116815260200190565b6001600160801b0391909116815260200190565b5f805f60608486031215615914575f80fd5b833561591f8161563a565b92506020840135915060408401356159368161563a565b809150509250925092565b5f8060408385031215615952575f80fd5b50508035926020909101359150565b5f60208284031215615971575f80fd5b81358015158114610f5c575f80fd5b5f805f805f805f805f806101208b8d03121561599a575f80fd5b8a356001600160401b038111156159af575f80fd5b6159bb8d828e0161573a565b909b5099506159ce905060208c01615845565b97506159dc60408c01615690565b965060608b01356159ec8161563a565b955060808b0135945060a08b01359350615a0860c08c01615690565b999c989b50969995989497939650919460e0810135936101009091013592509050565b5f805f60608486031215615a3d575f80fd5b833592506020840135615a4f8161563a565b915060408401356159368161563a565b5f805f805f805f60e0888a031215615a75575f80fd5b8735615a808161563a565b96506020880135615a908161563a565b95506040880135945060608801359350615aac60808901615845565b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215615ada575f80fd5b8235615ae58161563a565b915060208301356158918161563a565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610e1e57610e1e615b09565b600181811c90821680615b4457607f821691505b602082108103615b6257634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610e1e57610e1e615b09565b8082028115828204841417610e1e57610e1e615b09565b5f600160ff1b8201615ba657615ba6615b09565b505f0390565b8181035f831280158383131683831282161715613f3d57613f3d615b09565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f82111561193a57805f5260205f20601f840160051c81016020851015615c275750805b601f840160051c820191505b81811015613d74575f8155600101615c33565b81516001600160401b03811115615c5f57615c5f615bee565b615c7381615c6d8454615b30565b84615c02565b6020601f821160018114615ca5575f8315615c8e5750848201515b5f19600385901b1c1916600184901b178455613d74565b5f84815260208120601f198516915b82811015615cd45787850151825560209485019460019092019101615cb4565b5084821015615cf157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b038281168282160390811115610e1e57610e1e615b09565b94855260ff93909316602085015260408401919091526060830152608082015260a00190565b5f60208284031215615d73575f80fd5b5051919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b5f8060408385031215615e14575f80fd5b505080516020909101519092909150565b5f82615e3357615e33615af5565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615e5a57615e5a615af5565b500490565b5f808354615e6c81615b30565b600182168015615e835760018114615e9857615ec5565b60ff1983168652811515820286019350615ec5565b865f5260205f205f5b83811015615ebd57815488820152600190910190602001615ea1565b505081860193505b509195945050505050565b5f81518060208401855e5f93019283525090919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81525f615f126017830185615ed0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526118516011820185615ed0565b634e487b7160e01b5f52603260045260245ffd5b5f81615f5857615f58615b09565b505f19019056fefbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122005ec196d152ea67004b2106a9e8456d6fce9e4ca698150d3a643ce4c0c94880d64736f6c634300081a0033", "storageLayout": { "storage": [ { - "astId": 543, + "astId": 416, "contract": "contracts/Market.sol:Market", "label": "_initialized", "offset": 0, @@ -3528,7 +2785,7 @@ "type": "t_uint8" }, { - "astId": 546, + "astId": 419, "contract": "contracts/Market.sol:Market", "label": "_initializing", "offset": 1, @@ -3536,7 +2793,7 @@ "type": "t_bool" }, { - "astId": 3288, + "astId": 1086, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3544,7 +2801,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 4287, + "astId": 1360, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3568,7 +2825,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 727, + "astId": 600, "contract": "contracts/Market.sol:Market", "label": "_paused", "offset": 0, @@ -3576,7 +2833,7 @@ "type": "t_bool" }, { - "astId": 832, + "astId": 705, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3584,7 +2841,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 35688, + "astId": 16118, "contract": "contracts/Market.sol:Market", "label": "name", "offset": 0, @@ -3592,7 +2849,7 @@ "type": "t_string_storage" }, { - "astId": 35690, + "astId": 16120, "contract": "contracts/Market.sol:Market", "label": "symbol", "offset": 0, @@ -3600,7 +2857,7 @@ "type": "t_string_storage" }, { - "astId": 35694, + "astId": 16124, "contract": "contracts/Market.sol:Market", "label": "totalSupply", "offset": 0, @@ -3608,7 +2865,7 @@ "type": "t_uint256" }, { - "astId": 35698, + "astId": 16128, "contract": "contracts/Market.sol:Market", "label": "balanceOf", "offset": 0, @@ -3616,7 +2873,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 35704, + "astId": 16134, "contract": "contracts/Market.sol:Market", "label": "allowance", "offset": 0, @@ -3624,7 +2881,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 35712, + "astId": 16142, "contract": "contracts/Market.sol:Market", "label": "nonces", "offset": 0, @@ -3632,39 +2889,39 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 15178, + "astId": 7382, "contract": "contracts/Market.sol:Market", "label": "fixedDepositPositions", "offset": 0, "slot": "207", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))" }, { - "astId": 15186, + "astId": 7390, "contract": "contracts/Market.sol:Market", "label": "fixedBorrowPositions", "offset": 0, "slot": "208", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))" }, { - "astId": 15192, + "astId": 7396, "contract": "contracts/Market.sol:Market", "label": "fixedPools", "offset": 0, "slot": "209", - "type": "t_mapping(t_uint256,t_struct(Pool)35048_storage)" + "type": "t_mapping(t_uint256,t_struct(Pool)15534_storage)" }, { - "astId": 15198, + "astId": 7402, "contract": "contracts/Market.sol:Market", "label": "accounts", "offset": 0, "slot": "210", - "type": "t_mapping(t_address,t_struct(Account)19124_storage)" + "type": "t_mapping(t_address,t_struct(Account)11401_storage)" }, { - "astId": 15201, + "astId": 7405, "contract": "contracts/Market.sol:Market", "label": "floatingBackupBorrowed", "offset": 0, @@ -3672,7 +2929,7 @@ "type": "t_uint256" }, { - "astId": 15204, + "astId": 7408, "contract": "contracts/Market.sol:Market", "label": "floatingDebt", "offset": 0, @@ -3680,7 +2937,7 @@ "type": "t_uint256" }, { - "astId": 15207, + "astId": 7411, "contract": "contracts/Market.sol:Market", "label": "earningsAccumulator", "offset": 0, @@ -3688,7 +2945,7 @@ "type": "t_uint256" }, { - "astId": 15210, + "astId": 7414, "contract": "contracts/Market.sol:Market", "label": "penaltyRate", "offset": 0, @@ -3696,7 +2953,7 @@ "type": "t_uint256" }, { - "astId": 15213, + "astId": 7417, "contract": "contracts/Market.sol:Market", "label": "backupFeeRate", "offset": 0, @@ -3704,7 +2961,7 @@ "type": "t_uint256" }, { - "astId": 15216, + "astId": 7420, "contract": "contracts/Market.sol:Market", "label": "dampSpeedUp", "offset": 0, @@ -3712,7 +2969,7 @@ "type": "t_uint256" }, { - "astId": 15219, + "astId": 7423, "contract": "contracts/Market.sol:Market", "label": "dampSpeedDown", "offset": 0, @@ -3720,7 +2977,7 @@ "type": "t_uint256" }, { - "astId": 15222, + "astId": 7426, "contract": "contracts/Market.sol:Market", "label": "maxFuturePools", "offset": 0, @@ -3728,7 +2985,7 @@ "type": "t_uint8" }, { - "astId": 15225, + "astId": 7429, "contract": "contracts/Market.sol:Market", "label": "lastAccumulatorAccrual", "offset": 1, @@ -3736,7 +2993,7 @@ "type": "t_uint32" }, { - "astId": 15228, + "astId": 7432, "contract": "contracts/Market.sol:Market", "label": "lastFloatingDebtUpdate", "offset": 5, @@ -3744,7 +3001,7 @@ "type": "t_uint32" }, { - "astId": 15231, + "astId": 7435, "contract": "contracts/Market.sol:Market", "label": "lastAverageUpdate", "offset": 9, @@ -3752,15 +3009,15 @@ "type": "t_uint32" }, { - "astId": 15235, + "astId": 7439, "contract": "contracts/Market.sol:Market", "label": "interestRateModel", "offset": 0, "slot": "219", - "type": "t_contract(InterestRateModel)15062" + "type": "t_contract(InterestRateModel)7266" }, { - "astId": 15238, + "astId": 7442, "contract": "contracts/Market.sol:Market", "label": "earningsAccumulatorSmoothFactor", "offset": 0, @@ -3768,7 +3025,7 @@ "type": "t_uint128" }, { - "astId": 15241, + "astId": 7445, "contract": "contracts/Market.sol:Market", "label": "reserveFactor", "offset": 16, @@ -3776,7 +3033,7 @@ "type": "t_uint128" }, { - "astId": 15244, + "astId": 7448, "contract": "contracts/Market.sol:Market", "label": "floatingAssets", "offset": 0, @@ -3784,7 +3041,7 @@ "type": "t_uint256" }, { - "astId": 15247, + "astId": 7451, "contract": "contracts/Market.sol:Market", "label": "floatingAssetsAverage", "offset": 0, @@ -3792,7 +3049,7 @@ "type": "t_uint256" }, { - "astId": 15250, + "astId": 7454, "contract": "contracts/Market.sol:Market", "label": "totalFloatingBorrowShares", "offset": 0, @@ -3800,7 +3057,7 @@ "type": "t_uint256" }, { - "astId": 15253, + "astId": 7457, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3808,7 +3065,7 @@ "type": "t_uint256" }, { - "astId": 15256, + "astId": 7460, "contract": "contracts/Market.sol:Market", "label": "treasury", "offset": 0, @@ -3816,7 +3073,7 @@ "type": "t_address" }, { - "astId": 15259, + "astId": 7463, "contract": "contracts/Market.sol:Market", "label": "treasuryFeeRate", "offset": 0, @@ -3824,15 +3081,15 @@ "type": "t_uint256" }, { - "astId": 15263, + "astId": 7467, "contract": "contracts/Market.sol:Market", "label": "rewardsController", "offset": 0, "slot": "227", - "type": "t_contract(RewardsController)23082" + "type": "t_contract(RewardsController)14682" }, { - "astId": 15266, + "astId": 7470, "contract": "contracts/Market.sol:Market", "label": "isFrozen", "offset": 20, @@ -3868,12 +3125,12 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(InterestRateModel)15062": { + "t_contract(InterestRateModel)7266": { "encoding": "inplace", "label": "contract InterestRateModel", "numberOfBytes": "20" }, - "t_contract(RewardsController)23082": { + "t_contract(RewardsController)14682": { "encoding": "inplace", "label": "contract RewardsController", "numberOfBytes": "20" @@ -3892,19 +3149,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_uint256)" }, - "t_mapping(t_address,t_struct(Account)19124_storage)": { + "t_mapping(t_address,t_struct(Account)11401_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct Market.Account)", "numberOfBytes": "32", - "value": "t_struct(Account)19124_storage" + "value": "t_struct(Account)11401_storage" }, - "t_mapping(t_address,t_struct(Position)35054_storage)": { + "t_mapping(t_address,t_struct(Position)15540_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct FixedLib.Position)", "numberOfBytes": "32", - "value": "t_struct(Position)35054_storage" + "value": "t_struct(Position)15540_storage" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -3920,31 +3177,31 @@ "numberOfBytes": "32", "value": "t_struct(RoleData)23_storage" }, - "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))": { + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => mapping(address => struct FixedLib.Position))", "numberOfBytes": "32", - "value": "t_mapping(t_address,t_struct(Position)35054_storage)" + "value": "t_mapping(t_address,t_struct(Position)15540_storage)" }, - "t_mapping(t_uint256,t_struct(Pool)35048_storage)": { + "t_mapping(t_uint256,t_struct(Pool)15534_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct FixedLib.Pool)", "numberOfBytes": "32", - "value": "t_struct(Pool)35048_storage" + "value": "t_struct(Pool)15534_storage" }, "t_string_storage": { "encoding": "bytes", "label": "string", "numberOfBytes": "32" }, - "t_struct(Account)19124_storage": { + "t_struct(Account)11401_storage": { "encoding": "inplace", "label": "struct Market.Account", "members": [ { - "astId": 19119, + "astId": 11396, "contract": "contracts/Market.sol:Market", "label": "fixedDeposits", "offset": 0, @@ -3952,7 +3209,7 @@ "type": "t_uint256" }, { - "astId": 19121, + "astId": 11398, "contract": "contracts/Market.sol:Market", "label": "fixedBorrows", "offset": 0, @@ -3960,7 +3217,7 @@ "type": "t_uint256" }, { - "astId": 19123, + "astId": 11400, "contract": "contracts/Market.sol:Market", "label": "floatingBorrowShares", "offset": 0, @@ -3970,12 +3227,12 @@ ], "numberOfBytes": "96" }, - "t_struct(Pool)35048_storage": { + "t_struct(Pool)15534_storage": { "encoding": "inplace", "label": "struct FixedLib.Pool", "members": [ { - "astId": 35041, + "astId": 15527, "contract": "contracts/Market.sol:Market", "label": "borrowed", "offset": 0, @@ -3983,7 +3240,7 @@ "type": "t_uint256" }, { - "astId": 35043, + "astId": 15529, "contract": "contracts/Market.sol:Market", "label": "supplied", "offset": 0, @@ -3991,7 +3248,7 @@ "type": "t_uint256" }, { - "astId": 35045, + "astId": 15531, "contract": "contracts/Market.sol:Market", "label": "unassignedEarnings", "offset": 0, @@ -3999,7 +3256,7 @@ "type": "t_uint256" }, { - "astId": 35047, + "astId": 15533, "contract": "contracts/Market.sol:Market", "label": "lastAccrual", "offset": 0, @@ -4009,12 +3266,12 @@ ], "numberOfBytes": "128" }, - "t_struct(Position)35054_storage": { + "t_struct(Position)15540_storage": { "encoding": "inplace", "label": "struct FixedLib.Position", "members": [ { - "astId": 35051, + "astId": 15537, "contract": "contracts/Market.sol:Market", "label": "principal", "offset": 0, @@ -4022,7 +3279,7 @@ "type": "t_uint256" }, { - "astId": 35053, + "astId": 15539, "contract": "contracts/Market.sol:Market", "label": "fee", "offset": 0, diff --git a/deployments/optimism/MarketWETH.json b/deployments/optimism/MarketWETH.json index 676e78bc..e77d7312 100644 --- a/deployments/optimism/MarketWETH.json +++ b/deployments/optimism/MarketWETH.json @@ -2989,12 +2989,12 @@ "0xfBa759BCd1a99a7724c5068FEddb4F5b844b941A", "0x9f73066e00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000d6aa0254c488662427d508e8c2e43ca80a43620100000000000000000000000000000000000000000000000000000035e55f1909000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000001057acf5f78000000000000000000000000000000000000000000000000000058d15e176280000" ], - "numDeployments": 7, + "numDeployments": 8, "solcInputHash": "85c8bc749730c336d6cf31aaa3d211b2", "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"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\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"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.\",\"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`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"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\":{\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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.5.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 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(\\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(\\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\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"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/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../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 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(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) 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 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 Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\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\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 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(\\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 (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\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 /// @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\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405260405162000b5038038062000b5083398101604081905262000026916200038b565b828162000036828260006200004d565b50620000449050826200008a565b50505062000489565b6200005883620000e5565b600082511180620000665750805b1562000085576200008383836200012760201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000b562000156565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e2816200018f565b50565b620000f081620001ed565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200014f838360405180606001604052806027815260200162000b296027913962000247565b9392505050565b60006200018060008051602062000b0983398151915260001b620002c660201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b038116620001a357600080fd5b80620001cc60008051602062000b0983398151915260001b620002c660201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200020381620002c960201b6200025a1760201c565b6200020d57600080fd5b80620001cc7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b620002c660201b620001ea1760201c565b6060600080856001600160a01b0316856040516200026691906200046b565b600060405180830381855af49150503d8060008114620002a3576040519150601f19603f3d011682016040523d82523d6000602084013e620002a8565b606091505b509092509050620002bc86838387620002d8565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200030857825160000362000300576001600160a01b0385163b6200030057600080fd5b508162000314565b6200031483836200031c565b949350505050565b8151156200032d5781518083602001fd5b600080fd5b80516001600160a01b03811681146200034a57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200038257818101518382015260200162000368565b50506000910152565b600080600060608486031215620003a157600080fd5b620003ac8462000332565b9250620003bc6020850162000332565b60408501519092506001600160401b0380821115620003da57600080fd5b818601915086601f830112620003ef57600080fd5b8151818111156200040457620004046200034f565b604051601f8201601f19908116603f011681019083821181831017156200042f576200042f6200034f565b816040528281528960208487010111156200044957600080fd5b6200045c83602083016020880162000365565b80955050505050509250925092565b600082516200047f81846020870162000365565b9190910192915050565b61067080620004996000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b610080366004610546565b610118565b61005b610093366004610561565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e4366004610546565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b610116610111610285565b61028f565b565b6101206102b3565b6001600160a01b0316330361014d5761014a816040518060200160405280600081525060006102e6565b50565b61014a6100fe565b61015d6102b3565b6001600160a01b031633036101b4576101af8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506102e6915050565b505050565b6101af6100fe565b60006101c66102b3565b6001600160a01b031633036101e2576101dd610285565b905090565b6101ea6100fe565b90565b6101f56102b3565b6001600160a01b0316330361014d5761014a81610311565b60006102176102b3565b6001600160a01b031633036101e2576101dd6102b3565b6060610253838360405180606001604052806027815260200161061460279139610365565b9392505050565b6001600160a01b03163b151590565b6102716102b3565b6001600160a01b0316330361011657600080fd5b60006101dd6103dd565b3660008037600080366000845af43d6000803e8080156102ae573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6102ef83610405565b6000825111806102fc5750805b156101af5761030b838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61033a6102b3565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610445565b6060600080856001600160a01b03168560405161038291906105e4565b600060405180830381855af49150503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091506103d38683838761049c565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6102d7565b61040e816104da565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661045857600080fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156104c85782516000036104c1576001600160a01b0385163b6104c157600080fd5b50816104d2565b6104d28383610515565b949350505050565b6001600160a01b0381163b6104ee57600080fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61047b565b8151156105255781518083602001fd5b600080fd5b80356001600160a01b038116811461054157600080fd5b919050565b60006020828403121561055857600080fd5b6102538261052a565b60008060006040848603121561057657600080fd5b61057f8461052a565b9250602084013567ffffffffffffffff8082111561059c57600080fd5b818601915086601f8301126105b057600080fd5b8135818111156105bf57600080fd5b8760208285010111156105d157600080fd5b6020830194508093505050509250925092565b6000825160005b8181101561060557602081860181015185830152016105eb565b50600092019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203011748945e626a6c7d6bd1969f4e5640e829c89504a5d4e52671d90f482851564736f6c63430008110033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b610080366004610546565b610118565b61005b610093366004610561565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e4366004610546565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b610116610111610285565b61028f565b565b6101206102b3565b6001600160a01b0316330361014d5761014a816040518060200160405280600081525060006102e6565b50565b61014a6100fe565b61015d6102b3565b6001600160a01b031633036101b4576101af8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506102e6915050565b505050565b6101af6100fe565b60006101c66102b3565b6001600160a01b031633036101e2576101dd610285565b905090565b6101ea6100fe565b90565b6101f56102b3565b6001600160a01b0316330361014d5761014a81610311565b60006102176102b3565b6001600160a01b031633036101e2576101dd6102b3565b6060610253838360405180606001604052806027815260200161061460279139610365565b9392505050565b6001600160a01b03163b151590565b6102716102b3565b6001600160a01b0316330361011657600080fd5b60006101dd6103dd565b3660008037600080366000845af43d6000803e8080156102ae573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6102ef83610405565b6000825111806102fc5750805b156101af5761030b838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61033a6102b3565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610445565b6060600080856001600160a01b03168560405161038291906105e4565b600060405180830381855af49150503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091506103d38683838761049c565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6102d7565b61040e816104da565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661045857600080fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156104c85782516000036104c1576001600160a01b0385163b6104c157600080fd5b50816104d2565b6104d28383610515565b949350505050565b6001600160a01b0381163b6104ee57600080fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61047b565b8151156105255781518083602001fd5b600080fd5b80356001600160a01b038116811461054157600080fd5b919050565b60006020828403121561055857600080fd5b6102538261052a565b60008060006040848603121561057657600080fd5b61057f8461052a565b9250602084013567ffffffffffffffff8082111561059c57600080fd5b818601915086601f8301126105b057600080fd5b8135818111156105bf57600080fd5b8760208285010111156105d157600080fd5b6020830194508093505050509250925092565b6000825160005b8181101561060557602081860181015185830152016105eb565b50600092019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203011748945e626a6c7d6bd1969f4e5640e829c89504a5d4e52671d90f482851564736f6c63430008110033", - "implementation": "0xb4610b34cA99fA8C48844faA667fAE1686a4A2aA", + "implementation": "0xaD973EF23CD21dD9b38DC84132Adcb4Ff64F8da5", "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.", "kind": "dev", diff --git a/deployments/optimism/MarketWETH_Implementation.json b/deployments/optimism/MarketWETH_Implementation.json index 787ba748..50face1e 100644 --- a/deployments/optimism/MarketWETH_Implementation.json +++ b/deployments/optimism/MarketWETH_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xb4610b34cA99fA8C48844faA667fAE1686a4A2aA", + "address": "0xaD973EF23CD21dD9b38DC84132Adcb4Ff64F8da5", "abi": [ { "inputs": [ @@ -2736,32 +2736,32 @@ "type": "function" } ], - "transactionHash": "0x17aabb1858ca01f60f0fc8f2f2a6e86f63482dd64aa8a8d1c6820b68ef2b30e7", + "transactionHash": "0x5fa71931ed127ff4ca04e245830e7906cb7af284060b04b286dd4156eb75391d", "receipt": { "to": null, "from": "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", - "contractAddress": "0xb4610b34cA99fA8C48844faA667fAE1686a4A2aA", - "transactionIndex": 12, - "gasUsed": "5366695", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000010000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xcc873d0eb931610e1730d3526505d2cd90d7cb3494ef93e1ffb25cd6affb0642", - "transactionHash": "0x17aabb1858ca01f60f0fc8f2f2a6e86f63482dd64aa8a8d1c6820b68ef2b30e7", + "contractAddress": "0xaD973EF23CD21dD9b38DC84132Adcb4Ff64F8da5", + "transactionIndex": 10, + "gasUsed": "5411532", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xbb5caa62b93d9f8134dac5b81c89e91f78609bf52bdcd45f1d7d0118991f1ded", + "transactionHash": "0x5fa71931ed127ff4ca04e245830e7906cb7af284060b04b286dd4156eb75391d", "logs": [ { - "transactionIndex": 12, - "blockNumber": 118840295, - "transactionHash": "0x17aabb1858ca01f60f0fc8f2f2a6e86f63482dd64aa8a8d1c6820b68ef2b30e7", - "address": "0xb4610b34cA99fA8C48844faA667fAE1686a4A2aA", + "transactionIndex": 10, + "blockNumber": 124901166, + "transactionHash": "0x5fa71931ed127ff4ca04e245830e7906cb7af284060b04b286dd4156eb75391d", + "address": "0xaD973EF23CD21dD9b38DC84132Adcb4Ff64F8da5", "topics": [ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" ], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 42, - "blockHash": "0xcc873d0eb931610e1730d3526505d2cd90d7cb3494ef93e1ffb25cd6affb0642" + "logIndex": 47, + "blockHash": "0xbb5caa62b93d9f8134dac5b81c89e91f78609bf52bdcd45f1d7d0118991f1ded" } ], - "blockNumber": 118840295, - "cumulativeGasUsed": "10284519", + "blockNumber": 124901166, + "cumulativeGasUsed": "6870795", "status": 1, "byzantium": true }, @@ -2769,758 +2769,15 @@ "0x4200000000000000000000000000000000000006", "0xaEb62e6F27BC103702E7BC879AE98bceA56f027E" ], - "numDeployments": 7, - "solcInputHash": "e3ac7af802d0124bd24cbb337b6ddc93", - "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"contract Auditor\",\"name\":\"auditor_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Disagreement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientProtocolLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketFrozen\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaturityOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAuditor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPausingRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SelfLiquidation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolState\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"alternativeState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolStates\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBorrow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRepay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWithdraw\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AccumulatorAccrual\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"backupFeeRate\",\"type\":\"uint256\"}],\"name\":\"BackupFeeRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"BorrowAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedUp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedDown\",\"type\":\"uint256\"}],\"name\":\"DampSpeedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"DepositAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulatorSmoothFactor\",\"type\":\"uint256\"}],\"name\":\"EarningsAccumulatorSmoothFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"}],\"name\":\"FixedEarningsUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilization\",\"type\":\"uint256\"}],\"name\":\"FloatingDebtUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isFrozen\",\"type\":\"bool\"}],\"name\":\"Frozen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel\",\"type\":\"address\"}],\"name\":\"InterestRateModelSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lendersAssets\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizedAssets\",\"type\":\"uint256\"}],\"name\":\"Liquidate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDepositShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDebt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulator\",\"type\":\"uint256\"}],\"name\":\"MarketUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxFuturePools\",\"type\":\"uint256\"}],\"name\":\"MaxFuturePoolsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyRate\",\"type\":\"uint256\"}],\"name\":\"PenaltyRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Repay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"name\":\"RepayAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveFactor\",\"type\":\"uint256\"}],\"name\":\"ReserveFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController\",\"type\":\"address\"}],\"name\":\"RewardsControllerSet\",\"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\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"SpreadBadDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate\",\"type\":\"uint256\"}],\"name\":\"TreasurySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"WithdrawAtMaturity\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EMERGENCY_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"accountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fixedDeposits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fixedBorrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auditor\",\"outputs\":[{\"internalType\":\"contract Auditor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"backupFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrowAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsOwed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"clearBadDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"depositAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulatorSmoothFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedBorrowPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedDepositPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"fixedPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplied\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastAccrual\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingBackupBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"maxFuturePools_\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedUp_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedDown_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAccumulatorAccrual\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAverageUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFloatingDebtUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxFuturePools\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"previewDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"debt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewFloatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRefund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewRepay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repayAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepayAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsController\",\"outputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"}],\"name\":\"setAssetSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setBackupFeeRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"up\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"down\",\"type\":\"uint256\"}],\"name\":\"setDampSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"}],\"name\":\"setEarningsAccumulatorSmoothFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isFrozen_\",\"type\":\"bool\"}],\"name\":\"setFrozen\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"futurePools\",\"type\":\"uint8\"}],\"name\":\"setMaxFuturePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"}],\"name\":\"setReserveFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController_\",\"type\":\"address\"}],\"name\":\"setRewardsController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setTreasury\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasuryFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsDiscounted\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\"}},\"BackupFeeRateSet(uint256)\":{\"params\":{\"backupFeeRate\":\"rate charged to the fixed pools to be accrued by the floating depositors.\"}},\"Borrow(address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"receiver\":\"address that received the borrowed assets.\",\"shares\":\"amount of borrow shares assigned to the account.\"}},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"fee\":\"extra amount that will need to be paid at maturity.\",\"maturity\":\"maturity in which the account will have to repay the loan.\",\"receiver\":\"address that received the borrowed assets.\"}},\"DampSpeedSet(uint256,uint256)\":{\"params\":{\"dampSpeedDown\":\"represented with 18 decimals.\",\"dampSpeedUp\":\"represented with 18 decimals.\"}},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were deposited.\",\"caller\":\"address which deposited the assets.\",\"fee\":\"is the extra amount that it will be collected at maturity.\",\"maturity\":\"maturity at which the account will be able to collect his deposit + his fee.\",\"owner\":\"address that will be able to withdraw the deposited assets.\"}},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"params\":{\"earningsAccumulatorSmoothFactor\":\"factor represented with 18 decimals.\"}},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"params\":{\"maturity\":\"maturity date where the earnings were updated.\",\"timestamp\":\"current timestamp.\",\"unassignedEarnings\":\"pending unassigned earnings.\"}},\"FloatingDebtUpdate(uint256,uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\",\"utilization\":\"new floating utilization.\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InterestRateModelSet(address)\":{\"params\":{\"interestRateModel\":\"new interest rate model to be used to calculate rates.\"}},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were repaid.\",\"borrower\":\"address which had the original debt.\",\"lendersAssets\":\"incentive paid to lenders.\",\"receiver\":\"address which repaid the previously borrowed amount.\",\"seizeMarket\":\"address of the asset that were seized by the liquidator.\",\"seizedAssets\":\"amount seized of the collateral.\"}},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"earningsAccumulator\":\"earnings accumulator.\",\"floatingAssets\":\"total floating supply assets.\",\"floatingBorrowShares\":\"total floating borrow shares.\",\"floatingDebt\":\"total floating borrow assets.\",\"floatingDepositShares\":\"total floating supply shares.\",\"timestamp\":\"current timestamp.\"}},\"MaxFuturePoolsSet(uint256)\":{\"params\":{\"maxFuturePools\":\"represented with 0 decimals.\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PenaltyRateSet(uint256)\":{\"params\":{\"penaltyRate\":\"penaltyRate percentage per second represented with 18 decimals.\"}},\"Repay(address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"shares\":\"amount of borrow shares that were subtracted from the account's accountability.\"}},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"maturity\":\"maturity where the account repaid its borrowed amounts.\",\"positionAssets\":\"amount of the debt that was covered in this repayment (penalties could have been repaid).\"}},\"ReserveFactorSet(uint256)\":{\"params\":{\"reserveFactor\":\"reserveFactor percentage.\"}},\"RewardsControllerSet(address)\":{\"params\":{\"rewardsController\":\"new rewards controller to update account rewards when operating with the Market.\"}},\"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`)\"},\"Seize(address,address,uint256)\":{\"params\":{\"assets\":\"amount seized of the collateral.\",\"borrower\":\"address which had the original debt.\",\"liquidator\":\"address which seized this collateral.\"}},\"SpreadBadDebt(address,uint256)\":{\"params\":{\"assets\":\"amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\",\"borrower\":\"address which was cleared from bad debt.\"}},\"TreasurySet(address,uint256)\":{\"params\":{\"treasury\":\"address of the treasury that will receive the minted eTokens.\",\"treasuryFeeRate\":\"represented with 18 decimals.\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets withdrawn (can include a discount for early withdraw).\",\"caller\":\"address which withdraw the asset.\",\"maturity\":\"maturity where the account withdraw its deposits.\",\"owner\":\"address which had the assets withdrawn.\",\"positionAssets\":\"position size reduced.\",\"receiver\":\"address which will be collecting the assets.\"}}},\"kind\":\"dev\",\"methods\":{\"accountSnapshot(address)\":{\"params\":{\"account\":\"account to return status snapshot in the specified maturity date.\"},\"returns\":{\"_0\":\"the amount deposited to the floating pool and the amount owed to floating and fixed pools.\"}},\"borrow(uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"borrowShares\":\"shares corresponding to the borrowed assets.\"}},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"maturity\":\"maturity date for repayment.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"assetsOwed\":\"total amount of assets (principal + fee) to be repaid at maturity.\"}},\"clearBadDebt(address)\":{\"details\":\"Can only be called from the auditor.\",\"params\":{\"borrower\":\"account with insufficient collateral to be cleared the debt.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"assets\":\"amount to receive from the msg.sender.\",\"maturity\":\"maturity date where the assets will be deposited.\",\"minAssetsRequired\":\"minimum amount of assets required by the depositor for the transaction to be accepted.\",\"receiver\":\"address that will be able to withdraw the deposited assets.\"},\"returns\":{\"positionAssets\":\"total amount of assets (principal + fee) to be withdrawn at maturity.\"}},\"fixedPoolBalance(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed and supplied amount of the fixed pool.\"}},\"fixedPoolBorrowed(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed amount of the fixed pool.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"details\":\"can only be called once.\"},\"liquidate(address,uint256,address)\":{\"details\":\"Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.\",\"params\":{\"borrower\":\"account that has an outstanding debt across floating or fixed pools.\",\"maxAssets\":\"maximum amount of debt that the liquidator is willing to accept. (it can be less)\",\"seizeMarket\":\"market from which the collateral will be seized to give to the liquidator.\"},\"returns\":{\"repaidAssets\":\"actual amount repaid.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"previewBorrow(uint256)\":{\"params\":{\"assets\":\"amount of assets to borrow.\"},\"returns\":{\"_0\":\"amount of shares that will be asigned to the account after the borrow.\"}},\"previewDebt(address)\":{\"params\":{\"borrower\":\"account to return status snapshot for fixed and floating borrows.\"},\"returns\":{\"debt\":\"the total debt, denominated in number of assets.\"}},\"previewFloatingAssetsAverage()\":{\"returns\":{\"_0\":\"projected `floatingAssetsAverage`.\"}},\"previewRefund(uint256)\":{\"params\":{\"shares\":\"amount of shares to subtract from caller's accountability.\"},\"returns\":{\"_0\":\"amount of assets that will be repaid.\"}},\"previewRepay(uint256)\":{\"params\":{\"assets\":\"amount of assets to repay.\"},\"returns\":{\"_0\":\"amount of shares that will be subtracted from the account after the repay.\"}},\"redeem(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\",\"shares\":\"amount of shares to be redeemed for underlying asset.\"},\"returns\":{\"assets\":\"amount of underlying asset that was withdrawn.\"}},\"refund(uint256,address)\":{\"params\":{\"borrowShares\":\"shares to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualShares\":\"actual subtracted shares from the borrower's accountability.\",\"assets\":\"subtracted assets from the borrower's accountability.\"}},\"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.\"},\"repay(uint256,address)\":{\"params\":{\"assets\":\"assets to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualRepay\":\"the actual amount that should be transferred into the protocol.\",\"borrowShares\":\"subtracted shares from the borrower's accountability.\"}},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"borrower\":\"address of the account that has the debt.\",\"maturity\":\"maturity date where the assets will be repaid.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept to be repaid.\",\"positionAssets\":\"amount to be paid for the borrower's debt.\"},\"returns\":{\"actualRepayAssets\":\"the actual amount that was transferred into the protocol.\"}},\"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.\"},\"seize(address,address,uint256)\":{\"details\":\"Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\",\"params\":{\"assets\":\"amount to be removed from borrower's possession.\",\"borrower\":\"address from which the assets will be seized.\",\"liquidator\":\"address which will receive the seized assets.\"}},\"setAssetSymbol(string)\":{\"params\":{\"assetSymbol\":\"the symbol for the underlying asset.\"}},\"setBackupFeeRate(uint256)\":{\"params\":{\"backupFeeRate_\":\"percentage amount represented with 18 decimals.\"}},\"setDampSpeed(uint256,uint256)\":{\"params\":{\"down\":\"damp speed down, represented with 18 decimals.\",\"up\":\"damp speed up, represented with 18 decimals.\"}},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"params\":{\"earningsAccumulatorSmoothFactor_\":\"represented with 18 decimals.\"}},\"setInterestRateModel(address)\":{\"params\":{\"interestRateModel_\":\"new interest rate model.\"}},\"setMaxFuturePools(uint8)\":{\"details\":\"If value is decreased, VALID maturities will become NOT_READY.\",\"params\":{\"futurePools\":\"number of pools to be active at the same time.\"}},\"setPenaltyRate(uint256)\":{\"params\":{\"penaltyRate_\":\"percentage represented with 18 decimals.\"}},\"setReserveFactor(uint128)\":{\"params\":{\"reserveFactor_\":\"parameter represented with 18 decimals.\"}},\"setRewardsController(address)\":{\"params\":{\"rewardsController_\":\"new rewards controller.\"}},\"setTreasury(address,uint256)\":{\"params\":{\"treasuryFeeRate_\":\"represented with 18 decimals.\",\"treasury_\":\"address of the treasury that will receive the minted eTokens.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalAssets()\":{\"returns\":{\"_0\":\"actual floatingAssets plus earnings to be accrued at current timestamp.\"}},\"totalFloatingBorrowAssets()\":{\"returns\":{\"_0\":\"actual floating debt plus projected interest.\"}},\"transfer(address,uint256)\":{\"details\":\"Makes sure that the caller doesn't have shortfall after transferring.\",\"params\":{\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Makes sure that `from` address doesn't have shortfall after transferring.\",\"params\":{\"from\":\"address from which the assets will be transferred.\",\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"withdraw(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"assets\":\"amount of underlying to be withdrawn.\",\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\"},\"returns\":{\"shares\":\"amount of shares redeemed for underlying asset.\"}},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"maturity\":\"maturity date where the assets will be withdrawn.\",\"minAssetsRequired\":\"minimum amount required by the account (if discount included for early withdrawal).\",\"owner\":\"address that previously deposited the assets.\",\"positionAssets\":\"position size to be reduced.\",\"receiver\":\"address that will receive the withdrawn assets.\"},\"returns\":{\"assetsDiscounted\":\"amount of assets withdrawn (can include a discount for early withdraw).\"}}},\"stateVariables\":{\"__gap\":{\"custom:oz-renamed-from\":\"floatingUtilization\",\"details\":\"gap from deprecated state.\"},\"auditor\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"notice\":\"Emitted when accumulator distributes earnings.\"},\"BackupFeeRateSet(uint256)\":{\"notice\":\"Emitted when the backupFeeRate parameter is changed by admin.\"},\"Borrow(address,address,address,uint256,uint256)\":{\"notice\":\"Event emitted when an account borrows amount of assets from a floating pool.\"},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account borrows amount of an asset from a certain maturity date.\"},\"DampSpeedSet(uint256,uint256)\":{\"notice\":\"Emitted when the damp speeds are changed by admin.\"},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period.\"},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"notice\":\"Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\"},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"notice\":\"Emitted when the earnings of a maturity are updated.\"},\"FloatingDebtUpdate(uint256,uint256)\":{\"notice\":\"Emitted when the floating debt is updated.\"},\"Frozen(address,bool)\":{\"notice\":\"Emitted when `account` sets the `isFrozen` flag.\"},\"InterestRateModelSet(address)\":{\"notice\":\"Emitted when the interestRateModel is changed by admin.\"},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"notice\":\"Emitted when an account's position had a liquidation.\"},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when market state is updated.\"},\"MaxFuturePoolsSet(uint256)\":{\"notice\":\"Emitted when the maxFuturePools is changed by admin.\"},\"PenaltyRateSet(uint256)\":{\"notice\":\"Emitted when the penaltyRate is changed by admin.\"},\"Repay(address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays amount of assets to a floating pool.\"},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays its borrows after maturity.\"},\"ReserveFactorSet(uint256)\":{\"notice\":\"Emitted when the reserveFactor is changed by admin.\"},\"RewardsControllerSet(address)\":{\"notice\":\"Emitted when the rewardsController is changed by admin.\"},\"Seize(address,address,uint256)\":{\"notice\":\"Emitted when an account's collateral has been seized.\"},\"SpreadBadDebt(address,uint256)\":{\"notice\":\"Emitted when an account is cleared from bad debt.\"},\"TreasurySet(address,uint256)\":{\"notice\":\"Emitted when the treasury variables are changed by admin.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account withdraws from a fixed rate pool.\"}},\"kind\":\"user\",\"methods\":{\"accountSnapshot(address)\":{\"notice\":\"Gets current snapshot for an account across all maturities.\"},\"accounts(address)\":{\"notice\":\"Tracks fixed deposit and borrow map and floating borrow shares of an account.\"},\"backupFeeRate()\":{\"notice\":\"Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\"},\"borrow(uint256,address,address)\":{\"notice\":\"Borrows a certain amount from the floating pool.\"},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Borrows a certain amount from a maturity.\"},\"clearBadDebt(address)\":{\"notice\":\"Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\"},\"dampSpeedDown()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\"},\"dampSpeedUp()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Deposits a certain amount to a maturity.\"},\"earningsAccumulator()\":{\"notice\":\"Accumulated earnings from extraordinary sources to be gradually distributed.\"},\"earningsAccumulatorSmoothFactor()\":{\"notice\":\"Factor used for gradual accrual of earnings to the floating pool.\"},\"fixedBorrowPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed borrow positions by maturity, account and position.\"},\"fixedDepositPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed deposit positions by maturity, account and position.\"},\"fixedPoolBalance(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed and supplied amount.\"},\"fixedPoolBorrowed(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed amount.\"},\"fixedPools(uint256)\":{\"notice\":\"Tracks fixed pools state by maturity.\"},\"floatingAssets()\":{\"notice\":\"Amount of floating assets deposited to the pool.\"},\"floatingAssetsAverage()\":{\"notice\":\"Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\"},\"floatingBackupBorrowed()\":{\"notice\":\"Amount of assets lent by the floating pool to the fixed pools.\"},\"floatingDebt()\":{\"notice\":\"Amount of assets lent by the floating pool to accounts.\"},\"initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"notice\":\"Initializes the contract.\"},\"interestRateModel()\":{\"notice\":\"Interest rate model contract used to get the borrow rates.\"},\"isFrozen()\":{\"notice\":\"Flag to prevent new borrows and deposits.\"},\"lastAccumulatorAccrual()\":{\"notice\":\"Last time the accumulator distributed earnings.\"},\"lastAverageUpdate()\":{\"notice\":\"Last time the floating assets average was updated.\"},\"lastFloatingDebtUpdate()\":{\"notice\":\"Last time the floating debt was updated.\"},\"liquidate(address,uint256,address)\":{\"notice\":\"Liquidates undercollateralized fixed/floating (or both) position(s).\"},\"maxFuturePools()\":{\"notice\":\"Number of fixed pools to be active at the same time.\"},\"pause()\":{\"notice\":\"Sets the pause state to true in case of emergency, triggered by an authorized account.\"},\"penaltyRate()\":{\"notice\":\"Rate per second to be charged to delayed fixed pools borrowers after maturity.\"},\"previewBorrow(uint256)\":{\"notice\":\"Simulates the effects of a borrow at the current time, given current contract conditions.\"},\"previewDebt(address)\":{\"notice\":\"Gets all borrows and penalties for an account.\"},\"previewFloatingAssetsAverage()\":{\"notice\":\"Returns the current `floatingAssetsAverage` without updating the storage variable.\"},\"previewRefund(uint256)\":{\"notice\":\"Simulates the effects of a refund at the current time, given current contract conditions.\"},\"previewRepay(uint256)\":{\"notice\":\"Simulates the effects of a repay at the current time, given current contract conditions.\"},\"redeem(uint256,address,address)\":{\"notice\":\"Redeems the owner's floating pool assets to the receiver address.\"},\"refund(uint256,address)\":{\"notice\":\"Repays a certain amount of shares to the floating pool.\"},\"repay(uint256,address)\":{\"notice\":\"Repays a certain amount of assets to the floating pool.\"},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Repays a certain amount to a maturity.\"},\"reserveFactor()\":{\"notice\":\"Percentage factor that represents the liquidity reserves that can't be borrowed.\"},\"rewardsController()\":{\"notice\":\"Address of the rewards controller that will accrue rewards for accounts operating with the Market.\"},\"seize(address,address,uint256)\":{\"notice\":\"Public function to seize a certain amount of assets.\"},\"setAssetSymbol(string)\":{\"notice\":\"Sets name and symbol for the Market.\"},\"setBackupFeeRate(uint256)\":{\"notice\":\"Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity.\"},\"setDampSpeed(uint256,uint256)\":{\"notice\":\"Sets the damp speed used to update the floatingAssetsAverage.\"},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"notice\":\"Sets the factor used when smoothly accruing earnings to the floating pool.\"},\"setFrozen(bool)\":{\"notice\":\"Sets `isFrozen` state, triggered by an authorized account.\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model to be used to calculate rates.\"},\"setMaxFuturePools(uint8)\":{\"notice\":\"Sets the protocol's max future pools for fixed borrowing and lending.\"},\"setPenaltyRate(uint256)\":{\"notice\":\"Sets the penalty rate per second.\"},\"setReserveFactor(uint128)\":{\"notice\":\"Sets the percentage that represents the liquidity reserves that can't be borrowed.\"},\"setRewardsController(address)\":{\"notice\":\"Sets the rewards controller to update account rewards when operating with the Market.\"},\"setTreasury(address,uint256)\":{\"notice\":\"Sets the treasury variables.\"},\"totalAssets()\":{\"notice\":\"Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator.\"},\"totalFloatingBorrowAssets()\":{\"notice\":\"Calculates the total floating debt, considering elapsed time since last update and current interest rate.\"},\"totalFloatingBorrowShares()\":{\"notice\":\"Total amount of floating borrow shares assigned to floating borrow accounts.\"},\"transfer(address,uint256)\":{\"notice\":\"Moves amount of shares from the caller's account to `to`.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Moves amount of shares from `from` to `to` using the allowance mechanism.\"},\"treasury()\":{\"notice\":\"Address of the treasury that will receive the allocated earnings.\"},\"treasuryFeeRate()\":{\"notice\":\"Rate to be charged by the treasury to floating and fixed borrows.\"},\"unpause()\":{\"notice\":\"Sets the pause state to false when threat is gone, triggered by an authorized account.\"},\"withdraw(uint256,address,address)\":{\"notice\":\"Withdraws the owner's floating pool assets to the receiver address.\"},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Withdraws a certain amount from a maturity.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Market.sol\":\"Market\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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 {Initializable} from \\\"../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 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 function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_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(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\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"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/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\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\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"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 (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport {Initializable} from \\\"../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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\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\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"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 {Initializable} from \\\"../../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\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"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/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\"},\"contracts/Auditor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract Auditor is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n\\n /// @notice Address that a market should have as price feed to consider as base price and avoid external price call.\\n address public constant BASE_FEED = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n /// @notice Target health factor that the account should have after it's liquidated to prevent cascade liquidations.\\n uint256 public constant TARGET_HEALTH = 1.25e18;\\n /// @notice Maximum value the liquidator can send and still have granular control of max assets.\\n /// Above this threshold, they should send `type(uint256).max`.\\n uint256 public constant ASSETS_THRESHOLD = type(uint256).max / 1e18;\\n\\n /// @notice Decimals that the answer of all price feeds should have.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 public immutable priceDecimals;\\n /// @notice Base factor to scale the price returned by the feed to 18 decimals.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable baseFactor;\\n /// @notice Base price used if the feed to fetch the price from is `BASE_FEED`.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable basePrice;\\n\\n /// @notice Tracks the markets' indexes that an account has entered as collateral.\\n mapping(address => uint256) public accountMarkets;\\n /// @notice Stores market parameters per each enabled market.\\n mapping(Market => MarketData) public markets;\\n /// @notice Array of all enabled markets.\\n Market[] public marketList;\\n\\n /// @notice Liquidation incentive factors for the liquidator and the lenders of the market where the debt is repaid.\\n LiquidationIncentive public liquidationIncentive;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(uint256 priceDecimals_) {\\n priceDecimals = priceDecimals_;\\n baseFactor = 10 ** (18 - priceDecimals_);\\n basePrice = 10 ** priceDecimals_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(LiquidationIncentive memory liquidationIncentive_) external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setLiquidationIncentive(liquidationIncentive_);\\n }\\n\\n /// @notice Allows assets of a certain market to be used as collateral for borrowing other assets.\\n /// @param market market to enabled as collateral.\\n function enterMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) != 0) return;\\n accountMarkets[msg.sender] = marketMap | marketMask;\\n\\n emit MarketEntered(market, msg.sender);\\n }\\n\\n /// @notice Removes market from sender's account liquidity calculation.\\n /// @dev Sender must not have an outstanding borrow balance in the asset, or be providing necessary collateral\\n /// for an outstanding borrow.\\n /// @param market market to be disabled as collateral.\\n function exitMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n (uint256 assets, uint256 debt) = market.accountSnapshot(msg.sender);\\n\\n // fail if the sender has a borrow balance\\n if (debt != 0) revert RemainingDebt();\\n\\n // fail if the sender is not permitted to redeem all of their assets\\n checkShortfall(market, msg.sender, assets);\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) == 0) return;\\n accountMarkets[msg.sender] = marketMap & ~marketMask;\\n\\n emit MarketExited(market, msg.sender);\\n }\\n\\n /// @notice Returns account's liquidity calculation.\\n /// @param account account in which the liquidity will be calculated.\\n /// @param marketToSimulate market in which to simulate withdraw operation.\\n /// @param withdrawAmount amount to simulate as withdraw.\\n /// @return sumCollateral sum of all collateral, already multiplied by each adjust factor (denominated in base).\\n /// @return sumDebtPlusEffects sum of all debt divided by adjust factor considering withdrawal (denominated in base).\\n function accountLiquidity(\\n address account,\\n Market marketToSimulate,\\n uint256 withdrawAmount\\n ) public view returns (uint256 sumCollateral, uint256 sumDebtPlusEffects) {\\n AccountLiquidity memory vars; // holds all our calculation results\\n\\n // for each asset the account is in\\n uint256 marketMap = accountMarkets[account];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 baseUnit = 10 ** m.decimals;\\n uint256 adjustFactor = m.adjustFactor;\\n\\n // read the balances\\n (vars.balance, vars.borrowBalance) = market.accountSnapshot(account);\\n\\n // get the normalized price of the asset (18 decimals)\\n vars.price = assetPrice(m.priceFeed);\\n\\n // sum all the collateral prices\\n sumCollateral += vars.balance.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n\\n // sum all the debt\\n sumDebtPlusEffects += vars.borrowBalance.mulDivUp(vars.price, baseUnit).divWadUp(adjustFactor);\\n\\n // simulate the effects of withdrawing from a pool\\n if (market == marketToSimulate) {\\n // calculate the effects of redeeming markets\\n // (having less collateral is the same as having more debt for this calculation)\\n if (withdrawAmount != 0) {\\n sumDebtPlusEffects += withdrawAmount.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n }\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Validates that the current state of the position and system are valid.\\n /// @dev To be called after adding the borrowed debt to the account position.\\n /// @param market address of the market where the borrow is made.\\n /// @param borrower address of the account that will repay the debt.\\n function checkBorrow(Market market, address borrower) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[borrower];\\n uint256 marketMask = 1 << m.index;\\n\\n // validate borrow state\\n if ((marketMap & marketMask) == 0) {\\n // only markets may call checkBorrow if borrower not in market\\n if (msg.sender != address(market)) revert NotMarket();\\n\\n accountMarkets[borrower] = marketMap | marketMask;\\n emit MarketEntered(market, borrower);\\n }\\n\\n // verify that current liquidity is not short\\n (uint256 collateral, uint256 debt) = accountLiquidity(borrower, Market(address(0)), 0);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Checks if the account has liquidity shortfall.\\n /// @param market address of the market where the operation will happen.\\n /// @param account address of the account to check for possible shortfall.\\n /// @param amount amount that the account wants to withdraw or transfer.\\n function checkShortfall(Market market, address account, uint256 amount) public view {\\n // if the account is not 'in' the market, bypass the liquidity check\\n if ((accountMarkets[account] & (1 << markets[market].index)) == 0) return;\\n\\n // otherwise, perform a hypothetical liquidity check to guard against shortfall\\n (uint256 collateral, uint256 debt) = accountLiquidity(account, market, amount);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Allows/rejects liquidation of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt is being repaid.\\n /// @param seizeMarket market from where the liquidator will seize assets.\\n /// @param borrower address in which the assets are being liquidated.\\n /// @param maxLiquidatorAssets maximum amount of debt the liquidator is willing to accept.\\n /// @return maxRepayAssets capped amount of debt the liquidator is allowed to repay.\\n function checkLiquidation(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 maxLiquidatorAssets\\n ) external view returns (uint256 maxRepayAssets) {\\n // if markets are listed, they have the same auditor\\n if (!markets[repayMarket].isListed || !markets[seizeMarket].isListed) revert MarketNotListed();\\n\\n MarketVars memory repay;\\n LiquidityVars memory base;\\n uint256 marketMap = accountMarkets[borrower];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage marketData = markets[market];\\n MarketVars memory m = MarketVars({\\n price: assetPrice(marketData.priceFeed),\\n adjustFactor: marketData.adjustFactor,\\n baseUnit: 10 ** marketData.decimals\\n });\\n\\n if (market == repayMarket) repay = m;\\n\\n (uint256 collateral, uint256 debt) = market.accountSnapshot(borrower);\\n\\n uint256 value = debt.mulDivUp(m.price, m.baseUnit);\\n base.totalDebt += value;\\n base.adjustedDebt += value.divWadUp(m.adjustFactor);\\n\\n value = collateral.mulDivDown(m.price, m.baseUnit);\\n base.totalCollateral += value;\\n base.adjustedCollateral += value.mulWadDown(m.adjustFactor);\\n if (market == seizeMarket) base.seizeAvailable = value;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (base.adjustedCollateral >= base.adjustedDebt) revert InsufficientShortfall();\\n\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n uint256 adjustFactor = base.adjustedCollateral.mulWadDown(base.totalDebt).divWadUp(\\n base.adjustedDebt.mulWadUp(base.totalCollateral)\\n );\\n uint256 closeFactor = (TARGET_HEALTH - base.adjustedCollateral.divWadUp(base.adjustedDebt)).divWadUp(\\n TARGET_HEALTH - adjustFactor.mulWadDown(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n );\\n maxRepayAssets = Math.min(\\n Math\\n .min(\\n base.totalDebt.mulWadUp(Math.min(1e18, closeFactor)),\\n base.seizeAvailable.divWadUp(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n )\\n .mulDivUp(repay.baseUnit, repay.price),\\n maxLiquidatorAssets < ASSETS_THRESHOLD\\n ? maxLiquidatorAssets.divWadDown(1e18 + memIncentive.lenders)\\n : maxLiquidatorAssets\\n );\\n }\\n\\n /// @notice Allow/rejects seizing of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market where the assets will be seized.\\n function checkSeize(Market repayMarket, Market seizeMarket) external view {\\n // if markets are listed, they also point to the same Auditor\\n if (!markets[seizeMarket].isListed || !markets[repayMarket].isListed) revert MarketNotListed();\\n }\\n\\n /// @notice Calculates the amount of collateral to be seized when a position is undercollateralized.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market from where the assets will be seized by the liquidator.\\n /// @param borrower account in which assets are being seized.\\n /// @param actualRepayAssets amount being repaid.\\n /// @return lendersAssets amount to be added for other lenders as a compensation of bad debt clearing.\\n /// @return seizeAssets amount that can be seized by the liquidator.\\n function calculateSeize(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 actualRepayAssets\\n ) external view returns (uint256 lendersAssets, uint256 seizeAssets) {\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n lendersAssets = actualRepayAssets.mulWadDown(memIncentive.lenders);\\n\\n // read prices for borrowed and collateral markets\\n uint256 priceBorrowed = assetPrice(markets[repayMarket].priceFeed);\\n uint256 priceCollateral = assetPrice(markets[seizeMarket].priceFeed);\\n uint256 baseAmount = actualRepayAssets.mulDivUp(priceBorrowed, 10 ** markets[repayMarket].decimals);\\n\\n seizeAssets = Math.min(\\n baseAmount.mulDivUp(10 ** markets[seizeMarket].decimals, priceCollateral).mulWadUp(\\n 1e18 + memIncentive.liquidator + memIncentive.lenders\\n ),\\n seizeMarket.maxWithdraw(borrower)\\n );\\n }\\n\\n /// @notice Checks if account has debt with no collateral, if so then call `clearBadDebt` from each market.\\n /// @dev Collateral is multiplied by price and adjust factor to be accurately evaluated as positive collateral asset.\\n /// @param account account in which debt is being checked.\\n function handleBadDebt(address account) external {\\n uint256 memMarketMap = accountMarkets[account];\\n uint256 marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 assets = market.maxWithdraw(account);\\n if (assets.mulDivDown(assetPrice(m.priceFeed), 10 ** m.decimals).mulWadDown(m.adjustFactor) > 0) return;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) marketList[i].clearBadDebt(account);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the asset price of a price feed.\\n /// @dev If Chainlink's asset price is <= 0 the call is reverted.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price.\\n /// @return The price of the asset scaled to 18-digit decimals.\\n function assetPrice(IPriceFeed priceFeed) public view returns (uint256) {\\n if (address(priceFeed) == BASE_FEED) return basePrice;\\n\\n int256 price = priceFeed.latestAnswer();\\n if (price <= 0) revert InvalidPrice();\\n return uint256(price) * baseFactor;\\n }\\n\\n /// @notice Retrieves all markets.\\n function allMarkets() external view returns (Market[] memory) {\\n return marketList;\\n }\\n\\n /// @notice Enables a certain market.\\n /// @dev Enabling more than 256 markets will cause an overflow when casting market index to uint8.\\n /// @param market market to add to the protocol.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n /// @param adjustFactor market's adjust factor for the underlying asset.\\n function enableMarket(\\n Market market,\\n IPriceFeed priceFeed,\\n uint128 adjustFactor\\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (market.auditor() != this) revert AuditorMismatch();\\n if (markets[market].isListed) revert MarketAlreadyListed();\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n\\n uint8 decimals = market.decimals();\\n markets[market] = MarketData({\\n isListed: true,\\n adjustFactor: adjustFactor,\\n decimals: decimals,\\n index: uint8(marketList.length),\\n priceFeed: priceFeed\\n });\\n\\n marketList.push(market);\\n\\n emit MarketListed(market, decimals);\\n emit PriceFeedSet(market, priceFeed);\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the adjust factor for a certain market.\\n /// @param market address of the market to change adjust factor for.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n function setAdjustFactor(Market market, uint128 adjustFactor) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (!markets[market].isListed) revert MarketNotListed();\\n\\n markets[market].adjustFactor = adjustFactor;\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the Chainlink Price Feed Aggregator source for a market.\\n /// @param market market address of the asset.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n function setPriceFeed(Market market, IPriceFeed priceFeed) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n markets[market].priceFeed = priceFeed;\\n emit PriceFeedSet(market, priceFeed);\\n }\\n\\n /// @notice Sets liquidation incentive (liquidator and lenders) for the whole ecosystem.\\n /// @param liquidationIncentive_ new liquidation incentive.\\n function setLiquidationIncentive(\\n LiquidationIncentive memory liquidationIncentive_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n liquidationIncentive = liquidationIncentive_;\\n emit LiquidationIncentiveSet(liquidationIncentive_);\\n }\\n\\n /// @notice Emitted when a new market is listed for borrow/lending.\\n /// @param market address of the market that was listed.\\n /// @param decimals decimals of the market's underlying asset.\\n event MarketListed(Market indexed market, uint8 decimals);\\n\\n /// @notice Emitted when an account enters a market to use his deposit as collateral for a loan.\\n /// @param market address of the market that the account entered.\\n /// @param account address of the account that just entered a market.\\n event MarketEntered(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when an account leaves a market.\\n /// Means that they would stop using their deposit as collateral and won't ask for any loans in this market.\\n /// @param market address of the market that the account just left.\\n /// @param account address of the account that just left a market.\\n event MarketExited(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when a adjust factor is changed by admin.\\n /// @param market address of the market that has a new adjust factor.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n event AdjustFactorSet(Market indexed market, uint256 adjustFactor);\\n\\n /// @notice Emitted when a new liquidationIncentive has been set.\\n /// @param liquidationIncentive represented with 18 decimals.\\n event LiquidationIncentiveSet(LiquidationIncentive liquidationIncentive);\\n\\n /// @notice Emitted when a market and prie feed is changed by admin.\\n /// @param market address of the asset used to get the price.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n event PriceFeedSet(Market indexed market, IPriceFeed indexed priceFeed);\\n\\n /// @notice Stores the market parameters used for liquidity calculations.\\n /// @param adjustFactor used to asses the lending power of the market's underlying asset.\\n /// @param decimals number of decimals of the market's underlying asset.\\n /// @param index index of the market in the `marketList`.\\n /// @param isListed true if the market is enabled.\\n /// @param priceFeed address of the price feed used to query the asset's price.\\n struct MarketData {\\n uint128 adjustFactor;\\n uint8 decimals;\\n uint8 index;\\n bool isListed;\\n IPriceFeed priceFeed;\\n }\\n\\n /// @notice Stores the liquidator and lenders factors used in liquidations to calculate the amount to seize.\\n /// @param liquidator factor used to calculate the extra bonus a liquidator can seize.\\n /// @param lenders factor used to calculate the bonus that the pool lenders receive.\\n struct LiquidationIncentive {\\n uint128 liquidator;\\n uint128 lenders;\\n }\\n\\n /// @notice Used as memory access to temporary store account liquidity data.\\n /// @param balance collateral balance of the account.\\n /// @param borrowBalance borrow balance of the account.\\n /// @param price asset price returned by the price feed with 18 decimals.\\n struct AccountLiquidity {\\n uint256 balance;\\n uint256 borrowBalance;\\n uint256 price;\\n }\\n}\\n\\nerror AuditorMismatch();\\nerror InsufficientAccountLiquidity();\\nerror InsufficientShortfall();\\nerror InvalidPrice();\\nerror InvalidPriceFeed();\\nerror MarketAlreadyListed();\\nerror MarketNotListed();\\nerror NotMarket();\\nerror RemainingDebt();\\n\\nstruct MarketVars {\\n uint256 price;\\n uint256 baseUnit;\\n uint128 adjustFactor;\\n}\\n\\nstruct LiquidityVars {\\n uint256 totalDebt;\\n uint256 totalCollateral;\\n uint256 adjustedDebt;\\n uint256 adjustedCollateral;\\n uint256 seizeAvailable;\\n}\\n\",\"keccak256\":\"0xa5facf0b53ee0f3a07843361add23000e569743c9b5a3cdf7817dc51a833040b\",\"license\":\"BUSL-1.1\"},\"contracts/InterestRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract InterestRateModel {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for int256;\\n using SafeCast for uint256;\\n using SafeCast for int256;\\n\\n /// @notice Scale factor of the floating curve.\\n uint256 public immutable floatingCurveA;\\n /// @notice Origin intercept of the floating curve.\\n int256 public immutable floatingCurveB;\\n /// @notice Asymptote of the floating curve.\\n uint256 public immutable floatingMaxUtilization;\\n\\n /// @notice natural level of utilization, represented with 18 decimals.\\n uint256 public immutable naturalUtilization;\\n /// @notice speed of growth for the base rate, represented with 18 decimals.\\n int256 public immutable growthSpeed;\\n /// @notice speed of the sigmoid curve, represented with 18 decimals.\\n int256 public immutable sigmoidSpeed;\\n /// @notice spread factor for the fixed rate, represented with 18 decimals.\\n int256 public immutable spreadFactor;\\n /// @notice speed of maturity for the fixed rate, represented with 18 decimals.\\n int256 public immutable maturitySpeed;\\n /// @notice time preference for the fixed rate, represented with 18 decimals.\\n int256 public immutable timePreference;\\n /// @notice liquidity naturally designated to fixed pools, represented with 18 decimals.\\n uint256 public immutable fixedAllocation;\\n /// @notice maximum interest rate, represented with 18 decimals.\\n uint256 public immutable maxRate;\\n\\n /// @dev maximum input value for expWad, ~ln((2^255 - 1) / 1e18), represented with 18 decimals.\\n int256 internal constant EXP_THRESHOLD = 135305999368893231588;\\n /// @dev auxiliary variable to save an extra operation.\\n int256 internal immutable auxSigmoid;\\n\\n /// @notice set of parameters used to initialize the interest rate model.\\n Parameters internal _parameters;\\n\\n constructor(Parameters memory p, Market market_) {\\n assert(\\n p.minRate > 0 &&\\n p.naturalRate > 0 &&\\n p.maxUtilization > 1e18 &&\\n p.naturalUtilization > 0 &&\\n p.naturalUtilization < 1e18 &&\\n p.growthSpeed > 0 &&\\n p.sigmoidSpeed > 0 &&\\n p.spreadFactor > 0 &&\\n p.maturitySpeed > 0 &&\\n p.maxRate > 0 &&\\n p.maxRate <= 15_000e16\\n );\\n\\n _parameters = p;\\n growthSpeed = p.growthSpeed.toInt256();\\n sigmoidSpeed = p.sigmoidSpeed.toInt256();\\n spreadFactor = p.spreadFactor.toInt256();\\n maturitySpeed = p.maturitySpeed.toInt256();\\n floatingMaxUtilization = p.maxUtilization;\\n naturalUtilization = p.naturalUtilization;\\n\\n floatingCurveA =\\n ((p.naturalRate.mulWadUp(\\n uint256(((growthSpeed * (1e18 - int256(p.naturalUtilization / 2)).lnWad()) / 1e18).expWad())\\n ) - p.minRate) *\\n (p.maxUtilization - p.naturalUtilization) *\\n (p.maxUtilization)) /\\n (p.naturalUtilization * 1e18);\\n floatingCurveB = int256(p.minRate) - int256(floatingCurveA.divWadDown(p.maxUtilization));\\n\\n market = market_;\\n fixedCurveA = address(market_) != address(0) ? floatingCurveA : 0;\\n fixedCurveB = address(market_) != address(0) ? floatingCurveB : int256(0);\\n fixedMaxUtilization = address(market_) != address(0) ? p.maxUtilization : 0;\\n\\n timePreference = p.timePreference;\\n fixedAllocation = p.fixedAllocation;\\n maxRate = p.maxRate;\\n\\n auxSigmoid = int256(naturalUtilization.divWadDown(1e18 - naturalUtilization)).lnWad();\\n\\n // reverts if it's an invalid curve (such as one yielding a negative interest rate).\\n fixedRate(block.timestamp + FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL), 2, 1, 1, 2);\\n baseRate(1e18 - 1, 1e18 - 1);\\n }\\n\\n /// @notice fixed rate with given conditions, represented with 18 decimals.\\n /// @param maturity maturity of the pool.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param uFixed fixed utilization of the pool.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `base * spread` and `maxRate` with given conditions.\\n function fixedRate(\\n uint256 maturity,\\n uint256 maxPools,\\n uint256 uFixed,\\n uint256 uFloating,\\n uint256 uGlobal\\n ) public view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n if (uFixed > uGlobal) revert UtilizationExceeded();\\n if (uGlobal == 0) return baseRate(uFloating, 0);\\n\\n FixedVars memory v;\\n v.sqFNatPools = (maxPools * 1e18).divWadDown(fixedAllocation);\\n v.fNatPools = (v.sqFNatPools * 1e18).sqrt();\\n v.fixedFactor = (maxPools * uFixed).mulDivDown(1e36, uGlobal * fixedAllocation);\\n v.natPools =\\n ((2e18 - v.sqFNatPools.toInt256()) * 1e36) /\\n (v.fNatPools.toInt256() * (1e18 - v.fNatPools.toInt256()));\\n v.maturityFactor = (maturity - block.timestamp).divWadDown(\\n block.timestamp + maxPools * FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL)\\n );\\n\\n uint256 spread = (1e18 +\\n (((maturitySpeed * (v.maturityFactor).toInt256().lnWad()) / 1e18).expWad() *\\n (timePreference +\\n (spreadFactor *\\n ((v.natPools * (v.fixedFactor * 1e18).sqrt().toInt256()) /\\n 1e18 +\\n ((1e18 - v.natPools) * v.fixedFactor.toInt256()) /\\n 1e18 -\\n 1e18)) /\\n 1e18)) /\\n 1e18).toUint256();\\n uint256 base = baseRate(uFloating, uGlobal);\\n\\n if (base >= maxRate.divWadDown(spread)) return maxRate;\\n return base.mulWadUp(spread);\\n }\\n\\n /// @notice base rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the base rate, without capping.\\n function baseRate(uint256 uFloating, uint256 uGlobal) internal view returns (uint256) {\\n if (uFloating > uGlobal) revert UtilizationExceeded();\\n if (uGlobal >= 1e18) return type(uint256).max;\\n\\n uint256 r = ((floatingCurveA.divWadDown(floatingMaxUtilization - uFloating)).toInt256() + floatingCurveB)\\n .toUint256();\\n\\n if (uGlobal == 0) return r;\\n\\n int256 x = -((sigmoidSpeed * (int256(uGlobal.divWadDown(1e18 - uGlobal)).lnWad() - auxSigmoid)) / 1e18);\\n uint256 sigmoid = x > EXP_THRESHOLD ? 0 : uint256(1e18).divWadDown(1e18 + x.expWad().toUint256());\\n x = (-growthSpeed * (1e18 - sigmoid.mulWadDown(uGlobal)).toInt256().lnWad()) / 1e18;\\n uint256 globalFactor = ((x > EXP_THRESHOLD ? EXP_THRESHOLD : x).expWad()).toUint256();\\n\\n if (globalFactor > type(uint256).max / r) return type(uint256).max;\\n\\n return r.mulWadUp(globalFactor);\\n }\\n\\n /// @notice floating rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `baseRate` and `maxRate` with given conditions.\\n function floatingRate(uint256 uFloating, uint256 uGlobal) public view returns (uint256) {\\n return Math.min(baseRate(uFloating, uGlobal), maxRate);\\n }\\n\\n function parameters() external view returns (Parameters memory) {\\n return _parameters;\\n }\\n\\n // Legacy interface, kept for compatibility.\\n\\n /// @notice Market where the interest rate model is used. Keeps compatibility with legacy interest rate model.\\n Market public immutable market;\\n uint256 public immutable fixedCurveA;\\n int256 public immutable fixedCurveB;\\n uint256 public immutable fixedMaxUtilization;\\n\\n /// @dev Deprecated in favor of `floatingRate(uFloating, uGlobal)`.\\n function floatingRate(uint256) public view returns (uint256) {\\n uint256 floatingAssets = market.floatingAssets();\\n uint256 floatingDebt = market.floatingDebt();\\n return\\n floatingRate(\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed())\\n );\\n }\\n\\n /// @dev Deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function fixedBorrowRate(\\n uint256 maturity,\\n uint256 amount,\\n uint256 borrowed,\\n uint256 supplied,\\n uint256\\n ) external view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n uint256 floatingAssets = previewFloatingAssetsAverage(maturity);\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n uint256 newBorrowed = borrowed + amount;\\n uint256 backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, supplied), newBorrowed);\\n\\n return\\n fixedRate(\\n maturity,\\n market.maxFuturePools(),\\n fixedUtilization(supplied, newBorrowed, floatingAssets),\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed() + backupDebtAddition)\\n ).mulDivDown(maturity - block.timestamp, 365 days);\\n }\\n\\n /// @dev deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function minFixedRate(uint256, uint256, uint256) external view returns (uint256 rate, uint256 utilization) {\\n uint256 floatingAssets = market.floatingAssetsAverage();\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n utilization = globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed());\\n rate = baseRate(floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0, utilization);\\n }\\n\\n function previewFloatingAssetsAverage(uint256 maturity) internal view returns (uint256) {\\n FixedLib.Pool memory pool;\\n (pool.borrowed, pool.supplied, pool.unassignedEarnings, pool.lastAccrual) = market.fixedPools(maturity);\\n uint256 memFloatingAssets = market.floatingAssets() +\\n pool.unassignedEarnings.mulDivDown(block.timestamp - pool.lastAccrual, maturity - pool.lastAccrual);\\n uint256 memFloatingAssetsAverage = market.floatingAssetsAverage();\\n uint256 averageFactor = (1e18 -\\n (\\n -int256(\\n memFloatingAssets < memFloatingAssetsAverage\\n ? market.dampSpeedDown()\\n : market.dampSpeedUp() * (block.timestamp - market.lastAverageUpdate())\\n )\\n ).expWad()).toUint256();\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n function globalUtilization(\\n uint256 floatingAssets,\\n uint256 floatingDebt,\\n uint256 backupBorrowed\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 ? (floatingDebt + backupBorrowed).divWadUp(floatingAssets) : 0;\\n }\\n\\n function fixedUtilization(\\n uint256 supplied,\\n uint256 borrowed,\\n uint256 floatingAssets\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(floatingAssets) : 0;\\n }\\n}\\n\\nerror AlreadyMatured();\\nerror UtilizationExceeded();\\n\\nstruct Parameters {\\n uint256 minRate;\\n uint256 naturalRate;\\n uint256 maxUtilization;\\n uint256 naturalUtilization;\\n uint256 growthSpeed;\\n uint256 sigmoidSpeed;\\n uint256 spreadFactor;\\n uint256 maturitySpeed;\\n int256 timePreference;\\n uint256 fixedAllocation;\\n uint256 maxRate;\\n}\\n\\nstruct FixedVars {\\n uint256 sqFNatPools;\\n uint256 fNatPools;\\n uint256 fixedFactor;\\n int256 natPools;\\n uint256 maturityFactor;\\n}\\n\",\"keccak256\":\"0x9df5219d8182a14f123a725c73a586aed83c3d39c17b45a0a59e3923e4fe6532\",\"license\":\"BUSL-1.1\"},\"contracts/Market.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { PausableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { ERC4626, ERC20, SafeTransferLib } from \\\"solmate/src/mixins/ERC4626.sol\\\";\\nimport { InterestRateModel } from \\\"./InterestRateModel.sol\\\";\\nimport { RewardsController } from \\\"./RewardsController.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Auditor } from \\\"./Auditor.sol\\\";\\n\\ncontract Market is Initializable, AccessControlUpgradeable, PausableUpgradeable, ERC4626 {\\n using FixedPointMathLib for int256;\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint128;\\n using SafeTransferLib for ERC20;\\n using FixedLib for FixedLib.Pool;\\n using FixedLib for FixedLib.Position;\\n using FixedLib for uint256;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant EMERGENCY_ADMIN_ROLE = keccak256(\\\"EMERGENCY_ADMIN_ROLE\\\");\\n\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n Auditor public immutable auditor;\\n\\n /// @notice Tracks account's fixed deposit positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedDepositPositions;\\n /// @notice Tracks account's fixed borrow positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedBorrowPositions;\\n /// @notice Tracks fixed pools state by maturity.\\n mapping(uint256 => FixedLib.Pool) public fixedPools;\\n\\n /// @notice Tracks fixed deposit and borrow map and floating borrow shares of an account.\\n mapping(address => Account) public accounts;\\n\\n /// @notice Amount of assets lent by the floating pool to the fixed pools.\\n uint256 public floatingBackupBorrowed;\\n /// @notice Amount of assets lent by the floating pool to accounts.\\n uint256 public floatingDebt;\\n\\n /// @notice Accumulated earnings from extraordinary sources to be gradually distributed.\\n uint256 public earningsAccumulator;\\n /// @notice Rate per second to be charged to delayed fixed pools borrowers after maturity.\\n uint256 public penaltyRate;\\n /// @notice Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\\n uint256 public backupFeeRate;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\\n uint256 public dampSpeedUp;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\\n uint256 public dampSpeedDown;\\n\\n /// @notice Number of fixed pools to be active at the same time.\\n uint8 public maxFuturePools;\\n /// @notice Last time the accumulator distributed earnings.\\n uint32 public lastAccumulatorAccrual;\\n /// @notice Last time the floating debt was updated.\\n uint32 public lastFloatingDebtUpdate;\\n /// @notice Last time the floating assets average was updated.\\n uint32 public lastAverageUpdate;\\n\\n /// @notice Interest rate model contract used to get the borrow rates.\\n InterestRateModel public interestRateModel;\\n\\n /// @notice Factor used for gradual accrual of earnings to the floating pool.\\n uint128 public earningsAccumulatorSmoothFactor;\\n /// @notice Percentage factor that represents the liquidity reserves that can't be borrowed.\\n uint128 public reserveFactor;\\n\\n /// @notice Amount of floating assets deposited to the pool.\\n uint256 public floatingAssets;\\n /// @notice Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\\n uint256 public floatingAssetsAverage;\\n\\n /// @notice Total amount of floating borrow shares assigned to floating borrow accounts.\\n uint256 public totalFloatingBorrowShares;\\n\\n /// @dev gap from deprecated state.\\n /// @custom:oz-renamed-from floatingUtilization\\n uint256 private __gap;\\n\\n /// @notice Address of the treasury that will receive the allocated earnings.\\n address public treasury;\\n /// @notice Rate to be charged by the treasury to floating and fixed borrows.\\n uint256 public treasuryFeeRate;\\n\\n /// @notice Address of the rewards controller that will accrue rewards for accounts operating with the Market.\\n RewardsController public rewardsController;\\n\\n /// @notice Flag to prevent new borrows and deposits.\\n bool public isFrozen;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(ERC20 asset_, Auditor auditor_) ERC4626(asset_, \\\"\\\", \\\"\\\") {\\n auditor = auditor_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(\\n string calldata assetSymbol,\\n uint8 maxFuturePools_,\\n uint128 earningsAccumulatorSmoothFactor_,\\n InterestRateModel interestRateModel_,\\n uint256 penaltyRate_,\\n uint256 backupFeeRate_,\\n uint128 reserveFactor_,\\n uint256 dampSpeedUp_,\\n uint256 dampSpeedDown_\\n ) external initializer {\\n __AccessControl_init();\\n __Pausable_init();\\n\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n lastAverageUpdate = uint32(block.timestamp);\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setAssetSymbol(assetSymbol);\\n setMaxFuturePools(maxFuturePools_);\\n setEarningsAccumulatorSmoothFactor(earningsAccumulatorSmoothFactor_);\\n setInterestRateModel(interestRateModel_);\\n setPenaltyRate(penaltyRate_);\\n setBackupFeeRate(backupFeeRate_);\\n setReserveFactor(reserveFactor_);\\n setDampSpeed(dampSpeedUp_, dampSpeedDown_);\\n }\\n\\n /// @notice Borrows a certain amount from the floating pool.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return borrowShares shares corresponding to the borrowed assets.\\n function borrow(\\n uint256 assets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 borrowShares) {\\n spendAllowance(borrower, assets);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n\\n borrowShares = previewBorrow(assets);\\n\\n uint256 newFloatingDebt = floatingDebt + assets;\\n floatingDebt = newFloatingDebt;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed, also considering the reserves\\n if (floatingBackupBorrowed + newFloatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n\\n totalFloatingBorrowShares += borrowShares;\\n accounts[borrower].floatingBorrowShares += borrowShares;\\n\\n emit Borrow(msg.sender, receiver, borrower, assets, borrowShares);\\n emitMarketUpdate();\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Repays a certain amount of assets to the floating pool.\\n /// @param assets assets to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepay the actual amount that should be transferred into the protocol.\\n /// @return borrowShares subtracted shares from the borrower's accountability.\\n function repay(\\n uint256 assets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepay, uint256 borrowShares) {\\n (actualRepay, borrowShares) = noTransferRefund(previewRepay(assets), borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), actualRepay);\\n }\\n\\n /// @notice Repays a certain amount of shares to the floating pool.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return assets subtracted assets from the borrower's accountability.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function refund(\\n uint256 borrowShares,\\n address borrower\\n ) external whenNotPaused returns (uint256 assets, uint256 actualShares) {\\n (assets, actualShares) = noTransferRefund(borrowShares, borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Allows to (partially) repay a floating borrow. It does not transfer assets.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower the address of the account that has the debt.\\n /// @return assets the actual amount that should be transferred into the protocol.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function noTransferRefund(\\n uint256 borrowShares,\\n address borrower\\n ) internal returns (uint256 assets, uint256 actualShares) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n Account storage account = accounts[borrower];\\n uint256 accountBorrowShares = account.floatingBorrowShares;\\n actualShares = Math.min(borrowShares, accountBorrowShares);\\n assets = previewRefund(actualShares);\\n\\n if (assets == 0) revert ZeroRepay();\\n\\n floatingDebt -= assets;\\n account.floatingBorrowShares = accountBorrowShares - actualShares;\\n totalFloatingBorrowShares -= actualShares;\\n\\n emit Repay(msg.sender, borrower, assets, actualShares);\\n }\\n\\n /// @notice Deposits a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be deposited.\\n /// @param assets amount to receive from the msg.sender.\\n /// @param minAssetsRequired minimum amount of assets required by the depositor for the transaction to be accepted.\\n /// @param receiver address that will be able to withdraw the deposited assets.\\n /// @return positionAssets total amount of assets (principal + fee) to be withdrawn at maturity.\\n function depositAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 minAssetsRequired,\\n address receiver\\n ) external whenNotPaused whenNotFrozen returns (uint256 positionAssets) {\\n if (assets == 0) revert ZeroDeposit();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n floatingAssets += backupEarnings;\\n\\n (uint256 fee, uint256 backupFee) = pool.calculateDeposit(assets, backupFeeRate);\\n positionAssets = assets + fee;\\n if (positionAssets < minAssetsRequired) revert Disagreement();\\n\\n floatingBackupBorrowed -= pool.deposit(assets);\\n pool.unassignedEarnings -= fee + backupFee;\\n earningsAccumulator += backupFee;\\n\\n // update account's position\\n FixedLib.Position storage position = fixedDepositPositions[maturity][receiver];\\n\\n // if account doesn't have a current position, add it to the list\\n if (position.principal == 0) {\\n Account storage account = accounts[receiver];\\n account.fixedDeposits = account.fixedDeposits.setMaturity(maturity);\\n }\\n\\n position.principal += assets;\\n position.fee += fee;\\n\\n emit DepositAtMaturity(maturity, msg.sender, receiver, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Borrows a certain amount from a maturity.\\n /// @param maturity maturity date for repayment.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return assetsOwed total amount of assets (principal + fee) to be repaid at maturity.\\n function borrowAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 maxAssets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 assetsOwed) {\\n if (assets == 0) revert ZeroBorrow();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n {\\n uint256 backupDebtAddition = pool.borrow(assets);\\n if (backupDebtAddition != 0) {\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed + backupDebtAddition;\\n depositToTreasury(updateFloatingDebt());\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n }\\n uint256 fee;\\n {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, floatingBackupBorrowed)\\n );\\n fee = assets.mulWadDown(fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n }\\n assetsOwed = assets + fee;\\n\\n // validate that the account is not taking arbitrary fees\\n if (assetsOwed > maxAssets) revert Disagreement();\\n\\n spendAllowance(borrower, assetsOwed);\\n\\n {\\n // if account doesn't have a current position, add it to the list\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n if (position.principal == 0) {\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.setMaturity(maturity);\\n }\\n\\n // calculate what portion of the fees are to be accrued and what portion goes to earnings accumulator\\n (uint256 newUnassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(fee),\\n assets\\n );\\n if (newUnassignedEarnings != 0) pool.unassignedEarnings += newUnassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n fixedBorrowPositions[maturity][borrower] = FixedLib.Position(position.principal + assets, position.fee + fee);\\n }\\n\\n emit BorrowAtMaturity(maturity, msg.sender, receiver, borrower, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Withdraws a certain amount from a maturity.\\n /// @param maturity maturity date where the assets will be withdrawn.\\n /// @param positionAssets position size to be reduced.\\n /// @param minAssetsRequired minimum amount required by the account (if discount included for early withdrawal).\\n /// @param receiver address that will receive the withdrawn assets.\\n /// @param owner address that previously deposited the assets.\\n /// @return assetsDiscounted amount of assets withdrawn (can include a discount for early withdraw).\\n function withdrawAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 minAssetsRequired,\\n address receiver,\\n address owner\\n ) external whenNotPaused returns (uint256 assetsDiscounted) {\\n if (positionAssets == 0) revert ZeroWithdraw();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n FixedLib.Position memory position = fixedDepositPositions[maturity][owner];\\n\\n if (positionAssets > position.principal + position.fee) positionAssets = position.principal + position.fee;\\n\\n {\\n // remove the supply from the fixed rate pool\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed +\\n pool.withdraw(\\n FixedLib.Position(position.principal, position.fee).scaleProportionally(positionAssets).principal\\n );\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets) revert InsufficientProtocolLiquidity();\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n\\n // verify if there are any penalties/fee for the account because of early withdrawal, if so discount\\n if (block.timestamp < maturity) {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingBackupBorrowed = floatingBackupBorrowed;\\n\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, memFloatingBackupBorrowed)\\n );\\n assetsDiscounted = positionAssets.divWadDown(1e18 + fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n } else {\\n assetsDiscounted = positionAssets;\\n }\\n\\n if (assetsDiscounted < minAssetsRequired) revert Disagreement();\\n\\n spendAllowance(owner, assetsDiscounted);\\n\\n // all the fees go to unassigned or to the floating pool\\n (uint256 unassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(positionAssets - assetsDiscounted),\\n assetsDiscounted\\n );\\n pool.unassignedEarnings += unassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n // the account gets discounted the full amount\\n position.reduceProportionally(positionAssets);\\n if (position.principal | position.fee == 0) {\\n delete fixedDepositPositions[maturity][owner];\\n Account storage account = accounts[owner];\\n account.fixedDeposits = account.fixedDeposits.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedDepositPositions[maturity][owner] = position;\\n }\\n\\n emit WithdrawAtMaturity(maturity, msg.sender, receiver, owner, positionAssets, assetsDiscounted);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransfer(receiver, assetsDiscounted);\\n }\\n\\n /// @notice Repays a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be repaid.\\n /// @param positionAssets amount to be paid for the borrower's debt.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepayAssets the actual amount that was transferred into the protocol.\\n function repayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepayAssets) {\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n actualRepayAssets = noTransferRepayAtMaturity(maturity, positionAssets, maxAssets, borrower, true);\\n emitMarketUpdate();\\n\\n asset.safeTransferFrom(msg.sender, address(this), actualRepayAssets);\\n }\\n\\n /// @notice Allows to (partially) repay a fixed rate position. It does not transfer assets.\\n /// @param maturity the maturity to access the pool.\\n /// @param positionAssets the amount of debt of the pool that should be paid.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower the address of the account that has the debt.\\n /// @param canDiscount should early repay discounts be applied.\\n /// @return actualRepayAssets the actual amount that should be transferred into the protocol.\\n function noTransferRepayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower,\\n bool canDiscount\\n ) internal returns (uint256 actualRepayAssets) {\\n if (positionAssets == 0) revert ZeroRepay();\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n floatingAssets += backupEarnings;\\n\\n FixedLib.Position memory position = fixedBorrowPositions[maturity][borrower];\\n\\n uint256 debtCovered = Math.min(positionAssets, position.principal + position.fee);\\n\\n uint256 principalCovered = FixedLib\\n .Position(position.principal, position.fee)\\n .scaleProportionally(debtCovered)\\n .principal;\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n // early repayment allows a discount from the unassigned earnings\\n if (block.timestamp < maturity) {\\n if (canDiscount) {\\n // calculate the deposit fee considering the amount of debt the account'll pay\\n (uint256 discountFee, uint256 backupFee) = pool.calculateDeposit(principalCovered, backupFeeRate);\\n\\n // remove the fee from unassigned earnings\\n pool.unassignedEarnings -= discountFee + backupFee;\\n\\n // the fee charged to the fixed pool supplier goes to the earnings accumulator\\n earningsAccumulator += backupFee;\\n\\n // the fee gets discounted from the account through `actualRepayAssets`\\n actualRepayAssets = debtCovered - discountFee;\\n } else {\\n actualRepayAssets = debtCovered;\\n }\\n } else {\\n actualRepayAssets = debtCovered + debtCovered.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n\\n // all penalties go to the earnings accumulator\\n earningsAccumulator += actualRepayAssets - debtCovered;\\n }\\n\\n // verify that the account agrees to this discount or penalty\\n if (actualRepayAssets > maxAssets) revert Disagreement();\\n\\n // reduce the borrowed from the pool and might decrease the floating backup borrowed\\n floatingBackupBorrowed -= pool.repay(principalCovered);\\n\\n // update the account position\\n position.reduceProportionally(debtCovered);\\n if (position.principal | position.fee == 0) {\\n delete fixedBorrowPositions[maturity][borrower];\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedBorrowPositions[maturity][borrower] = position;\\n }\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, actualRepayAssets, debtCovered);\\n emitFixedEarningsUpdate(maturity);\\n }\\n\\n /// @notice Liquidates undercollateralized fixed/floating (or both) position(s).\\n /// @dev Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool,\\n /// or/and for multiple fixed pools, seizing a portion of borrower's collateral.\\n /// @param borrower account that has an outstanding debt across floating or fixed pools.\\n /// @param maxAssets maximum amount of debt that the liquidator is willing to accept. (it can be less)\\n /// @param seizeMarket market from which the collateral will be seized to give to the liquidator.\\n /// @return repaidAssets actual amount repaid.\\n function liquidate(\\n address borrower,\\n uint256 maxAssets,\\n Market seizeMarket\\n ) external whenNotPaused returns (uint256 repaidAssets) {\\n if (msg.sender == borrower) revert SelfLiquidation();\\n\\n maxAssets = auditor.checkLiquidation(this, seizeMarket, borrower, maxAssets);\\n if (maxAssets == 0) revert ZeroRepay();\\n\\n Account storage account = accounts[borrower];\\n\\n {\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0 && maxAssets != 0) {\\n if (packedMaturities & 1 != 0) {\\n uint256 actualRepay;\\n if (block.timestamp < maturity) {\\n actualRepay = noTransferRepayAtMaturity(maturity, maxAssets, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n } else {\\n uint256 position;\\n {\\n FixedLib.Position storage p = fixedBorrowPositions[maturity][borrower];\\n position = p.principal + p.fee;\\n }\\n uint256 debt = position + position.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n actualRepay = debt > maxAssets ? maxAssets.mulDivDown(position, debt) : maxAssets;\\n\\n if (actualRepay == 0) maxAssets = 0;\\n else {\\n actualRepay = noTransferRepayAtMaturity(maturity, actualRepay, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n }\\n }\\n repaidAssets += actualRepay;\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n\\n if (maxAssets != 0 && account.floatingBorrowShares != 0) {\\n uint256 borrowShares = previewRepay(maxAssets);\\n if (borrowShares != 0) {\\n (uint256 actualRepayAssets, ) = noTransferRefund(borrowShares, borrower);\\n repaidAssets += actualRepayAssets;\\n }\\n }\\n\\n // reverts on failure\\n (uint256 lendersAssets, uint256 seizeAssets) = auditor.calculateSeize(this, seizeMarket, borrower, repaidAssets);\\n earningsAccumulator += lendersAssets;\\n\\n if (address(seizeMarket) == address(this)) {\\n internalSeize(this, msg.sender, borrower, seizeAssets);\\n } else {\\n seizeMarket.seize(msg.sender, borrower, seizeAssets);\\n\\n emitMarketUpdate();\\n }\\n\\n emit Liquidate(msg.sender, borrower, repaidAssets, lendersAssets, seizeMarket, seizeAssets);\\n\\n auditor.handleBadDebt(borrower);\\n\\n asset.safeTransferFrom(msg.sender, address(this), repaidAssets + lendersAssets);\\n }\\n\\n /// @notice Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\\n /// @dev Can only be called from the auditor.\\n /// @param borrower account with insufficient collateral to be cleared the debt.\\n function clearBadDebt(address borrower) external {\\n if (msg.sender != address(auditor)) revert NotAuditor();\\n\\n floatingAssets += accrueAccumulatedEarnings();\\n Account storage account = accounts[borrower];\\n uint256 accumulator = earningsAccumulator;\\n uint256 totalBadDebt = 0;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 badDebt = position.principal + position.fee;\\n if (accumulator >= badDebt) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n accumulator -= badDebt;\\n totalBadDebt += badDebt;\\n floatingBackupBorrowed -= fixedPools[maturity].repay(position.principal);\\n delete fixedBorrowPositions[maturity][borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, badDebt, badDebt);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n if (account.floatingBorrowShares != 0 && (accumulator = previewRepay(accumulator)) != 0) {\\n (uint256 badDebt, ) = noTransferRefund(accumulator, borrower);\\n totalBadDebt += badDebt;\\n }\\n if (totalBadDebt != 0) {\\n earningsAccumulator -= totalBadDebt;\\n emit SpreadBadDebt(borrower, totalBadDebt);\\n }\\n emitMarketUpdate();\\n }\\n\\n /// @notice Public function to seize a certain amount of assets.\\n /// @dev Public function for liquidator to seize borrowers assets in the floating pool.\\n /// This function will only be called from another Market, on `liquidation` calls.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function seize(address liquidator, address borrower, uint256 assets) external whenNotPaused {\\n internalSeize(Market(msg.sender), liquidator, borrower, assets);\\n }\\n\\n /// @notice Internal function to seize a certain amount of assets.\\n /// @dev Internal function for liquidator to seize borrowers assets in the floating pool.\\n /// Will only be called from this Market on `liquidation` or through `seize` calls from another Market.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param seizeMarket address which is calling the seize function (see `seize` public function).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function internalSeize(Market seizeMarket, address liquidator, address borrower, uint256 assets) internal {\\n if (assets == 0) revert ZeroWithdraw();\\n\\n // reverts on failure\\n auditor.checkSeize(seizeMarket, this);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(borrower);\\n uint256 shares = previewWithdraw(assets);\\n beforeWithdraw(assets, shares);\\n _burn(borrower, shares);\\n emit Withdraw(msg.sender, liquidator, borrower, assets, shares);\\n emit Seize(liquidator, borrower, assets);\\n emitMarketUpdate();\\n\\n asset.safeTransfer(liquidator, assets);\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be withdrawn from the floating pool.\\n function beforeWithdraw(uint256 assets, uint256) internal override whenNotPaused {\\n updateFloatingAssetsAverage();\\n depositToTreasury(updateFloatingDebt());\\n uint256 earnings = accrueAccumulatedEarnings();\\n uint256 newFloatingAssets = floatingAssets + earnings - assets;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed\\n if (floatingBackupBorrowed + floatingDebt > newFloatingAssets) revert InsufficientProtocolLiquidity();\\n floatingAssets = newFloatingAssets;\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be deposited to the floating pool.\\n function afterDeposit(uint256 assets, uint256) internal override whenNotPaused whenNotFrozen {\\n updateFloatingAssetsAverage();\\n uint256 treasuryFee = updateFloatingDebt();\\n uint256 earnings = accrueAccumulatedEarnings();\\n floatingAssets += earnings + assets;\\n depositToTreasury(treasuryFee);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Withdraws the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param assets amount of underlying to be withdrawn.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return shares amount of shares redeemed for underlying asset.\\n function withdraw(uint256 assets, address receiver, address owner) public override returns (uint256 shares) {\\n auditor.checkShortfall(this, owner, assets);\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n shares = super.withdraw(assets, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Redeems the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param shares amount of shares to be redeemed for underlying asset.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return assets amount of underlying asset that was withdrawn.\\n function redeem(uint256 shares, address receiver, address owner) public override returns (uint256 assets) {\\n auditor.checkShortfall(this, owner, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n assets = super.redeem(shares, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n function _mint(address to, uint256 amount) internal override {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(to);\\n super._mint(to, amount);\\n }\\n\\n /// @notice Moves amount of shares from the caller's account to `to`.\\n /// @dev Makes sure that the caller doesn't have shortfall after transferring.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transfer(address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, msg.sender, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(msg.sender);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transfer(to, shares);\\n }\\n\\n /// @notice Moves amount of shares from `from` to `to` using the allowance mechanism.\\n /// @dev Makes sure that `from` address doesn't have shortfall after transferring.\\n /// @param from address from which the assets will be transferred.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transferFrom(address from, address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, from, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(from);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transferFrom(from, to, shares);\\n }\\n\\n /// @notice Gets current snapshot for an account across all maturities.\\n /// @param account account to return status snapshot in the specified maturity date.\\n /// @return the amount deposited to the floating pool and the amount owed to floating and fixed pools.\\n function accountSnapshot(address account) external view returns (uint256, uint256) {\\n return (convertToAssets(balanceOf[account]), previewDebt(account));\\n }\\n\\n /// @notice Gets all borrows and penalties for an account.\\n /// @param borrower account to return status snapshot for fixed and floating borrows.\\n /// @return debt the total debt, denominated in number of assets.\\n function previewDebt(address borrower) public view returns (uint256 debt) {\\n Account storage account = accounts[borrower];\\n uint256 memPenaltyRate = penaltyRate;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n // calculate all maturities using the base maturity and the following bits representing the following intervals\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 positionAssets = position.principal + position.fee;\\n\\n debt += positionAssets;\\n\\n if (block.timestamp > maturity) {\\n debt += positionAssets.mulWadDown((block.timestamp - maturity) * memPenaltyRate);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n // calculate floating borrowed debt\\n uint256 shares = account.floatingBorrowShares;\\n if (shares != 0) debt += previewRefund(shares);\\n }\\n\\n /// @notice Charges treasury fee to certain amount of earnings.\\n /// @param earnings amount of earnings.\\n /// @return earnings minus the fees charged by the treasury.\\n function chargeTreasuryFee(uint256 earnings) internal returns (uint256) {\\n uint256 fee = earnings.mulWadDown(treasuryFeeRate);\\n depositToTreasury(fee);\\n return earnings - fee;\\n }\\n\\n /// @notice Collects all earnings that are charged to borrowers that make use of fixed pool deposits' assets.\\n /// @param earnings amount of earnings.\\n function collectFreeLunch(uint256 earnings) internal {\\n if (earnings == 0) return;\\n\\n if (treasuryFeeRate != 0) {\\n depositToTreasury(earnings);\\n } else {\\n earningsAccumulator += earnings;\\n }\\n }\\n\\n /// @notice Deposits amount of assets on behalf of the treasury address.\\n /// @param fee amount of assets to be deposited.\\n function depositToTreasury(uint256 fee) internal {\\n if (fee != 0) {\\n _mint(treasury, previewDeposit(fee));\\n floatingAssets += fee;\\n }\\n }\\n\\n /// @notice Calculates the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings to be distributed from the accumulator.\\n function accumulatedEarnings() internal view returns (uint256 earnings) {\\n uint256 elapsed = block.timestamp - lastAccumulatorAccrual;\\n if (elapsed == 0) return 0;\\n return\\n earningsAccumulator.mulDivDown(\\n elapsed,\\n elapsed + earningsAccumulatorSmoothFactor.mulWadDown(maxFuturePools * FixedLib.INTERVAL)\\n );\\n }\\n\\n /// @notice Accrues the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings distributed from the accumulator.\\n function accrueAccumulatedEarnings() internal returns (uint256 earnings) {\\n earnings = accumulatedEarnings();\\n\\n earningsAccumulator -= earnings;\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n emit AccumulatorAccrual(block.timestamp);\\n }\\n\\n /// @notice Updates the `floatingAssetsAverage`.\\n function updateFloatingAssetsAverage() internal {\\n floatingAssetsAverage = previewFloatingAssetsAverage();\\n lastAverageUpdate = uint32(block.timestamp);\\n }\\n\\n /// @notice Returns the current `floatingAssetsAverage` without updating the storage variable.\\n /// @return projected `floatingAssetsAverage`.\\n function previewFloatingAssetsAverage() public view returns (uint256) {\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 memFloatingAssetsAverage = floatingAssetsAverage;\\n uint256 dampSpeedFactor = memFloatingAssets < memFloatingAssetsAverage ? dampSpeedDown : dampSpeedUp;\\n uint256 averageFactor = uint256(1e18 - (-int256(dampSpeedFactor * (block.timestamp - lastAverageUpdate))).expWad());\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n /// @notice Updates the floating pool borrows' variables.\\n /// @return treasuryFee amount of fees charged by the treasury to the new calculated floating debt.\\n function updateFloatingDebt() internal returns (uint256 treasuryFee) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 utilization = floatingUtilization(memFloatingAssets, memFloatingDebt);\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(utilization, globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed))\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n\\n memFloatingDebt += newDebt;\\n treasuryFee = newDebt.mulWadDown(treasuryFeeRate);\\n floatingAssets = memFloatingAssets + newDebt - treasuryFee;\\n floatingDebt = memFloatingDebt;\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n emit FloatingDebtUpdate(block.timestamp, utilization);\\n }\\n\\n /// @notice Calculates the total floating debt, considering elapsed time since last update and current interest rate.\\n /// @return actual floating debt plus projected interest.\\n function totalFloatingBorrowAssets() public view returns (uint256) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(\\n floatingUtilization(memFloatingAssets, memFloatingDebt),\\n globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed)\\n )\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n return memFloatingDebt + newDebt;\\n }\\n\\n /// @notice Calculates the floating pool balance plus earnings to be accrued at current timestamp\\n /// from maturities and accumulator.\\n /// @return actual floatingAssets plus earnings to be accrued at current timestamp.\\n function totalAssets() public view override returns (uint256) {\\n unchecked {\\n uint256 backupEarnings = 0;\\n\\n uint256 latestMaturity = block.timestamp - (block.timestamp % FixedLib.INTERVAL);\\n uint256 maxMaturity = latestMaturity + maxFuturePools * FixedLib.INTERVAL;\\n\\n for (uint256 maturity = latestMaturity; maturity <= maxMaturity; maturity += FixedLib.INTERVAL) {\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (maturity > lastAccrual) {\\n backupEarnings += block.timestamp < maturity\\n ? pool.unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual)\\n : pool.unassignedEarnings;\\n }\\n }\\n\\n return\\n floatingAssets +\\n backupEarnings +\\n accumulatedEarnings() +\\n (totalFloatingBorrowAssets() - floatingDebt).mulWadDown(1e18 - treasuryFeeRate);\\n }\\n }\\n\\n /// @notice Simulates the effects of a borrow at the current time, given current contract conditions.\\n /// @param assets amount of assets to borrow.\\n /// @return amount of shares that will be asigned to the account after the borrow.\\n function previewBorrow(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a repay at the current time, given current contract conditions.\\n /// @param assets amount of assets to repay.\\n /// @return amount of shares that will be subtracted from the account after the repay.\\n function previewRepay(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a refund at the current time, given current contract conditions.\\n /// @param shares amount of shares to subtract from caller's accountability.\\n /// @return amount of assets that will be repaid.\\n function previewRefund(uint256 shares) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalFloatingBorrowAssets(), supply);\\n }\\n\\n /// @notice Checks msg.sender's allowance over account's assets.\\n /// @param account account in which the allowance will be checked.\\n /// @param assets assets from account that msg.sender wants to operate on.\\n function spendAllowance(address account, uint256 assets) internal {\\n if (msg.sender != account) {\\n uint256 allowed = allowance[account][msg.sender]; // saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[account][msg.sender] = allowed - previewWithdraw(assets);\\n }\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed amount of the fixed pool.\\n function fixedPoolBorrowed(uint256 maturity) external view returns (uint256) {\\n return fixedPools[maturity].borrowed;\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed and supplied amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed and supplied amount of the fixed pool.\\n function fixedPoolBalance(uint256 maturity) external view returns (uint256, uint256) {\\n return (fixedPools[maturity].borrowed, fixedPools[maturity].supplied);\\n }\\n\\n /// @notice Retrieves fixed utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function fixedUtilization(uint256 supplied, uint256 borrowed, uint256 assets) internal pure returns (uint256) {\\n return assets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves global utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function globalUtilization(uint256 assets, uint256 debt, uint256 backupBorrowed) internal pure returns (uint256) {\\n return assets != 0 ? (debt + backupBorrowed).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves floating utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function floatingUtilization(uint256 assets, uint256 debt) internal pure returns (uint256) {\\n return assets != 0 ? debt.divWadUp(assets) : 0;\\n }\\n\\n /// @notice Emits MarketUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitMarketUpdate() internal {\\n emit MarketUpdate(\\n block.timestamp,\\n totalSupply,\\n floatingAssets,\\n totalFloatingBorrowShares,\\n floatingDebt,\\n earningsAccumulator\\n );\\n }\\n\\n /// @notice Emits FixedEarningsUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitFixedEarningsUpdate(uint256 maturity) internal {\\n emit FixedEarningsUpdate(block.timestamp, maturity, fixedPools[maturity].unassignedEarnings);\\n }\\n\\n /// @notice Sets name and symbol for the Market.\\n /// @param assetSymbol the symbol for the underlying asset.\\n function setAssetSymbol(string calldata assetSymbol) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n name = string.concat(\\\"exactly \\\", assetSymbol);\\n symbol = string.concat(\\\"exa\\\", assetSymbol);\\n }\\n\\n /// @notice Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially\\n /// providing liquidity.\\n /// @param backupFeeRate_ percentage amount represented with 18 decimals.\\n function setBackupFeeRate(uint256 backupFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n backupFeeRate = backupFeeRate_;\\n emit BackupFeeRateSet(backupFeeRate_);\\n }\\n\\n /// @notice Sets the damp speed used to update the floatingAssetsAverage.\\n /// @param up damp speed up, represented with 18 decimals.\\n /// @param down damp speed down, represented with 18 decimals.\\n function setDampSpeed(uint256 up, uint256 down) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n updateFloatingAssetsAverage();\\n dampSpeedUp = up;\\n dampSpeedDown = down;\\n emit DampSpeedSet(up, down);\\n }\\n\\n /// @notice Sets the factor used when smoothly accruing earnings to the floating pool.\\n /// @param earningsAccumulatorSmoothFactor_ represented with 18 decimals.\\n function setEarningsAccumulatorSmoothFactor(\\n uint128 earningsAccumulatorSmoothFactor_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n floatingAssets += accrueAccumulatedEarnings();\\n emitMarketUpdate();\\n earningsAccumulatorSmoothFactor = earningsAccumulatorSmoothFactor_;\\n emit EarningsAccumulatorSmoothFactorSet(earningsAccumulatorSmoothFactor_);\\n }\\n\\n /// @notice Sets the interest rate model to be used to calculate rates.\\n /// @param interestRateModel_ new interest rate model.\\n function setInterestRateModel(InterestRateModel interestRateModel_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(interestRateModel) != address(0)) depositToTreasury(updateFloatingDebt());\\n\\n interestRateModel = interestRateModel_;\\n emitMarketUpdate();\\n emit InterestRateModelSet(interestRateModel_);\\n }\\n\\n /// @notice Sets the rewards controller to update account rewards when operating with the Market.\\n /// @param rewardsController_ new rewards controller.\\n function setRewardsController(RewardsController rewardsController_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n rewardsController = rewardsController_;\\n emit RewardsControllerSet(rewardsController_);\\n }\\n\\n /// @notice Sets the protocol's max future pools for fixed borrowing and lending.\\n /// @dev If value is decreased, VALID maturities will become NOT_READY.\\n /// @param futurePools number of pools to be active at the same time.\\n function setMaxFuturePools(uint8 futurePools) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n maxFuturePools = futurePools;\\n emit MaxFuturePoolsSet(futurePools);\\n }\\n\\n /// @notice Sets the penalty rate per second.\\n /// @param penaltyRate_ percentage represented with 18 decimals.\\n function setPenaltyRate(uint256 penaltyRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n penaltyRate = penaltyRate_;\\n emit PenaltyRateSet(penaltyRate_);\\n }\\n\\n /// @notice Sets the percentage that represents the liquidity reserves that can't be borrowed.\\n /// @param reserveFactor_ parameter represented with 18 decimals.\\n function setReserveFactor(uint128 reserveFactor_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n reserveFactor = reserveFactor_;\\n emit ReserveFactorSet(reserveFactor_);\\n }\\n\\n /// @notice Sets the treasury variables.\\n /// @param treasury_ address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate_ represented with 18 decimals.\\n function setTreasury(address treasury_, uint256 treasuryFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n depositToTreasury(updateFloatingDebt());\\n treasury = treasury_;\\n treasuryFeeRate = treasuryFeeRate_;\\n emit TreasurySet(treasury_, treasuryFeeRate_);\\n }\\n\\n /// @notice Sets the pause state to true in case of emergency, triggered by an authorized account.\\n function pause() external onlyPausingRoles {\\n _pause();\\n }\\n\\n /// @notice Sets the pause state to false when threat is gone, triggered by an authorized account.\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @notice Sets `isFrozen` state, triggered by an authorized account.\\n function setFrozen(bool isFrozen_) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (isFrozen == isFrozen_) return;\\n isFrozen = isFrozen_;\\n emit Frozen(msg.sender, isFrozen_);\\n }\\n\\n /// @dev Throws if the market is frozen.\\n function requireNotFrozen() internal view {\\n if (isFrozen) revert MarketFrozen();\\n }\\n\\n /// @dev Modifier to make a function callable only when the market is not frozen.\\n modifier whenNotFrozen() {\\n requireNotFrozen();\\n _;\\n }\\n\\n /// @dev Throws if the caller is not an `EMERGENCY_ADMIN_ROLE` or `PAUSER_ROLE`.\\n function requirePausingRoles() internal view {\\n if (!hasRole(EMERGENCY_ADMIN_ROLE, msg.sender) && !hasRole(PAUSER_ROLE, msg.sender)) {\\n revert NotPausingRole();\\n }\\n }\\n\\n /// @dev Modifier to make a function callable only by pausing roles.\\n modifier onlyPausingRoles() {\\n requirePausingRoles();\\n _;\\n }\\n\\n /// @notice Event emitted when an account borrows amount of assets from a floating pool.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of assets that were borrowed.\\n /// @param shares amount of borrow shares assigned to the account.\\n event Borrow(\\n address indexed caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /// @notice Emitted when an account repays amount of assets to a floating pool.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of assets that was repaid.\\n /// @param shares amount of borrow shares that were subtracted from the account's accountability.\\n event Repay(address indexed caller, address indexed borrower, uint256 assets, uint256 shares);\\n\\n /// @notice Emitted when an account deposits an amount of an asset to a certain fixed rate pool,\\n /// collecting fees at the end of the period.\\n /// @param maturity maturity at which the account will be able to collect his deposit + his fee.\\n /// @param caller address which deposited the assets.\\n /// @param owner address that will be able to withdraw the deposited assets.\\n /// @param assets amount of the asset that were deposited.\\n /// @param fee is the extra amount that it will be collected at maturity.\\n event DepositAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed owner,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account withdraws from a fixed rate pool.\\n /// @param maturity maturity where the account withdraw its deposits.\\n /// @param caller address which withdraw the asset.\\n /// @param receiver address which will be collecting the assets.\\n /// @param owner address which had the assets withdrawn.\\n /// @param positionAssets position size reduced.\\n /// @param assets amount of assets withdrawn (can include a discount for early withdraw).\\n event WithdrawAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 positionAssets,\\n uint256 assets\\n );\\n\\n /// @notice Emitted when an account borrows amount of an asset from a certain maturity date.\\n /// @param maturity maturity in which the account will have to repay the loan.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of the asset that were borrowed.\\n /// @param fee extra amount that will need to be paid at maturity.\\n event BorrowAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account repays its borrows after maturity.\\n /// @param maturity maturity where the account repaid its borrowed amounts.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount that was repaid.\\n /// @param positionAssets amount of the debt that was covered in this repayment (penalties could have been repaid).\\n event RepayAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed borrower,\\n uint256 assets,\\n uint256 positionAssets\\n );\\n\\n /// @notice Emitted when an account's position had a liquidation.\\n /// @param receiver address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of the asset that were repaid.\\n /// @param lendersAssets incentive paid to lenders.\\n /// @param seizeMarket address of the asset that were seized by the liquidator.\\n /// @param seizedAssets amount seized of the collateral.\\n event Liquidate(\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 lendersAssets,\\n Market indexed seizeMarket,\\n uint256 seizedAssets\\n );\\n\\n /// @notice Emitted when an account's collateral has been seized.\\n /// @param liquidator address which seized this collateral.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount seized of the collateral.\\n event Seize(address indexed liquidator, address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when an account is cleared from bad debt.\\n /// @param borrower address which was cleared from bad debt.\\n /// @param assets amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\\n event SpreadBadDebt(address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when the backupFeeRate parameter is changed by admin.\\n /// @param backupFeeRate rate charged to the fixed pools to be accrued by the floating depositors.\\n event BackupFeeRateSet(uint256 backupFeeRate);\\n\\n /// @notice Emitted when the damp speeds are changed by admin.\\n /// @param dampSpeedUp represented with 18 decimals.\\n /// @param dampSpeedDown represented with 18 decimals.\\n event DampSpeedSet(uint256 dampSpeedUp, uint256 dampSpeedDown);\\n\\n /// @notice Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\\n /// @param earningsAccumulatorSmoothFactor factor represented with 18 decimals.\\n event EarningsAccumulatorSmoothFactorSet(uint256 earningsAccumulatorSmoothFactor);\\n\\n /// @notice Emitted when the interestRateModel is changed by admin.\\n /// @param interestRateModel new interest rate model to be used to calculate rates.\\n event InterestRateModelSet(InterestRateModel indexed interestRateModel);\\n\\n /// @notice Emitted when the maxFuturePools is changed by admin.\\n /// @param maxFuturePools represented with 0 decimals.\\n event MaxFuturePoolsSet(uint256 maxFuturePools);\\n\\n /// @notice Emitted when the penaltyRate is changed by admin.\\n /// @param penaltyRate penaltyRate percentage per second represented with 18 decimals.\\n event PenaltyRateSet(uint256 penaltyRate);\\n\\n /// @notice Emitted when the reserveFactor is changed by admin.\\n /// @param reserveFactor reserveFactor percentage.\\n event ReserveFactorSet(uint256 reserveFactor);\\n\\n /// @notice Emitted when the treasury variables are changed by admin.\\n /// @param treasury address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate represented with 18 decimals.\\n event TreasurySet(address indexed treasury, uint256 treasuryFeeRate);\\n\\n /// @notice Emitted when the rewardsController is changed by admin.\\n /// @param rewardsController new rewards controller to update account rewards when operating with the Market.\\n event RewardsControllerSet(RewardsController indexed rewardsController);\\n\\n /// @notice Emitted when market state is updated.\\n /// @param timestamp current timestamp.\\n /// @param floatingDepositShares total floating supply shares.\\n /// @param floatingAssets total floating supply assets.\\n /// @param floatingBorrowShares total floating borrow shares.\\n /// @param floatingDebt total floating borrow assets.\\n /// @param earningsAccumulator earnings accumulator.\\n event MarketUpdate(\\n uint256 timestamp,\\n uint256 floatingDepositShares,\\n uint256 floatingAssets,\\n uint256 floatingBorrowShares,\\n uint256 floatingDebt,\\n uint256 earningsAccumulator\\n );\\n\\n /// @notice Emitted when the earnings of a maturity are updated.\\n /// @param timestamp current timestamp.\\n /// @param maturity maturity date where the earnings were updated.\\n /// @param unassignedEarnings pending unassigned earnings.\\n event FixedEarningsUpdate(uint256 timestamp, uint256 indexed maturity, uint256 unassignedEarnings);\\n\\n /// @notice Emitted when accumulator distributes earnings.\\n /// @param timestamp current timestamp.\\n event AccumulatorAccrual(uint256 timestamp);\\n\\n /// @notice Emitted when the floating debt is updated.\\n /// @param timestamp current timestamp.\\n /// @param utilization new floating utilization.\\n event FloatingDebtUpdate(uint256 timestamp, uint256 utilization);\\n\\n /// @notice Emitted when `account` sets the `isFrozen` flag.\\n event Frozen(address indexed account, bool isFrozen);\\n\\n /// @notice Stores fixed deposits and fixed borrows map and floating borrow shares of an account.\\n /// @param fixedDeposits encoded map maturity dates where the account supplied to.\\n /// @param fixedBorrows encoded map maturity dates where the account borrowed from.\\n /// @param floatingBorrowShares number of floating borrow shares assigned to the account.\\n struct Account {\\n uint256 fixedDeposits;\\n uint256 fixedBorrows;\\n uint256 floatingBorrowShares;\\n }\\n}\\n\\nerror Disagreement();\\nerror InsufficientProtocolLiquidity();\\nerror MarketFrozen();\\nerror NotAuditor();\\nerror NotPausingRole();\\nerror SelfLiquidation();\\nerror ZeroBorrow();\\nerror ZeroDeposit();\\nerror ZeroRepay();\\nerror ZeroWithdraw();\\n\",\"keccak256\":\"0xdf09a69098df74396067954be63e073deb5d0b9222cae1a1a3b9c2bf69678429\",\"license\":\"BUSL-1.1\"},\"contracts/RewardsController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { SafeTransferLib } from \\\"solmate/src/utils/SafeTransferLib.sol\\\";\\nimport { ERC20 } from \\\"solmate/src/tokens/ERC20.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract RewardsController is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint64;\\n using FixedPointMathLib for int256;\\n using SafeTransferLib for ERC20;\\n\\n /// @notice Max utilization supported by the sigmoid function not to cause a division by zero (1e18 = WAD).\\n uint256 public constant UTILIZATION_CAP = 1e18 - 1;\\n /// @notice Tracks the reward distribution data for a given market.\\n mapping(Market => Distribution) public distribution;\\n /// @notice Tracks enabled asset rewards.\\n mapping(ERC20 => bool) public rewardEnabled;\\n /// @notice Stores registered asset rewards.\\n ERC20[] public rewardList;\\n /// @notice Stores Markets with distributions set.\\n Market[] public marketList;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev Can only be called once.\\n function initialize() external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded deposit.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleDeposit(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n ops[0] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n update(account, market, dist.availableRewards[r], ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded borrow.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleBorrow(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n (, , uint256 accountFloatingBorrowShares) = market.accounts(account);\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n ERC20 reward = dist.availableRewards[r];\\n ops[0] = AccountOperation({\\n operation: true,\\n balance: accountFloatingBorrowShares + accountFixedBorrowShares(market, account, dist.rewards[reward].start)\\n });\\n update(account, Market(msg.sender), reward, ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Claims all `msg.sender` rewards to the given account.\\n /// @param to The address to send the rewards to.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claimAll(address to) external returns (ERC20[] memory rewardsList, uint256[] memory claimedAmounts) {\\n return claim(allMarketsOperations(), to, rewardList);\\n }\\n\\n /// @notice Claims `msg.sender` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param to The address to send the rewards to.\\n /// @param rewardsList The list of rewards assets to claim.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n address to,\\n ERC20[] memory rewardsList\\n ) public claimSender returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n uint256 rewardsCount = rewardsList.length;\\n claimedAmounts = new uint256[](rewardsCount);\\n address sender = _claimSender;\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n uint256 availableRewards = dist.availableRewardsCount;\\n for (uint128 r = 0; r < availableRewards; ) {\\n update(\\n sender,\\n marketOperation.market,\\n dist.availableRewards[r],\\n accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n sender,\\n dist.rewards[dist.availableRewards[r]].start\\n )\\n );\\n unchecked {\\n ++r;\\n }\\n }\\n for (uint256 r = 0; r < rewardsCount; ) {\\n RewardData storage rewardData = dist.rewards[rewardsList[r]];\\n for (uint256 o = 0; o < marketOperation.operations.length; ) {\\n uint256 rewardAmount = rewardData.accounts[sender][marketOperation.operations[o]].accrued;\\n if (rewardAmount != 0) {\\n claimedAmounts[r] += rewardAmount;\\n rewardData.accounts[sender][marketOperation.operations[o]].accrued = 0;\\n }\\n unchecked {\\n ++o;\\n }\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 r = 0; r < rewardsList.length; ) {\\n uint256 claimedAmount = claimedAmounts[r];\\n if (claimedAmount > 0) {\\n rewardsList[r].safeTransfer(to, claimedAmount);\\n emit Claim(sender, rewardsList[r], to, claimedAmount);\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n return (rewardsList, claimedAmounts);\\n }\\n\\n /// @notice Claims `permit.owner` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param permit Arguments and signature from `permit.owner`.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n ClaimPermit calldata permit\\n ) external permitSender(permit) returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n return claim(marketOps, msg.sender, permit.assets);\\n }\\n\\n /// @notice Gets the configuration of a given distribution.\\n /// @param market The market to get the distribution configuration for.\\n /// @param reward The reward asset.\\n /// @return The distribution configuration.\\n function rewardConfig(Market market, ERC20 reward) external view returns (Config memory) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return\\n Config({\\n market: market,\\n reward: reward,\\n priceFeed: rewardData.priceFeed,\\n start: rewardData.start,\\n distributionPeriod: rewardData.end - rewardData.start,\\n targetDebt: rewardData.targetDebt,\\n totalDistribution: rewardData.totalDistribution,\\n undistributedFactor: rewardData.undistributedFactor,\\n flipSpeed: rewardData.flipSpeed,\\n compensationFactor: rewardData.compensationFactor,\\n transitionFactor: rewardData.transitionFactor,\\n borrowAllocationWeightFactor: rewardData.borrowAllocationWeightFactor,\\n depositAllocationWeightAddend: rewardData.depositAllocationWeightAddend,\\n depositAllocationWeightFactor: rewardData.depositAllocationWeightFactor\\n });\\n }\\n\\n /// @notice Gets the amount of reward assets that are being distributed for a Market.\\n /// @param market Market to get the number of available rewards to distribute.\\n /// @return The amount reward assets set to a Market.\\n function availableRewardsCount(Market market) external view returns (uint256) {\\n return distribution[market].availableRewardsCount;\\n }\\n\\n /// @notice Gets the account data of a given account, Market, operation and reward asset.\\n /// @param account The account to get the operation data from.\\n /// @param market The market in which the operation was made.\\n /// @param operation True if the operation was a borrow, false if it was a deposit.\\n /// @param reward The reward asset.\\n /// @return accrued The accrued amount.\\n /// @return index The account index.\\n function accountOperation(\\n address account,\\n Market market,\\n bool operation,\\n ERC20 reward\\n ) external view returns (uint256, uint256) {\\n Account storage operationAccount = distribution[market].rewards[reward].accounts[account][operation];\\n return (operationAccount.accrued, operationAccount.index);\\n }\\n\\n /// @notice Gets the distribution `start`, `end` and `lastUpdate` value of a given market and reward.\\n /// @param market The market to get the distribution times.\\n /// @param reward The reward asset.\\n /// @return The distribution `start`, `end` and `lastUpdate` time.\\n function distributionTime(Market market, ERC20 reward) external view returns (uint32, uint32, uint32) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.start, rewardData.end, rewardData.lastUpdate);\\n }\\n\\n /// @notice Retrieves all rewards addresses.\\n function allRewards() external view returns (ERC20[] memory) {\\n return rewardList;\\n }\\n\\n /// @notice Gets all market and operations.\\n /// @return marketOps The list of market operations.\\n function allMarketsOperations() public view returns (MarketOperation[] memory marketOps) {\\n Market[] memory markets = marketList;\\n marketOps = new MarketOperation[](markets.length);\\n for (uint256 m = 0; m < markets.length; ) {\\n bool[] memory ops = new bool[](2);\\n ops[0] = true;\\n ops[1] = false;\\n marketOps[m] = MarketOperation({ market: markets[m], operations: ops });\\n unchecked {\\n ++m;\\n }\\n }\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account and reward asset.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function allClaimable(address account, ERC20 reward) external view returns (uint256 unclaimedRewards) {\\n return claimable(allMarketsOperations(), account, reward);\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account, Market operations and reward asset.\\n /// @param marketOps The list of Market operations to get the accrued and pending rewards from.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function claimable(\\n MarketOperation[] memory marketOps,\\n address account,\\n ERC20 reward\\n ) public view returns (uint256 unclaimedRewards) {\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n RewardData storage rewardData = dist.rewards[reward];\\n if (dist.availableRewardsCount == 0) {\\n unchecked {\\n ++i;\\n }\\n continue;\\n }\\n\\n AccountOperation[] memory ops = accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n account,\\n rewardData.start\\n );\\n uint256 balance;\\n for (uint256 o = 0; o < ops.length; ) {\\n unclaimedRewards += rewardData.accounts[account][ops[o].operation].accrued;\\n balance += ops[o].balance;\\n unchecked {\\n ++o;\\n }\\n }\\n if (balance > 0) {\\n unclaimedRewards += pendingRewards(\\n account,\\n reward,\\n AccountMarketOperation({ market: marketOperation.market, accountOperations: ops })\\n );\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Iterates and accrues all rewards for the operations of the given account in the given market.\\n /// @param account The account to accrue the rewards for.\\n /// @param market The Market in which the operations where made.\\n /// @param reward The reward asset.\\n /// @param ops The operations to accrue the rewards for.\\n function update(address account, Market market, ERC20 reward, AccountOperation[] memory ops) internal {\\n uint256 baseUnit = distribution[market].baseUnit;\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n {\\n uint256 lastUpdate = rewardData.lastUpdate;\\n // `lastUpdate` can be greater than `block.timestamp` if distribution is set to start on a future date\\n if (block.timestamp > lastUpdate) {\\n (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) = previewAllocation(\\n rewardData,\\n market,\\n block.timestamp - lastUpdate\\n );\\n if (borrowIndex > type(uint128).max || depositIndex > type(uint128).max) revert IndexOverflow();\\n rewardData.borrowIndex = uint128(borrowIndex);\\n rewardData.depositIndex = uint128(depositIndex);\\n rewardData.lastUpdate = uint32(block.timestamp);\\n rewardData.lastUndistributed = newUndistributed;\\n emit IndexUpdate(market, reward, borrowIndex, depositIndex, newUndistributed, block.timestamp);\\n }\\n }\\n\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 i = 0; i < ops.length; ) {\\n AccountOperation memory op = ops[i];\\n Account storage accountData = operationAccount[op.operation];\\n uint256 accountIndex = accountData.index;\\n uint256 newAccountIndex;\\n if (op.operation) {\\n newAccountIndex = rewardData.borrowIndex;\\n } else {\\n newAccountIndex = rewardData.depositIndex;\\n }\\n if (accountIndex != newAccountIndex) {\\n accountData.index = uint128(newAccountIndex);\\n if (op.balance != 0) {\\n uint256 rewardsAccrued = accountRewards(op.balance, newAccountIndex, accountIndex, baseUnit);\\n accountData.accrued += uint128(rewardsAccrued);\\n emit Accrue(market, reward, account, op.operation, accountIndex, newAccountIndex, rewardsAccrued);\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the equivalent of borrow shares from fixed pool principal borrows of an account.\\n /// @param market The Market to get the fixed borrows from.\\n /// @param account The account that borrowed from fixed pools.\\n /// @return fixedDebt The fixed borrow shares.\\n function accountFixedBorrowShares(\\n Market market,\\n address account,\\n uint32 start\\n ) internal view returns (uint256 fixedDebt) {\\n uint256 firstMaturity = start - (start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 principal, ) = market.fixedBorrowPositions(maturity, account);\\n fixedDebt += principal;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n fixedDebt = market.previewRepay(fixedDebt);\\n }\\n\\n /// @notice Gets the reward indexes and last amount of undistributed rewards for a given market and reward asset.\\n /// @param market The market to get the reward indexes for.\\n /// @param reward The reward asset to get the reward indexes for.\\n /// @return borrowIndex The index for the floating and fixed borrow operation.\\n /// @return depositIndex The index for the floating deposit operation.\\n /// @return lastUndistributed The last amount of undistributed rewards.\\n function rewardIndexes(Market market, ERC20 reward) external view returns (uint256, uint256, uint256) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.borrowIndex, rewardData.depositIndex, rewardData.lastUndistributed);\\n }\\n\\n /// @notice Calculates the rewards not accrued yet for the given operations of a given account and reward asset.\\n /// @param account The account to get the pending rewards for.\\n /// @param reward The reward asset to get the pending rewards for.\\n /// @param ops The operations to get the pending rewards for.\\n /// @return rewards The pending rewards for the given operations.\\n function pendingRewards(\\n address account,\\n ERC20 reward,\\n AccountMarketOperation memory ops\\n ) internal view returns (uint256 rewards) {\\n RewardData storage rewardData = distribution[ops.market].rewards[reward];\\n uint256 baseUnit = distribution[ops.market].baseUnit;\\n uint256 lastUpdate = rewardData.lastUpdate;\\n (uint256 borrowIndex, uint256 depositIndex, ) = previewAllocation(\\n rewardData,\\n ops.market,\\n block.timestamp > lastUpdate ? block.timestamp - lastUpdate : 0\\n );\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 o = 0; o < ops.accountOperations.length; ) {\\n uint256 nextIndex;\\n if (ops.accountOperations[o].operation) {\\n nextIndex = borrowIndex;\\n } else {\\n nextIndex = depositIndex;\\n }\\n\\n rewards += accountRewards(\\n ops.accountOperations[o].balance,\\n nextIndex,\\n operationAccount[ops.accountOperations[o].operation].index,\\n baseUnit\\n );\\n unchecked {\\n ++o;\\n }\\n }\\n }\\n\\n /// @notice Calculates and returns the new amount of rewards given by the difference between the `accountIndex` and\\n /// the `globalIndex`.\\n /// @param balance The account's balance in the operation's pool.\\n /// @param globalIndex Current index of the distribution.\\n /// @param accountIndex Last index stored for the account.\\n /// @param baseUnit One unit of the Market's asset (10**decimals).\\n /// @return The amount of new rewards to be accrued by the account.\\n function accountRewards(\\n uint256 balance,\\n uint256 globalIndex,\\n uint256 accountIndex,\\n uint256 baseUnit\\n ) internal pure returns (uint256) {\\n return balance.mulDivDown(globalIndex - accountIndex, baseUnit);\\n }\\n\\n /// @notice Retrieves projected distribution indexes and new undistributed amount for a given `deltaTime`.\\n /// @param market The market to calculate the indexes for.\\n /// @param reward The reward asset to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n Market market,\\n ERC20 reward,\\n uint256 deltaTime\\n ) external view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n return previewAllocation(distribution[market].rewards[reward], market, deltaTime);\\n }\\n\\n /// @notice Calculates and returns the distribution indexes and new undistributed tokens for a given `rewardData`.\\n /// @param rewardData The distribution's data.\\n /// @param market The market to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n RewardData storage rewardData,\\n Market market,\\n uint256 deltaTime\\n ) internal view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n TotalMarketBalance memory m;\\n m.floatingDebt = market.floatingDebt();\\n m.floatingAssets = market.floatingAssets();\\n TimeVars memory t;\\n t.start = rewardData.start;\\n t.end = rewardData.end;\\n {\\n uint256 firstMaturity = t.start - (t.start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n uint256 fixedDebt;\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 borrowed, ) = market.fixedPoolBalance(maturity);\\n fixedDebt += borrowed;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n m.debt = m.floatingDebt + fixedDebt;\\n m.fixedBorrowShares = market.previewRepay(fixedDebt);\\n }\\n uint256 target;\\n {\\n uint256 targetDebt = rewardData.targetDebt;\\n target = m.debt < targetDebt ? m.debt.divWadDown(targetDebt) : 1e18;\\n }\\n uint256 rewards;\\n {\\n uint256 releaseRate = rewardData.releaseRate;\\n uint256 lastUndistributed = rewardData.lastUndistributed;\\n t.period = t.end - t.start;\\n uint256 distributionFactor = t.period > 0\\n ? rewardData.undistributedFactor.mulDivDown(target, t.period * 1e18)\\n : 0;\\n if (block.timestamp <= t.end) {\\n if (distributionFactor > 0) {\\n uint256 exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n } else if (rewardData.lastUpdate > t.end) {\\n newUndistributed =\\n lastUndistributed -\\n lastUndistributed.mulWadUp(1e18 - uint256((-int256(distributionFactor * deltaTime)).expWad()));\\n rewards = uint256(-(int256(newUndistributed) - int256(lastUndistributed)));\\n } else {\\n uint256 exponential;\\n deltaTime = t.end - rewardData.lastUpdate;\\n if (distributionFactor > 0) {\\n exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n exponential = uint256((-int256(distributionFactor * (block.timestamp - t.end))).expWad());\\n newUndistributed = newUndistributed - newUndistributed.mulWadUp(1e18 - exponential);\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n }\\n if (rewards == 0) return (rewardData.borrowIndex, rewardData.depositIndex, newUndistributed);\\n }\\n {\\n AllocationVars memory v;\\n v.globalUtilization = Math.min(\\n m.floatingAssets != 0\\n ? 1e18 - (m.floatingAssets - m.floatingDebt - market.floatingBackupBorrowed()).divWadDown(m.floatingAssets)\\n : 0,\\n UTILIZATION_CAP\\n );\\n v.transitionFactor = rewardData.transitionFactor;\\n v.flipSpeed = rewardData.flipSpeed;\\n v.borrowAllocationWeightFactor = rewardData.borrowAllocationWeightFactor;\\n v.sigmoid = v.globalUtilization > 0\\n ? uint256(1e18).divWadDown(\\n 1e18 +\\n uint256(\\n (-(v.flipSpeed *\\n (int256(v.globalUtilization.divWadDown(1e18 - v.globalUtilization)).lnWad() -\\n int256(v.transitionFactor.divWadDown(1e18 - v.transitionFactor)).lnWad())) / 1e18).expWad()\\n )\\n )\\n : 0;\\n v.borrowRewardRule = rewardData\\n .compensationFactor\\n .mulWadDown(\\n market\\n .interestRateModel()\\n .floatingRate(m.floatingAssets != 0 ? m.floatingDebt.divWadDown(m.floatingAssets) : 0, v.globalUtilization)\\n .mulWadDown(1e18 - v.globalUtilization.mulWadUp(1e18 - market.treasuryFeeRate())) +\\n v.borrowAllocationWeightFactor\\n )\\n .mulWadDown(1e18 - v.sigmoid);\\n v.depositRewardRule =\\n rewardData.depositAllocationWeightAddend.mulWadDown(1e18 - v.sigmoid) +\\n rewardData.depositAllocationWeightFactor.mulWadDown(v.sigmoid);\\n v.borrowAllocation = v.borrowRewardRule.divWadDown(v.borrowRewardRule + v.depositRewardRule);\\n v.depositAllocation = 1e18 - v.borrowAllocation;\\n {\\n uint256 totalDepositSupply = market.totalSupply();\\n uint256 totalBorrowSupply = market.totalFloatingBorrowShares() + m.fixedBorrowShares;\\n uint256 baseUnit = distribution[market].baseUnit;\\n borrowIndex =\\n rewardData.borrowIndex +\\n (totalBorrowSupply > 0 ? rewards.mulWadDown(v.borrowAllocation).mulDivDown(baseUnit, totalBorrowSupply) : 0);\\n depositIndex =\\n rewardData.depositIndex +\\n (\\n totalDepositSupply > 0\\n ? rewards.mulWadDown(v.depositAllocation).mulDivDown(baseUnit, totalDepositSupply)\\n : 0\\n );\\n }\\n }\\n }\\n\\n /// @notice Get account balances of the given Market operations.\\n /// @param market The address of the Market.\\n /// @param ops List of operations to retrieve account balance.\\n /// @param account Account to get the balance from.\\n /// @param distributionStart Timestamp of the start of the distribution to correctly get the rewarded fixed pools.\\n /// @return accountBalanceOps contains a list with account balance per each operation.\\n function accountBalanceOperations(\\n Market market,\\n bool[] memory ops,\\n address account,\\n uint32 distributionStart\\n ) internal view returns (AccountOperation[] memory accountBalanceOps) {\\n accountBalanceOps = new AccountOperation[](ops.length);\\n for (uint256 i = 0; i < ops.length; ) {\\n if (ops[i]) {\\n (, , uint256 floatingBorrowShares) = market.accounts(account);\\n accountBalanceOps[i] = AccountOperation({\\n operation: true,\\n balance: floatingBorrowShares + accountFixedBorrowShares(market, account, distributionStart)\\n });\\n } else {\\n accountBalanceOps[i] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Withdraws the contract's balance of the given asset to the given address.\\n /// @param asset The asset to withdraw.\\n /// @param to The address to withdraw the asset to.\\n function withdraw(ERC20 asset, address to) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n asset.safeTransfer(to, asset.balanceOf(address(this)));\\n }\\n\\n /// @notice Enables or updates the reward distribution for the given markets and rewards.\\n /// @param configs The configurations to update each RewardData with.\\n function config(Config[] memory configs) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n for (uint256 i = 0; i < configs.length; ) {\\n // transitionFactor cannot be eq or higher than 1e18 to avoid division by zero or underflow\\n if (configs[i].transitionFactor >= 1e18) revert InvalidConfig();\\n // depositAllocationWeightFactor cannot be zero to avoid division by zero when sigmoid equals 1e18\\n if (configs[i].depositAllocationWeightFactor == 0) revert InvalidConfig();\\n\\n Distribution storage dist = distribution[configs[i].market];\\n RewardData storage rewardData = dist.rewards[configs[i].reward];\\n\\n if (dist.baseUnit == 0) {\\n // never initialized before, adding to the list of markets\\n marketList.push(configs[i].market);\\n }\\n if (!rewardEnabled[configs[i].reward]) {\\n // add reward address to global rewards list if still not enabled\\n rewardEnabled[configs[i].reward] = true;\\n rewardList.push(configs[i].reward);\\n }\\n if (rewardData.lastUpdate == 0) {\\n // add reward address to distribution data's available rewards if distribution is new\\n dist.availableRewards[dist.availableRewardsCount++] = configs[i].reward;\\n dist.baseUnit = 10 ** configs[i].market.decimals();\\n // set initial parameters if distribution is new\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n } else {\\n uint32 start = rewardData.start;\\n uint32 end = rewardData.end;\\n // update global indexes before updating distribution values\\n bool[] memory ops = new bool[](1);\\n ops[0] = true;\\n update(\\n address(0),\\n configs[i].market,\\n configs[i].reward,\\n accountBalanceOperations(configs[i].market, ops, address(0), start)\\n );\\n // properly update release rate\\n if (block.timestamp < end) {\\n uint256 released = 0;\\n uint256 elapsed = 0;\\n if (block.timestamp > start) {\\n released =\\n rewardData.lastConfigReleased +\\n rewardData.releaseRate *\\n (block.timestamp - rewardData.lastConfig);\\n elapsed = block.timestamp - start;\\n if (configs[i].totalDistribution <= released || configs[i].distributionPeriod <= elapsed) {\\n revert InvalidConfig();\\n }\\n rewardData.lastConfigReleased = released;\\n }\\n\\n rewardData.releaseRate =\\n (configs[i].totalDistribution - released) /\\n (configs[i].distributionPeriod - elapsed);\\n } else if (rewardData.start != configs[i].start) {\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n rewardData.lastConfigReleased = 0;\\n }\\n }\\n rewardData.lastConfig = uint32(block.timestamp);\\n rewardData.end = rewardData.start + uint32(configs[i].distributionPeriod);\\n rewardData.priceFeed = configs[i].priceFeed;\\n // set emission and distribution parameters\\n rewardData.totalDistribution = configs[i].totalDistribution;\\n rewardData.targetDebt = configs[i].targetDebt;\\n rewardData.undistributedFactor = configs[i].undistributedFactor;\\n rewardData.flipSpeed = configs[i].flipSpeed;\\n rewardData.compensationFactor = configs[i].compensationFactor;\\n rewardData.borrowAllocationWeightFactor = configs[i].borrowAllocationWeightFactor;\\n rewardData.depositAllocationWeightAddend = configs[i].depositAllocationWeightAddend;\\n rewardData.transitionFactor = configs[i].transitionFactor;\\n rewardData.depositAllocationWeightFactor = configs[i].depositAllocationWeightFactor;\\n\\n emit DistributionSet(configs[i].market, configs[i].reward, configs[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n mapping(address => uint256) public nonces;\\n\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(\\\"RewardsController\\\"),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n address private _claimSender;\\n modifier claimSender() {\\n if (_claimSender == address(0)) _claimSender = msg.sender;\\n _;\\n delete _claimSender;\\n }\\n\\n modifier permitSender(ClaimPermit calldata permit) {\\n assert(_claimSender == address(0));\\n assert(permit.deadline >= block.timestamp);\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\\"ClaimPermit(address owner,address spender,address[] assets,uint256 deadline)\\\"),\\n permit.owner,\\n msg.sender,\\n permit.assets,\\n nonces[permit.owner]++,\\n permit.deadline\\n )\\n )\\n )\\n ),\\n permit.v,\\n permit.r,\\n permit.s\\n );\\n assert(recoveredAddress != address(0) && recoveredAddress == permit.owner);\\n _claimSender = permit.owner;\\n }\\n _;\\n assert(_claimSender == address(0));\\n }\\n\\n struct TotalMarketBalance {\\n uint256 debt;\\n uint256 fixedBorrowShares;\\n uint256 floatingDebt;\\n uint256 floatingAssets;\\n }\\n\\n struct TimeVars {\\n uint256 start;\\n uint256 end;\\n uint256 period;\\n }\\n\\n struct AllocationVars {\\n uint256 globalUtilization;\\n uint256 sigmoid;\\n uint256 borrowRewardRule;\\n uint256 depositRewardRule;\\n uint256 borrowAllocation;\\n uint256 depositAllocation;\\n uint256 transitionFactor;\\n int256 flipSpeed;\\n uint256 borrowAllocationWeightFactor;\\n }\\n\\n struct AccountOperation {\\n bool operation;\\n uint256 balance;\\n }\\n\\n struct MarketOperation {\\n Market market;\\n bool[] operations;\\n }\\n\\n struct AccountMarketOperation {\\n Market market;\\n AccountOperation[] accountOperations;\\n }\\n\\n struct Account {\\n // liquidity index of the reward distribution for the account\\n uint128 index;\\n // amount of accrued rewards for the account since last account index update\\n uint128 accrued;\\n }\\n\\n struct Config {\\n Market market;\\n ERC20 reward;\\n IPriceFeed priceFeed;\\n uint32 start;\\n uint256 distributionPeriod;\\n uint256 targetDebt;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n }\\n\\n struct RewardData {\\n // distribution model\\n uint256 targetDebt;\\n uint256 releaseRate;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n uint256 lastUndistributed;\\n // allocation model\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n // liquidity indexes of the reward distribution\\n uint128 borrowIndex;\\n uint128 depositIndex;\\n // distribution timestamps\\n uint32 start;\\n uint32 end;\\n uint32 lastUpdate;\\n // config helpers\\n uint32 lastConfig;\\n uint256 lastConfigReleased;\\n // price feed\\n IPriceFeed priceFeed;\\n // account addresses and their rewards data (index & accrued)\\n mapping(address => mapping(bool => Account)) accounts;\\n }\\n\\n struct Distribution {\\n // reward assets and their data\\n mapping(ERC20 => RewardData) rewards;\\n // list of reward asset addresses for the market\\n mapping(uint128 => ERC20) availableRewards;\\n // count of reward tokens for the market\\n uint8 availableRewardsCount;\\n // base unit of the market\\n uint256 baseUnit;\\n }\\n\\n /// @notice Emitted when rewards are accrued by an account.\\n /// @param market Market where the operation was made.\\n /// @param reward reward asset.\\n /// @param account account that accrued the rewards.\\n /// @param operation true if the operation was a borrow, false if it was a deposit.\\n /// @param accountIndex previous account index.\\n /// @param operationIndex new operation index that is assigned to the `accountIndex`.\\n /// @param rewardsAccrued amount of rewards accrued.\\n event Accrue(\\n Market indexed market,\\n ERC20 indexed reward,\\n address indexed account,\\n bool operation,\\n uint256 accountIndex,\\n uint256 operationIndex,\\n uint256 rewardsAccrued\\n );\\n\\n /// @notice Emitted when rewards are claimed by an account.\\n /// @param account account that claimed the rewards.\\n /// @param reward reward asset.\\n /// @param to account that received the rewards.\\n /// @param amount amount of rewards claimed.\\n event Claim(address indexed account, ERC20 indexed reward, address indexed to, uint256 amount);\\n\\n /// @notice Emitted when a distribution is set.\\n /// @param market Market whose distribution was set.\\n /// @param reward reward asset to be distributed when operating with the Market.\\n /// @param config configuration struct containing the distribution parameters.\\n event DistributionSet(Market indexed market, ERC20 indexed reward, Config config);\\n\\n /// @notice Emitted when the distribution indexes are updated.\\n /// @param market Market of the distribution.\\n /// @param reward reward asset.\\n /// @param borrowIndex index of the borrow operations of a distribution.\\n /// @param depositIndex index of the deposit operations of a distribution.\\n /// @param newUndistributed amount of undistributed rewards.\\n /// @param lastUpdate current timestamp.\\n event IndexUpdate(\\n Market indexed market,\\n ERC20 indexed reward,\\n uint256 borrowIndex,\\n uint256 depositIndex,\\n uint256 newUndistributed,\\n uint256 lastUpdate\\n );\\n}\\n\\nerror IndexOverflow();\\nerror InvalidConfig();\\n\\nstruct ClaimPermit {\\n address owner;\\n ERC20[] assets;\\n uint256 deadline;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n}\\n\",\"keccak256\":\"0xb49f89a25450c5d31384afa51595c7e2cf0b32ea73d6e8fd2b2c937cc60c7b5f\",\"license\":\"BUSL-1.1\"},\"contracts/utils/FixedLib.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\nlibrary FixedLib {\\n using FixedPointMathLib for uint256;\\n\\n uint256 internal constant INTERVAL = 4 weeks;\\n\\n /// @notice Gets the amount of revenue sharing between the backup supplier and the new fixed pool supplier.\\n /// @param pool fixed rate pool.\\n /// @param amount amount being provided by the fixed pool supplier.\\n /// @param backupFeeRate rate charged to the fixed pool supplier to be accrued by the backup supplier.\\n /// @return yield amount to be offered to the fixed pool supplier.\\n /// @return backupFee yield to be accrued by the backup supplier for initially providing the liquidity.\\n function calculateDeposit(\\n Pool memory pool,\\n uint256 amount,\\n uint256 backupFeeRate\\n ) internal pure returns (uint256 yield, uint256 backupFee) {\\n uint256 memBackupSupplied = backupSupplied(pool);\\n if (memBackupSupplied != 0) {\\n yield = pool.unassignedEarnings.mulDivDown(Math.min(amount, memBackupSupplied), memBackupSupplied);\\n backupFee = yield.mulWadDown(backupFeeRate);\\n yield -= backupFee;\\n }\\n }\\n\\n /// @notice Registers an operation to add supply to a fixed rate pool and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be added to the supply.\\n /// @param amount amount to be added to the supply.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function deposit(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.supplied = supplied + amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to reduce borrowed amount from a fixed rate pool\\n /// and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be repaid.\\n /// @param amount amount to be added to the fixed rate pool.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function repay(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.borrowed = borrowed - amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to increase borrowed amount of a fixed rate pool\\n /// and potentially increase backup debt.\\n /// @param pool fixed rate pool where an amount will be borrowed.\\n /// @param amount amount to be borrowed from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function borrow(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 newBorrowed = borrowed + amount;\\n\\n backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, pool.supplied), newBorrowed);\\n pool.borrowed = newBorrowed;\\n }\\n\\n /// @notice Registers an operation to reduce supply from a fixed rate pool and potentially increase backup debt.\\n /// @param pool fixed rate pool where amount will be withdrawn.\\n /// @param amountToDiscount amount to be withdrawn from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function withdraw(Pool storage pool, uint256 amountToDiscount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n uint256 newSupply = supplied - amountToDiscount;\\n\\n backupDebtAddition = Math.min(supplied, borrowed) - Math.min(newSupply, borrowed);\\n pool.supplied = newSupply;\\n }\\n\\n /// @notice Accrues backup earnings from `unassignedEarnings` based on the `lastAccrual` time.\\n /// @param pool fixed rate pool where earnings will be accrued.\\n /// @param maturity maturity date of the pool.\\n /// @return backupEarnings amount of earnings to be distributed to the backup supplier.\\n function accrueEarnings(Pool storage pool, uint256 maturity) internal returns (uint256 backupEarnings) {\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (block.timestamp < maturity) {\\n uint256 unassignedEarnings = pool.unassignedEarnings;\\n pool.lastAccrual = block.timestamp;\\n backupEarnings = unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual);\\n pool.unassignedEarnings = unassignedEarnings - backupEarnings;\\n } else if (lastAccrual == maturity) {\\n backupEarnings = 0;\\n } else {\\n pool.lastAccrual = maturity;\\n backupEarnings = pool.unassignedEarnings;\\n pool.unassignedEarnings = 0;\\n }\\n }\\n\\n /// @notice Calculates the amount that a fixed rate pool borrowed from the backup supplier.\\n /// @param pool fixed rate pool.\\n /// @return amount borrowed from the fixed rate pool.\\n function backupSupplied(Pool memory pool) internal pure returns (uint256) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n return borrowed - Math.min(borrowed, supplied);\\n }\\n\\n /// @notice Modify positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it. Needs for the amount to be less than the principal and the fee\\n /// @param position original position to be scaled.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return scaled position.\\n function scaleProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 principal = amount.mulDivDown(position.principal, position.principal + position.fee);\\n position.principal = principal;\\n position.fee = amount - principal;\\n return position;\\n }\\n\\n /// @notice Reduce positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it.\\n /// @param position original position to be reduced.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return reduced position.\\n function reduceProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 positionAssets = position.principal + position.fee;\\n uint256 newPositionAssets = positionAssets - amount;\\n position.principal = newPositionAssets.mulDivDown(position.principal, positionAssets);\\n position.fee = newPositionAssets - position.principal;\\n return position;\\n }\\n\\n /// @notice Calculates what proportion of earnings would `borrowAmount` represent considering `backupSupplied`.\\n /// @param earnings amount to be distributed.\\n /// @param borrowAmount amount that will be checked if came from the backup supplier or fixed rate pool.\\n /// @return unassignedEarnings earnings to be added to `unassignedEarnings`.\\n /// @return backupEarnings earnings to be distributed to the backup supplier.\\n function distributeEarnings(\\n Pool memory pool,\\n uint256 earnings,\\n uint256 borrowAmount\\n ) internal pure returns (uint256 unassignedEarnings, uint256 backupEarnings) {\\n backupEarnings = borrowAmount == 0\\n ? 0\\n : earnings.mulDivDown(borrowAmount - Math.min(backupSupplied(pool), borrowAmount), borrowAmount);\\n unassignedEarnings = earnings - backupEarnings;\\n }\\n\\n /// @notice Adds a maturity date to the borrow or supply positions of the account.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity the new maturity where the account will borrow or supply to.\\n /// @return updated encoded maturity dates.\\n function setMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n // initialize the maturity with also the 1st bit on the 33th position set\\n if (encoded == 0) return maturity | (1 << 32);\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n if (maturity < baseMaturity) {\\n // if the new maturity is lower than the base, set it as the new base\\n // wipe clean the last 32 bits, shift the amount of `INTERVAL` and set the new value with the 33rd bit set\\n uint256 range = (baseMaturity - maturity) / INTERVAL;\\n if (encoded >> (256 - range) != 0) revert MaturityOverflow();\\n encoded = ((encoded >> 32) << (32 + range));\\n return maturity | encoded | (1 << 32);\\n } else {\\n uint256 range = (maturity - baseMaturity) / INTERVAL;\\n if (range > 223) revert MaturityOverflow();\\n return encoded | (1 << (32 + range));\\n }\\n }\\n\\n /// @notice Remove maturity from account's borrow or supplied positions.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity maturity date to be removed.\\n /// @return updated encoded maturity dates.\\n function clearMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n if (encoded == 0 || encoded == maturity | (1 << 32)) return 0;\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n // if the baseMaturity is the one being cleaned\\n if (maturity == baseMaturity) {\\n // wipe 32 bytes + 1 for the old base flag\\n uint256 packed = encoded >> 33;\\n uint256 range = 1;\\n while ((packed & 1) == 0 && packed != 0) {\\n unchecked {\\n ++range;\\n }\\n packed >>= 1;\\n }\\n encoded = ((encoded >> (32 + range)) << 32);\\n return (maturity + (range * INTERVAL)) | encoded;\\n } else {\\n // otherwise just clear the bit\\n return encoded & ~(1 << (32 + ((maturity - baseMaturity) / INTERVAL)));\\n }\\n }\\n\\n /// @notice Verifies that a maturity is `VALID`, `MATURED`, `NOT_READY` or `INVALID`.\\n /// @dev if expected state doesn't match the calculated one, it reverts with a custom error `UnmatchedPoolState`.\\n /// @param maturity timestamp of the maturity date to be verified.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param requiredState state required by the caller to be verified (see `State` for description).\\n /// @param alternativeState state required by the caller to be verified (see `State` for description).\\n function checkPoolState(uint256 maturity, uint8 maxPools, State requiredState, State alternativeState) internal view {\\n State state;\\n if (maturity % INTERVAL != 0) {\\n state = State.INVALID;\\n } else if (maturity <= block.timestamp) {\\n state = State.MATURED;\\n } else if (maturity > block.timestamp - (block.timestamp % INTERVAL) + (INTERVAL * maxPools)) {\\n state = State.NOT_READY;\\n } else {\\n state = State.VALID;\\n }\\n\\n if (state != requiredState && state != alternativeState) {\\n if (alternativeState == State.NONE) revert UnmatchedPoolState(uint8(state), uint8(requiredState));\\n\\n revert UnmatchedPoolStates(uint8(state), uint8(requiredState), uint8(alternativeState));\\n }\\n }\\n\\n /// @notice Stores the accountability of a fixed interest rate pool.\\n /// @param borrowed total amount borrowed from the pool.\\n /// @param supplied total amount supplied to the pool.\\n /// @param unassignedEarnings total amount of earnings not yet distributed and accrued.\\n /// @param lastAccrual timestamp for the last time that some earnings have been distributed to the backup supplier.\\n struct Pool {\\n uint256 borrowed;\\n uint256 supplied;\\n uint256 unassignedEarnings;\\n uint256 lastAccrual;\\n }\\n\\n /// @notice Stores principal and fee of a borrow or a supply position of a account in a fixed rate pool.\\n /// @param principal amount borrowed or supplied to the fixed rate pool.\\n /// @param fee amount of fees to be repaid or earned at the maturity of the fixed rate pool.\\n struct Position {\\n uint256 principal;\\n uint256 fee;\\n }\\n\\n enum State {\\n NONE,\\n INVALID,\\n MATURED,\\n VALID,\\n NOT_READY\\n }\\n}\\n\\nerror MaturityOverflow();\\nerror UnmatchedPoolState(uint8 state, uint8 requiredState);\\nerror UnmatchedPoolStates(uint8 state, uint8 requiredState, uint8 alternativeState);\\n\",\"keccak256\":\"0xb959d7d8c709c18ad668f58ab3d622b942ef36d72e6268e925e632b56a80ddc1\",\"license\":\"BUSL-1.1\"},\"contracts/utils/IPriceFeed.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\ninterface IPriceFeed {\\n function decimals() external view returns (uint8);\\n\\n function latestAnswer() external view returns (int256);\\n}\\n\",\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\"},\"solmate/src/mixins/ERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\nimport {SafeTransferLib} from \\\"../utils/SafeTransferLib.sol\\\";\\nimport {FixedPointMathLib} from \\\"../utils/FixedPointMathLib.sol\\\";\\n\\n/// @notice Minimal ERC4626 tokenized Vault implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)\\nabstract contract ERC4626 is ERC20 {\\n using SafeTransferLib for ERC20;\\n using FixedPointMathLib for uint256;\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /*//////////////////////////////////////////////////////////////\\n IMMUTABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n ERC20 public immutable asset;\\n\\n constructor(\\n ERC20 _asset,\\n string memory _name,\\n string memory _symbol\\n ) ERC20(_name, _symbol, _asset.decimals()) {\\n asset = _asset;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {\\n // Check for rounding error since we round down in previewDeposit.\\n require((shares = previewDeposit(assets)) != 0, \\\"ZERO_SHARES\\\");\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {\\n assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up.\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 shares) {\\n shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up.\\n\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 assets) {\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n // Check for rounding error since we round down in previewRedeem.\\n require((assets = previewRedeem(shares)) != 0, \\\"ZERO_ASSETS\\\");\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ACCOUNTING LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function totalAssets() public view virtual returns (uint256);\\n\\n function convertToShares(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets());\\n }\\n\\n function convertToAssets(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply);\\n }\\n\\n function previewDeposit(uint256 assets) public view virtual returns (uint256) {\\n return convertToShares(assets);\\n }\\n\\n function previewMint(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply);\\n }\\n\\n function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\\n }\\n\\n function previewRedeem(uint256 shares) public view virtual returns (uint256) {\\n return convertToAssets(shares);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LIMIT LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function maxDeposit(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxMint(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxWithdraw(address owner) public view virtual returns (uint256) {\\n return convertToAssets(balanceOf[owner]);\\n }\\n\\n function maxRedeem(address owner) public view virtual returns (uint256) {\\n return balanceOf[owner];\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL HOOKS LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {}\\n\\n function afterDeposit(uint256 assets, uint256 shares) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\"},\"solmate/src/tokens/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\\nabstract contract ERC20 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n uint8 public immutable decimals;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) public balanceOf;\\n\\n mapping(address => mapping(address => uint256)) public allowance;\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal immutable INITIAL_CHAIN_ID;\\n\\n bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\\n\\n mapping(address => uint256) public nonces;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint8 _decimals\\n ) {\\n name = _name;\\n symbol = _symbol;\\n decimals = _decimals;\\n\\n INITIAL_CHAIN_ID = block.chainid;\\n INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 amount) public virtual returns (bool) {\\n allowance[msg.sender][spender] = amount;\\n\\n emit Approval(msg.sender, spender, amount);\\n\\n return true;\\n }\\n\\n function transfer(address to, uint256 amount) public virtual returns (bool) {\\n balanceOf[msg.sender] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(msg.sender, to, amount);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual returns (bool) {\\n uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\\n\\n balanceOf[from] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n return true;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 LOGIC\\n //////////////////////////////////////////////////////////////*/\\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 ) public virtual {\\n require(deadline >= block.timestamp, \\\"PERMIT_DEADLINE_EXPIRED\\\");\\n\\n // Unchecked because the only math done is incrementing\\n // the owner's nonce which cannot realistically overflow.\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\n \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n ),\\n owner,\\n spender,\\n value,\\n nonces[owner]++,\\n deadline\\n )\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"INVALID_SIGNER\\\");\\n\\n allowance[recoveredAddress][spender] = value;\\n }\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\\n return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\\n }\\n\\n function computeDomainSeparator() internal view virtual returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 amount) internal virtual {\\n totalSupply += amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(address(0), to, amount);\\n }\\n\\n function _burn(address from, uint256 amount) internal virtual {\\n balanceOf[from] -= amount;\\n\\n // Cannot underflow because a user's balance\\n // will never be larger than the total supply.\\n unchecked {\\n totalSupply -= amount;\\n }\\n\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\"},\"solmate/src/utils/FixedPointMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Arithmetic library with operations for fixed-point numbers.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)\\nlibrary FixedPointMathLib {\\n /*//////////////////////////////////////////////////////////////\\n SIMPLIFIED FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.\\n\\n function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.\\n }\\n\\n function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.\\n }\\n\\n function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.\\n }\\n\\n function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.\\n }\\n\\n function powWad(int256 x, int256 y) internal pure returns (int256) {\\n // Equivalent to x to the power of y because x ** y = (e ** ln(x)) ** y = e ** (ln(x) * y)\\n return expWad((lnWad(x) * y) / int256(WAD)); // Using ln(x) means x must be greater than 0.\\n }\\n\\n function expWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n // When the result is < 0.5 we return zero. This happens when\\n // x <= floor(log(0.5e18) * 1e18) ~ -42e18\\n if (x <= -42139678854452767551) return 0;\\n\\n // When the result is > (2**255 - 1) / 1e18 we can not represent it as an\\n // int. This happens when x >= floor(log((2**255 - 1) / 1e18) * 1e18) ~ 135.\\n if (x >= 135305999368893231589) revert(\\\"EXP_OVERFLOW\\\");\\n\\n // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96\\n // for more intermediate precision and a binary basis. This base conversion\\n // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.\\n x = (x << 78) / 5**18;\\n\\n // Reduce range of x to (-\\u00bd ln 2, \\u00bd ln 2) * 2**96 by factoring out powers\\n // of two such that exp(x) = exp(x') * 2**k, where k is an integer.\\n // Solving this gives k = round(x / log(2)) and x' = x - k * log(2).\\n int256 k = ((x << 96) / 54916777467707473351141471128 + 2**95) >> 96;\\n x = x - k * 54916777467707473351141471128;\\n\\n // k is in the range [-61, 195].\\n\\n // Evaluate using a (6, 7)-term rational approximation.\\n // p is made monic, we'll multiply by a scale factor later.\\n int256 y = x + 1346386616545796478920950773328;\\n y = ((y * x) >> 96) + 57155421227552351082224309758442;\\n int256 p = y + x - 94201549194550492254356042504812;\\n p = ((p * y) >> 96) + 28719021644029726153956944680412240;\\n p = p * x + (4385272521454847904659076985693276 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n int256 q = x - 2855989394907223263936484059900;\\n q = ((q * x) >> 96) + 50020603652535783019961831881945;\\n q = ((q * x) >> 96) - 533845033583426703283633433725380;\\n q = ((q * x) >> 96) + 3604857256930695427073651918091429;\\n q = ((q * x) >> 96) - 14423608567350463180887372962807573;\\n q = ((q * x) >> 96) + 26449188498355588339934803723976023;\\n\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial won't have zeros in the domain as all its roots are complex.\\n // No scaling is necessary because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r should be in the range (0.09, 0.25) * 2**96.\\n\\n // We now need to multiply r by:\\n // * the scale factor s = ~6.031367120.\\n // * the 2**k factor from the range reduction.\\n // * the 1e18 / 2**96 factor for base conversion.\\n // We do this all at once, with an intermediate result in 2**213\\n // basis, so the final right shift is always by a positive amount.\\n r = int256((uint256(r) * 3822833074963236453042738258902158003155416615667) >> uint256(195 - k));\\n }\\n }\\n\\n function lnWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n // We want to convert x from 10**18 fixed point to 2**96 fixed point.\\n // We do this by multiplying by 2**96 / 10**18. But since\\n // ln(x * C) = ln(x) + ln(C), we can simply do nothing here\\n // and add ln(2**96 / 10**18) at the end.\\n\\n // Reduce range of x to (1, 2) * 2**96\\n // ln(2^k * x) = k * ln(2) + ln(x)\\n int256 k = int256(log2(uint256(x))) - 96;\\n x <<= uint256(159 - k);\\n x = int256(uint256(x) >> 159);\\n\\n // Evaluate using a (8, 8)-term rational approximation.\\n // p is made monic, we will multiply by a scale factor later.\\n int256 p = x + 3273285459638523848632254066296;\\n p = ((p * x) >> 96) + 24828157081833163892658089445524;\\n p = ((p * x) >> 96) + 43456485725739037958740375743393;\\n p = ((p * x) >> 96) - 11111509109440967052023855526967;\\n p = ((p * x) >> 96) - 45023709667254063763336534515857;\\n p = ((p * x) >> 96) - 14706773417378608786704636184526;\\n p = p * x - (795164235651350426258249787498 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n // q is monic by convention.\\n int256 q = x + 5573035233440673466300451813936;\\n q = ((q * x) >> 96) + 71694874799317883764090561454958;\\n q = ((q * x) >> 96) + 283447036172924575727196451306956;\\n q = ((q * x) >> 96) + 401686690394027663651624208769553;\\n q = ((q * x) >> 96) + 204048457590392012362485061816622;\\n q = ((q * x) >> 96) + 31853899698501571402653359427138;\\n q = ((q * x) >> 96) + 909429971244387300277376558375;\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial is known not to have zeros in the domain.\\n // No scaling required because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r is in the range (0, 0.125) * 2**96\\n\\n // Finalization, we need to:\\n // * multiply by the scale factor s = 5.549\\u2026\\n // * add ln(2**96 / 10**18)\\n // * add k * ln(2)\\n // * multiply by 10**18 / 2**96 = 5**18 >> 78\\n\\n // mul s * 5e18 * 2**96, base is now 5**18 * 2**192\\n r *= 1677202110996718588342820967067443963516166;\\n // add ln(2) * k * 5e18 * 2**192\\n r += 16597577552685614221487285958193947469193820559219878177908093499208371 * k;\\n // add ln(2**96 / 10**18) * 5e18 * 2**192\\n r += 600920179829731861736702779321621459595472258049074101567377883020018308;\\n // base conversion: mul 2**18 / 2**192\\n r >>= 174;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n LOW LEVEL FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function mulDivDown(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // Divide z by the denominator.\\n z := div(z, denominator)\\n }\\n }\\n\\n function mulDivUp(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // First, divide z - 1 by the denominator and add 1.\\n // We allow z - 1 to underflow if z is 0, because we multiply the\\n // end result by 0 if z is zero, ensuring we return 0 if z is zero.\\n z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1))\\n }\\n }\\n\\n function rpow(\\n uint256 x,\\n uint256 n,\\n uint256 scalar\\n ) internal pure returns (uint256 z) {\\n assembly {\\n switch x\\n case 0 {\\n switch n\\n case 0 {\\n // 0 ** 0 = 1\\n z := scalar\\n }\\n default {\\n // 0 ** n = 0\\n z := 0\\n }\\n }\\n default {\\n switch mod(n, 2)\\n case 0 {\\n // If n is even, store scalar in z for now.\\n z := scalar\\n }\\n default {\\n // If n is odd, store x in z for now.\\n z := x\\n }\\n\\n // Shifting right by 1 is like dividing by 2.\\n let half := shr(1, scalar)\\n\\n for {\\n // Shift n right by 1 before looping to halve it.\\n n := shr(1, n)\\n } n {\\n // Shift n right by 1 each iteration to halve it.\\n n := shr(1, n)\\n } {\\n // Revert immediately if x ** 2 would overflow.\\n // Equivalent to iszero(eq(div(xx, x), x)) here.\\n if shr(128, x) {\\n revert(0, 0)\\n }\\n\\n // Store x squared.\\n let xx := mul(x, x)\\n\\n // Round to the nearest number.\\n let xxRound := add(xx, half)\\n\\n // Revert if xx + half overflowed.\\n if lt(xxRound, xx) {\\n revert(0, 0)\\n }\\n\\n // Set x to scaled xxRound.\\n x := div(xxRound, scalar)\\n\\n // If n is even:\\n if mod(n, 2) {\\n // Compute z * x.\\n let zx := mul(z, x)\\n\\n // If z * x overflowed:\\n if iszero(eq(div(zx, x), z)) {\\n // Revert if x is non-zero.\\n if iszero(iszero(x)) {\\n revert(0, 0)\\n }\\n }\\n\\n // Round to the nearest number.\\n let zxRound := add(zx, half)\\n\\n // Revert if zx + half overflowed.\\n if lt(zxRound, zx) {\\n revert(0, 0)\\n }\\n\\n // Return properly scaled zxRound.\\n z := div(zxRound, scalar)\\n }\\n }\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n GENERAL NUMBER UTILITIES\\n //////////////////////////////////////////////////////////////*/\\n\\n function sqrt(uint256 x) internal pure returns (uint256 z) {\\n assembly {\\n let y := x // We start y at x, which will help us make our initial estimate.\\n\\n z := 181 // The \\\"correct\\\" value is 1, but this saves a multiplication later.\\n\\n // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad\\n // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.\\n\\n // We check y >= 2^(k + 8) but shift right by k bits\\n // each branch to ensure that if x >= 256, then y >= 256.\\n if iszero(lt(y, 0x10000000000000000000000000000000000)) {\\n y := shr(128, y)\\n z := shl(64, z)\\n }\\n if iszero(lt(y, 0x1000000000000000000)) {\\n y := shr(64, y)\\n z := shl(32, z)\\n }\\n if iszero(lt(y, 0x10000000000)) {\\n y := shr(32, y)\\n z := shl(16, z)\\n }\\n if iszero(lt(y, 0x1000000)) {\\n y := shr(16, y)\\n z := shl(8, z)\\n }\\n\\n // Goal was to get z*z*y within a small factor of x. More iterations could\\n // get y in a tighter range. Currently, we will have y in [256, 256*2^16).\\n // We ensured y >= 256 so that the relative difference between y and y+1 is small.\\n // That's not possible if x < 256 but we can just verify those cases exhaustively.\\n\\n // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.\\n // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.\\n // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.\\n\\n // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range\\n // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.\\n\\n // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate\\n // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.\\n\\n // There is no overflow risk here since y < 2^136 after the first branch above.\\n z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.\\n\\n // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n\\n // If x+1 is a perfect square, the Babylonian method cycles between\\n // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.\\n // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\\n // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.\\n // If you don't care whether the floor or ceil square root is returned, you can remove this statement.\\n z := sub(z, lt(div(x, z), z))\\n }\\n }\\n\\n function log2(uint256 x) internal pure returns (uint256 r) {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n assembly {\\n r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))\\n r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))\\n r := or(r, shl(5, lt(0xffffffff, shr(r, x))))\\n r := or(r, shl(4, lt(0xffff, shr(r, x))))\\n r := or(r, shl(3, lt(0xff, shr(r, x))))\\n r := or(r, shl(2, lt(0xf, shr(r, x))))\\n r := or(r, shl(1, lt(0x3, shr(r, x))))\\n r := or(r, lt(0x1, shr(r, x)))\\n }\\n }\\n\\n function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := mod(x, y)\\n }\\n }\\n\\n function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := div(x, y)\\n }\\n }\\n\\n /// @dev Will return 0 instead of reverting if y is zero.\\n function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // Add 1 to x * y if x % y > 0.\\n z := add(gt(mod(x, y), 0), div(x, y))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\"},\"solmate/src/utils/SafeTransferLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\n\\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)\\n/// @dev Caution! This library won't check that a token has code, responsibility is delegated to the caller.\\nlibrary SafeTransferLib {\\n /*//////////////////////////////////////////////////////////////\\n ETH OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n bool success;\\n\\n assembly {\\n // Transfer the ETH and store if it succeeded or not.\\n success := call(gas(), to, amount, 0, 0, 0, 0)\\n }\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferFrom(\\n ERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\\n mstore(4, from) // Append the \\\"from\\\" argument.\\n mstore(36, to) // Append the \\\"to\\\" argument.\\n mstore(68, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 100 because that's the total length of our calldata (4 + 32 * 3)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 100, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x095ea7b300000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"APPROVE_FAILED\\\");\\n }\\n}\\n\",\"keccak256\":\"0x5f2e1158c68c1f3d15b80e8a7dd92b6849f873066969562ad33c0abb80e536ff\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x610120604052348015610010575f80fd5b5060405161644938038061644983398101604081905261002f9161021c565b8160405180602001604052805f81525060405180602001604052805f8152508181846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100b09190610254565b60c96100bc8482610313565b5060ca6100c98382610313565b5060ff81166080524660a0526100dd610108565b60c0525050506001600160a01b0392831660e05250508116610100526101016101a1565b5050610444565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c960405161013991906103d2565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f54610100900460ff16156101b4575f80fd5b5f5460ff90811614610203575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610219575f80fd5b50565b5f806040838503121561022d575f80fd5b825161023881610205565b602084015190925061024981610205565b809150509250929050565b5f60208284031215610264575f80fd5b815160ff81168114610274575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102a357607f821691505b6020821081036102c157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561030e57805f5260205f20601f840160051c810160208510156102ec5750805b601f840160051c820191505b8181101561030b575f81556001016102f8565b50505b505050565b81516001600160401b0381111561032c5761032c61027b565b6103408161033a845461028f565b846102c7565b602080601f831160018114610373575f841561035c5750858301515b5f19600386901b1c1916600185901b1785556103ca565b5f85815260208120601f198616915b828110156103a157888601518255948401946001909101908401610382565b50858210156103be57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f8083546103df8161028f565b600182811680156103f7576001811461040c57610438565b60ff1984168752821515830287019450610438565b875f526020805f205f5b8581101561042f5781548a820152908401908201610416565b50505082870194505b50929695505050505050565b60805160a05160c05160e05161010051615f276105225f395f81816108070152818161161c015281816117c001528181611e3e015281816120910152818161220b0152818161257101528181612ed7015281816130800152818161316f015281816136990152614b0501525f81816107ac0152818161168001528181611c2201528181611d160152818161227d01528181612337015281816123fe0152818161286501528181612e59015281816136fd01528181614c92015281816151c001526152d501525f611c8f01525f611c5a01525f6107430152615f275ff3fe608060405234801561000f575f80fd5b5060043610610539575f3560e01c80636e76fc8f116102bf578063b2a02ff111610186578063d5164184116100ef578063e63ab1e9116100a9578063ef8b30f711610084578063ef8b30f714610d5e578063f3fdb15a14610d71578063fb0fc4c314610d84578063fea45d9414610d9b575f80fd5b8063e63ab1e914610d26578063e94b3c2114610d4d578063eee8c9e014610d56575f80fd5b8063d516418414610c92578063d547741f14610ca5578063d6b7494f14610cb8578063d905777e14610cc1578063dd62ed3e14610ce9578063e00b262514610d13575f80fd5b8063c63d75b611610140578063c63d75b614610831578063c6e6f59214610bf7578063ccfd8b1114610c0a578063ce96cb7714610c3b578063d2681a0b14610c4e578063d505accf14610c7f575f80fd5b8063b2a02ff114610b85578063b3d7f6b914610b98578063b460af9414610bab578063ba08765214610bbe578063bee36bb314610bd1578063bf722ca214610be4575f80fd5b806391d1485411610228578063a16a8850116101e2578063a16a885014610b27578063a1bab44714610b3c578063a1e8f02b14610b4f578063a217fddf14610b58578063a9059cbb14610b5f578063acb7081514610b72575f80fd5b806391d1485414610ac0578063926bb63314610ad357806394bf804d14610ae657806395d89b4114610af957806397bce8d014610b01578063a05a091a14610b14575f80fd5b80637ecebe00116102795780637ecebe0014610a6b5780638456cb5914610a8a5780638a1baa4614610a925780638bcd401614610a9b5780638c3cba5a14610aae5780638d0e5f0214610ab7575f80fd5b80636e76fc8f146109c05780636eb9ffeb146109e757806370a0823114610a1357806378007e2314610a325780637ad226dc14610a455780637e932d3214610a58575f80fd5b8063313ce567116104035780634322b7141161036c5780635cc2ef83116103265780635cc2ef83146109225780635e5c06e21461093557806361d027b31461097e57806366601032146109915780636bb65f531461099a5780636e553f65146109ad575f80fd5b80634322b7141461085857806347dffde01461088a5780634914c0081461089d5780634cdad506146108b05780634e7c5059146108c35780635c975abb14610917575f80fd5b80633aa18d6f116103bd5780633aa18d6f146107e65780633c6f317f146107ef5780633ec045a6146108025780633f4ba83a14610829578063402d267d1461083157806342da42bf14610845575f80fd5b8063313ce5671461073e57806333eeb1471461076557806334f7d1f2146107795780633644e5151461078c57806336568abe1461079457806338d52e0f146107a7575f80fd5b806313700101116104a5578063248a9ca31161045f578063248a9ca3146106bb57806325fc07a9146106dd57806328acf2cf146106fc5780632c5dcc771461070f5780632e0af008146107225780632f2ff15d1461072b575f80fd5b8063137001011461065d57806318160ddd146106705780631a5b9e62146106795780631a90f1861461068c5780631d43b30b1461069557806323b872dd146106a8575f80fd5b806307a2d13a116104f657806307a2d13a146105d6578063095ea7b3146105e95780630a28a477146105fc5780630ab69be81461060f5780630e52dbec146106365780630f2b75aa14610655575f80fd5b8063014a296f1461053d57806301e1d1141461056a57806301ffc9a714610580578063022d8af5146105a35780630539fa8c146105b857806306fdde03146105c1575b5f80fd5b61055061054b36600461566a565b610dae565b604080519283526020830191909152015b60405180910390f35b610572610de3565b604051908152602001610561565b61059361058e366004615685565b610e8f565b6040519015158152602001610561565b6105b66105b13660046156c7565b610ec5565b005b61057260d85481565b6105c9610f54565b60405161056191906156e0565b6105726105e4366004615715565b610fe0565b6105936105f736600461572c565b61100c565b61057261060a366004615715565b611077565b61055061061d366004615715565b5f90815260d16020526040902080546001909101549091565b60da546106439060ff1681565b60405160ff9091168152602001610561565b610572611096565b6105b661066b366004615794565b61113b565b61057260cb5481565b6105726106873660046157d3565b6111ac565b61057260d45481565b6105726106a336600461566a565b6116b5565b6105936106b6366004615825565b6117b5565b6105726106c9366004615715565b5f9081526065602052604090206001015490565b6105726106eb366004615715565b5f90815260d1602052604090205490565b6105b661070a366004615873565b611916565b6105b661071d36600461572c565b611962565b61057260dd5481565b6105b661073936600461588c565b6119d2565b6106437f000000000000000000000000000000000000000000000000000000000000000081565b60e35461059390600160a01b900460ff1681565b6105726107873660046158ba565b6119fb565b610572611c57565b6105b66107a236600461588c565b611cb1565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610561565b61057260d95481565b6105726107fd3660046158ba565b611cd3565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6105b6611d46565b61057261083f36600461566a565b505f1990565b6105b6610853366004615715565b611d7b565b60dc5461087290600160801b90046001600160801b031681565b6040516001600160801b039091168152602001610561565b610572610898366004615715565b611dba565b6105726108ab3660046158f8565b611dd8565b6105726108be366004615715565b6122af565b6108f76108d1366004615715565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610561565b60975460ff16610593565b6105b6610930366004615937565b6122b9565b61096361094336600461566a565b60d26020525f908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610561565b60e1546107ce906001600160a01b031681565b61057260e25481565b60e3546107ce906001600160a01b031681565b6105726109bb36600461588c565b612313565b6105727f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da546109fe90600160281b900463ffffffff1681565b60405163ffffffff9091168152602001610561565b610572610a2136600461566a565b60cc6020525f908152604090205481565b610572610a40366004615715565b6123b9565b610550610a5336600461588c565b6123d0565b6105b6610a66366004615957565b61242d565b610572610a7936600461566a565b60ce6020525f908152604090205481565b6105b66124aa565b61057260d55481565b6105b6610aa936600461566a565b6124bc565b61057260d35481565b61057260df5481565b610593610ace36600461588c565b61253c565b6105b6610ae136600461566a565b612566565b610572610af436600461588c565b61284c565b6105c96128e7565b6105b6610b0f366004615976565b6128f4565b610572610b223660046157d3565b612a55565b60da546109fe90610100900463ffffffff1681565b6105b6610b4a366004615715565b612e8d565b61057260d75481565b6105725f81565b610593610b6d36600461572c565b612ecc565b610550610b8036600461588c565b613021565b6105b6610b93366004615825565b61303d565b610572610ba6366004615715565b613051565b610572610bb9366004615a1f565b613067565b610572610bcc366004615a1f565b61316c565b6105b6610bdf36600461566a565b613266565b610572610bf2366004615715565b6132ba565b610572610c05366004615715565b6132d9565b610550610c1836600461588c565b60cf60209081525f92835260408084209091529082529020805460019091015482565b610572610c4936600461566a565b6132f0565b610550610c5c36600461588c565b60d060209081525f92835260408084209091529082529020805460019091015482565b6105b6610c8d366004615a53565b613311565b610572610ca0366004615a1f565b6134d6565b6105b6610cb336600461588c565b61372f565b61057260d65481565b610572610ccf36600461566a565b6001600160a01b03165f90815260cc602052604090205490565b610572610cf7366004615abc565b60cd60209081525f928352604080842090915290825290205481565b6105b6610d213660046156c7565b613753565b6105727f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61057260de5481565b6105726137ab565b610572610d6c366004615715565b61388c565b60db546107ce906001600160a01b031681565b60da546109fe90600160481b900463ffffffff1681565b60dc54610872906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610dd190610fe0565b610dda846116b5565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610e55575f81815260d160205260409020600381015480831115610e4957824210610e2f578160020154610e44565b6002820154610e449042839003838603613896565b860195505b50506224ea0001610dfd565b50610e7860e254670de0b6b3a76400000360d454610e716137ab565b03906138b4565b610e806138c8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610ebf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610ecf8161393e565b610ed7613948565b60dd5f828254610ee79190615b10565b90915550610ef590506139c1565b60dc80546fffffffffffffffffffffffffffffffff19166001600160801b0384169081179091556040519081527f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e906020015b60405180910390a15050565b60c98054610f6190615b23565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8d90615b23565b8015610fd85780601f10610faf57610100808354040283529160200191610fd8565b820191905f5260205f20905b815481529060010190602001808311610fbb57829003601f168201915b505050505081565b60cb545f90801561100357610ffe610ff6610de3565b849083613896565b611005565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110669086815260200190565b60405180910390a350600192915050565b60cb545f90801561100357610ffe8161108e610de3565b859190613a27565b60dd5460de545f9190828183106110af5760d8546110b3565b60d9545b60da549091505f906110ee906110d690600160481b900463ffffffff1642615b5b565b6110e09084615b6e565b6110e990615b85565b613a54565b61110090670de0b6b3a7640000615b9f565b905061110c81856138b4565b61112861112183670de0b6b3a7640000615b5b565b85906138b4565b6111329190615b10565b94505050505090565b5f6111458161393e565b8282604051602001611158929190615bbe565b60405160208183030381529060405260c990816111759190615c39565b508282604051602001611189929190615cf5565b60405160208183030381529060405260ca90816111a69190615c39565b50505050565b5f6111b5613bc7565b6111bd613bd6565b845f036111dd5760405163774257f760e01b815260040160405180910390fd5b60da546111f190879060ff1660035f613c01565b5f86815260d1602052604090206112088188613d9b565b60dd5f8282546112189190615b10565b909155505060e3546001600160a01b0316801561128657604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b15801561126f575f80fd5b505af1158015611281573d5f803e3d5ffd5b505050505b5f6112918389613e19565b90508015611324575f8160d3546112a89190615b10565b90506112ba6112b5613e55565b613f65565b60dc546112f5906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b60dd54906001600160801b03166138b4565b60d4546113029083615b10565b111561132057604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061132f611096565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff1661137d8a600101548b5f015489613fa2565b6113878888613fcf565b611394898960d354613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa1580156113ea573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140e9190615d33565b905061143361142c611420428f615b5b565b83906301e13380613896565b8c906138b4565b935050505080886114449190615b10565b93508684111561146757604051632c1b6b4160e21b815260040160405180910390fd5b6114718585614003565b5f89815260d0602090815260408083206001600160a01b0389168452909152812080549091036114c8576001600160a01b0386165f90815260d26020526040902060018101546114c1908c614079565b6001909101555b5f8061150b6114d685614164565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614190565b91509150815f1461152f5781866002015f8282546115299190615b10565b90915550505b611538816141dc565b60405180604001604052808c855f01546115529190615b10565b81526020018585600101546115679190615b10565b90525f8d815260d0602090815260408083206001600160a01b038d811680865291845293829020855181559483015160019095019490945580513381529182018f905281018790529194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139060600160405180910390a46115ee6139c1565b6115f789614208565b604051637b9d893160e01b81523060048201526001600160a01b0386811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b15801561165d575f80fd5b505af115801561166f573d5f803e3d5ffd5b506116a99250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614256565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b811561178a57600182161561176f575f81815260d0602090815260408083206001600160a01b038a16845290915281206001810154815491929161172a9190615b10565b90506117368188615b10565b96508242111561176c5761175f8561174e8542615b5b565b6117589190615b6e565b82906138b4565b6117699088615b10565b96505b50505b60019190911c906117836224ea0082615b10565b90506116e6565b600284015480156117ab5761179e81611dba565b6117a89087615b10565b95505b5050505050919050565b5f6117be613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530866117f8866122af565b6040518463ffffffff1660e01b815260040161181693929190615d4a565b5f6040518083038186803b15801561182c575f80fd5b505afa15801561183e573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561190257604051630149e46f60e01b81526001600160a01b038681166004830152821690630149e46f906024015f604051808303815f87803b158015611895575f80fd5b505af11580156118a7573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b1580156118eb575f80fd5b505af11580156118fd573d5f803e3d5ffd5b505050505b61190d858585614298565b95945050505050565b5f6119208161393e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610f48565b5f61196c8161393e565b6119776112b5613e55565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119ec8161393e565b6119f68383614372565b505050565b5f611a04613bc7565b611a0c613bd6565b835f03611a2c576040516356316e8760e01b815260040160405180910390fd5b60da54611a4090869060ff1660035f613c01565b5f85815260d16020526040812090611a588288613d9b565b90508060dd5f828254611a6b9190615b10565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f918291611ab0918a906143f7565b9092509050611abf8289615b10565b945086851015611ae257604051632c1b6b4160e21b815260040160405180910390fd5b611aec8489614448565b60d35f828254611afc9190615b5b565b90915550611b0c90508183615b10565b846002015f828254611b1e9190615b5b565b925050819055508060d55f828254611b369190615b10565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611b8b576001600160a01b0387165f90815260d2602052604090208054611b88908c614079565b90555b88815f015f828254611b9d9190615b10565b9250508190555082816001015f828254611bb79190615b10565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611c0c6139c1565b611c158a614208565b611c4a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614478565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611c8c57611c876144be565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611cc5575f80fd5b611ccf8282614557565b5050565b5f611cdc613bc7565b60da54611cf190869060ff1660036002613c01565b611cff8585858560016145bd565b9050611d096139c1565b611d3e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611d708161393e565b611d78614919565b50565b5f611d858161393e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610f48565b60df545f90801561100357610ffe611dd06137ab565b849083613a27565b5f611de1613bc7565b6001600160a01b0384163303611e0a576040516344511af160e01b815260040160405180910390fd5b60405163042dcf6b60e31b81523060048201526001600160a01b0383811660248301528581166044830152606482018590527f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890608401602060405180830381865afa158015611e83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea79190615d33565b9250825f03611ec95760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611f0357508515155b15612010576001821615611ff5575f81421015611f3a57611f278288898b5f6145bd565b9050611f338188615b5b565b9650611fe7565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611f6c9190615b10565b9150505f611f9360d6548542611f829190615b5b565b611f8c9190615b6e565b83906138b4565b611f9d9083615b10565b9050888111611fac5788611fb7565b611fb7898383613896565b9250825f03611fc8575f9850611fe4565b611fd584848b8d5f6145bd565b9250611fe1838a615b5b565b98505b50505b611ff18186615b10565b9450505b60019190911c906120096224ea0082615b10565b9050611ef5565b505083158015906120245750600281015415155b15612059575f612033856132ba565b90508015612057575f6120468288614966565b5090506120538185615b10565b9350505b505b604051636e1b003160e01b81523060048201526001600160a01b0384811660248301528681166044830152606482018490525f9182917f00000000000000000000000000000000000000000000000000000000000000001690636e1b0031906084016040805180830381865afa1580156120d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f99190615d6e565b915091508160d55f82825461210e9190615b10565b9091555050306001600160a01b038616036121345761212f30338984614ac0565b612199565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906121649033908b908690600401615d4a565b5f604051808303815f87803b15801561217b575f80fd5b505af115801561218d573d5f803e3d5ffd5b505050506121996139c1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b0388811660048301527f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906024015f604051808303815f87803b15801561224c575f80fd5b505af115801561225e573d5f803e3d5ffd5b505050506122a5333084876122739190615b10565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614478565b5050509392505050565b5f610ebf82610fe0565b5f6122c38161393e565b6122cb614cb9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61231d8361388c565b9050805f0361232a575f80fd5b61235f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614478565b6123698282614ce4565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8382614d57565b60df545f90801561100357610ffe8161108e6137ab565b5f806123da613bc7565b6123e48484614966565b90925090506123f16139c1565b6124266001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614478565b9250929050565b5f6124378161393e565b60e35460ff600160a01b90910416151582151514611ccf5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee6989061249e90851515815260200190565b60405180910390a25050565b6124b2614db6565b6124ba614e32565b565b5f6124c68161393e565b60db546001600160a01b0316156124e2576124e26112b5613e55565b60db80546001600160a01b0319166001600160a01b0384161790556125056139c1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146125af576040516317568c8f60e21b815260040160405180910390fd5b6125b7613948565b60dd5f8282546125c79190615b10565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b81156127a3576001821615612788575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916126439190615b10565b90508086106127855760e3546001600160a01b031680156126b557604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b15801561269e575f80fd5b505af11580156126b0573d5f803e3d5ffd5b505050505b6126bf8288615b5b565b96506126cb8287615b10565b83545f86815260d1602052604090209197506126e79190614e6f565b60d35f8282546126f79190615b5b565b90915550505f84815260d0602090815260408083206001600160a01b038d16845290915281208181556001908101919091558801546127369085614e92565b600189015560408051838152602081018490526001600160a01b038b1691339187917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a4505b50505b60019190911c9061279c6224ea0082615b10565b90506125ff565b6002850154158015906127c057506127ba846132ba565b93508315155b156127e1575f6127d08588614966565b5090506127dd8185615b10565b9350505b821561283c578260d55f8282546127f89190615b5b565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b6128446139c1565b505050505050565b5f61285683613051565b905061288d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b6128978284614ce4565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8184614d57565b60ca8054610f6190615b23565b5f54610100900460ff161580801561291257505f54600160ff909116105b8061292b5750303b15801561292b57505f5460ff166001145b612933575f80fd5b5f805460ff191660011790558015612954575f805461ff0019166101001790555b61295c614f52565b612964614f64565b60da805468ffffffffffffffff0019166101004263ffffffff1690810268ffffffff0000000000191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129b95f33614372565b6129c38b8b61113b565b6129cc89611916565b6129d588610ec5565b6129de876124bc565b6129e786612e8d565b6129f085611d7b565b6129f984613753565b612a0383836122b9565b8015612a48575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a5e613bc7565b845f03612a7e5760405163b8cb621960e01b815260040160405180910390fd5b60da54612a9390879060ff1660036002613c01565b5f86815260d160205260409020612aaa8188613d9b565b60dd5f828254612aba9190615b10565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612b049190615b10565b871115612b1f5760208101518151612b1c9190615b10565b96505b6040805180820190915281518152602080830151908201525f90612b4f90612b47908a614f7e565b518490614fc4565b60d354612b5c9190615b10565b905060dd5460d45482612b6f9190615b10565b1115612b8d57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612cba575f612ba1611096565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bf58a600101548b5f01548a613fa2565b612bff8989613fcf565b612c0a8a8a8a613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa158015612c60573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c849190615d33565b9050612caf612c96611420428f615b5b565b612ca890670de0b6b3a7640000615b10565b8c90615008565b965050505050612cbe565b8692505b85831015612cdf57604051632c1b6b4160e21b815260040160405180910390fd5b612ce98484614003565b5f80612d35612d00612cfb878c615b5b565b614164565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614190565b9150915081846002015f828254612d4c9190615b10565b90915550612d5b9050816141dc565b612d65838a61501c565b5060208301518351175f03612db8575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612db1908c614e92565b9055612de8565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b60408051338152602081018b90529081018690526001600160a01b0380881691908916908c907fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c9060600160405180910390a4612e436139c1565b612e4c8a614208565b612e806001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614256565b5050505095945050505050565b5f612e978161393e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610f48565b5f612ed5613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612f0f866122af565b6040518463ffffffff1660e01b8152600401612f2d93929190615d4a565b5f6040518083038186803b158015612f43575f80fd5b505afa158015612f55573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561301757604051630149e46f60e01b81523360048201526001600160a01b03821690630149e46f906024015f604051808303815f87803b158015612faa575f80fd5b505af1158015612fbc573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b158015613000575f80fd5b505af1158015613012573d5f803e3d5ffd5b505050505b611d3e848461507a565b5f8061302b613bc7565b6123e4613037856132ba565b84614966565b613045613bc7565b6119f633848484614ac0565b60cb545f90801561100357610ffe611dd0610de3565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db5906130b990309086908990600401615d4a565b5f6040518083038186803b1580156130cf575f80fd5b505afa1580156130e1573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561314f57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613138575f80fd5b505af115801561314a573d5f803e3d5ffd5b505050505b61315a8585856150dd565b91506131646139c1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530846131a7886122af565b6040518463ffffffff1660e01b81526004016131c593929190615d4a565b5f6040518083038186803b1580156131db575f80fd5b505afa1580156131ed573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561325b57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613244575f80fd5b505af1158015613256573d5f803e3d5ffd5b505050505b61315a8585856151e7565b5f6132708161393e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f90801561100357610ffe816132d16137ab565b859190613896565b60cb545f90801561100357610ffe816132d1610de3565b6001600160a01b0381165f90815260cc6020526040812054610ebf90610fe0565b4284101561331d575f80fd5b5f6001613328611c57565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613430573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134665750876001600160a01b0316816001600160a01b0316145b61346e575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134df613bc7565b6134e7613bd6565b6134f18285614003565b60e3546001600160a01b0316801561355a57604051636c912dad60e01b81526001600160a01b038481166004830152821690636c912dad906024015f604051808303815f87803b158015613543575f80fd5b505af1158015613555573d5f803e3d5ffd5b505050505b6135656112b5613e55565b61356e856123b9565b91505f8560d45461357f9190615b10565b60d481905560dc549091506135b0906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b8160d3546135be9190615b10565b11156135dc57604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135ed9190615b10565b90915550506001600160a01b0384165f90815260d260205260408120600201805485929061361c908490615b10565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136746139c1565b604051637b9d893160e01b81523060048201526001600160a01b0385811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b1580156136da575f80fd5b505af11580156136ec573d5f803e3d5ffd5b506137269250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614256565b50509392505050565b5f828152606560205260409020600101546137498161393e565b6119f68383614557565b5f61375d8161393e565b60dc80546001600160801b03908116600160801b918516918202179091556040519081527fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90602001610f48565b60d45460dd5460da545f929190839061387890613871906137d990600160281b900463ffffffff1642615b5b565b60db546301e13380906001600160a01b0316637c21fb1d6137fa888a613fcf565b613807898b60d354613fe7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613846573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061386a9190615d33565b9190613896565b84906138b4565b90506138848184615b10565b935050505090565b5f610ebf826132d9565b8282028115158415858304851417166138ad575f80fd5b0492915050565b5f6110058383670de0b6b3a7640000613896565b60da545f9081906138e490610100900463ffffffff1642615b5b565b9050805f036138f4575f91505090565b60da5461393890829061392490613912906224ea009060ff16615b6e565b60dc546001600160801b0316906138b4565b61392e9084615b10565b60d5549190613896565b91505090565b611d7881336152fc565b5f6139516138c8565b90508060d55f8282546139649190615b5b565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a3e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a6d57505f919050565b680755bf798b4a1bf1e58212613a81575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156124ba575f80fd5b60e354600160a01b900460ff16156124ba5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613c0f6224ea0086615d90565b15613c1c57506001613c6f565b428511613c2b57506002613c6f565b613c3b60ff85166224ea00615b6e565b613c486224ea0042615d90565b613c529042615b5b565b613c5c9190615b10565b851115613c6b57506004613c6f565b5060035b826004811115613c8157613c81615da3565b816004811115613c9357613c93615da3565b14158015613cc35750816004811115613cae57613cae615da3565b816004811115613cc057613cc0615da3565b14155b15613d94575f826004811115613cdb57613cdb615da3565b03613d2f57806004811115613cf257613cf2615da3565b836004811115613d0457613d04615da3565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d4157613d41615da3565b836004811115613d5357613d53615da3565b836004811115613d6557613d65615da3565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d26565b5050505050565b60038201545f9042831115613def5760028401544260038601819055613dd890613dc6908490615b5b565b613dd08487615b5b565b839190613896565b9250613de48382615b5b565b600286015550613e12565b828103613dfe575f9150613e12565b600384018390556002840180545f90915591505b5092915050565b81545f9081613e288483615b10565b9050613e41613e3b838760010154615342565b82615357565b613e4b9082615b5b565b9455509192915050565b60d45460dd545f919082613e698284613fcf565b60da549091505f90613ebb9061112190613e9090600160281b900463ffffffff1642615b5b565b60db5460d3546301e13380916001600160a01b031690637c21fb1d908890613807908b908d90613fe7565b9050613ec78185615b10565b9350613ede60e254826138b490919063ffffffff16565b945084613eeb8285615b10565b613ef59190615b5b565b60dd5560d484905560da805468ffffffff00000000001916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611d785760e154613f89906001600160a01b0316613f848361388c565b614ce4565b8060dd5f828254613f9a9190615b10565b909155505050565b5f8115801590613fb157508383115b613fbb575f611d3e565b611d3e82613fc98686615b5b565b90615365565b5f825f03613fdd575f611005565b6110058284615365565b5f835f03613ff5575f611d3e565b611d3e84613fc98486615b10565b336001600160a01b03831614611ccf576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146119f65761404782611077565b6140519082615b5b565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f0361408f57506401000000008117610ebf565b63ffffffff83168083101561410d575f6224ea006140ad8584615b5b565b6140b79190615db7565b90506140c581610100615b5b565b85901c156140e65760405163293cc41f60e21b815260040160405180910390fd5b6140f1816020615b10565b602086901c901b94508484176401000000001792505050610ebf565b5f6224ea0061411c8386615b5b565b6141269190615db7565b905060df81111561414a5760405163293cc41f60e21b815260040160405180910390fd5b614155816020615b10565b6001901b851792505050610ebf565b5f8061417b60e254846138b490919063ffffffff16565b905061418681613f65565b6110058184615b5b565b5f8082156141c4576141bf6141ad6141a787615379565b85615357565b6141b79085615b5b565b859085613896565b6141c6565b5f5b90506141d28185615b5b565b9150935093915050565b805f036141e65750565b60e254156141f757611d7881613f65565b8060d55f828254613f9a9190615b10565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806111a6575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142f1576142cd8382615b5b565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614318908490615b5b565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615ed28339815191529061435f9087815260200190565b60405180910390a3506001949350505050565b61437c828261253c565b611ccf575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143b33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f61440386615379565b9050801561443f576144246144188683615357565b60408801519083613896565b925061443083856138b4565b915061443c8284615b5b565b92505b50935093915050565b815460018301545f919061445c8482615b10565b600186015561190d61446e8383615357565b6141a79084615b5b565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d94575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144ef9190615dca565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614561828261253c565b15611ccf575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145de5760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906145f68289613d9b565b90508060dd5f8282546146099190615b10565b90915550505f88815260d0602090815260408083206001600160a01b038916845282528083208151808301909252805480835260019091015492820183905290929161465f918b9161465a91615b10565b615357565b6040805180820190915283518152602080850151908201529091505f906146869083614f7e565b5160e3549091506001600160a01b031680156146f357604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b1580156146dc575f80fd5b505af11580156146ee573d5f803e3d5ffd5b505050505b8b42101561479b5787156147935760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147419186906143f7565b90925090506147508183615b10565b886002015f8282546147629190615b5b565b925050819055508060d55f82825461477a9190615b10565b9091555061478a90508286615b5b565b985050506147e2565b8296506147e2565b60d6546147b6906147ac8e42615b5b565b6138719190615b6e565b6147c09084615b10565b96506147cc8388615b5b565b60d55f8282546147dc9190615b10565b90915550505b8987111561480357604051632c1b6b4160e21b815260040160405180910390fd5b61480d8683614e6f565b60d35f82825461481d9190615b5b565b9091555061482d9050848461501c565b5060208401518451175f03614889575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d29092529091209081015461487e908e614e92565b6001909101556148b9565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a461490a8c614208565b50505050505095945050505050565b614921615397565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001613a1d565b60e3545f9081906001600160a01b031680156149d357604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b1580156149bc575f80fd5b505af11580156149ce573d5f803e3d5ffd5b505050505b6149de6112b5613e55565b6001600160a01b0384165f90815260d2602052604090206002810154614a048782615357565b9350614a0f84611dba565b9450845f03614a315760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a429190615b5b565b90915550614a5290508482615b5b565b82600201819055508360df5f828254614a6b9190615b5b565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614ae05760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b0385811660048301523060248301527f0000000000000000000000000000000000000000000000000000000000000000169063e16ee720906044015f6040518083038186803b158015614b45575f80fd5b505afa158015614b57573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bc557604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614bae575f80fd5b505af1158015614bc0573d5f803e3d5ffd5b505050505b5f614bcf83611077565b9050614bdb83826153a5565b614be5848261541e565b60408051848152602081018390526001600160a01b03808716929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c7591815260200190565b60405180910390a3614c856139c1565b6128446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614256565b614cc1611096565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d4d57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614d36575f80fd5b505af1158015614d48573d5f803e3d5ffd5b505050505b6119f68383615485565b614d5f613bc7565b614d67613bd6565b614d6f614cb9565b5f614d78613e55565b90505f614d83613948565b9050614d8f8482615b10565b60dd5f828254614d9f9190615b10565b90915550614dae905082613f65565b6111a66139c1565b614de07f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361253c565b158015614e145750614e127f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361253c565b155b156124ba57604051631d006fdb60e31b815260040160405180910390fd5b614e3a613bc7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861494e3390565b815460018301545f9190614e838483615b5b565b855561190d61446e8383615357565b5f821580614ea65750816401000000001783145b15614eb257505f610ebf565b63ffffffff8316808303614f2057602184901c60015b60018216158015614ed857508115155b15614ee957600191821c9101614ec8565b6020614ef58282615b10565b9690961c90951b9485614f0b6224ea0083615b6e565b614f159087615b10565b179350505050610ebf565b6224ea00614f2e8285615b5b565b614f389190615db7565b614f43906020615b10565b6001901b198416915050610ebf565b5f54610100900460ff166124ba575f80fd5b5f54610100900460ff16614f76575f80fd5b6124ba6154d4565b604080518082019091525f8082526020820152825160208401515f91614fa8916132d19082615b10565b8085529050614fb78184615b5b565b6020850152509192915050565b815460018301545f919082614fd98583615b5b565b9050614fe58184615357565b614fef8385615357565b614ff99190615b5b565b60019096015550929392505050565b5f61100583670de0b6b3a764000084613896565b604080518082019091525f8082526020820152602083015183515f9161504191615b10565b90505f61504e8483615b5b565b855190915061505f90829084613896565b80865261506c9082615b5b565b602086015250929392505050565b335f90815260cc602052604081208054839190839061509a908490615b5b565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615ed2833981519152906110669086815260200190565b5f6150e784611077565b9050336001600160a01b03831614615154576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151525761512e8282615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61515e84826153a5565b615168828261541e565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614256565b5f336001600160a01b03831614615253576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146152515761522d8582615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61525c846122af565b9050805f03615269575f80fd5b61527381856153a5565b61527d828561541e565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614256565b615306828261253c565b611ccf57615313816154f2565b61531e836020615504565b60405160200161532f929190615e53565b6040516020818303038152906040525f80fd5b5f8183116153505781611005565b5090919050565b5f8183106153505781611005565b5f61100583670de0b6b3a764000084613a27565b805160208201515f919061538d8282615357565b611d3e9083615b5b565b60975460ff166124ba575f80fd5b6153ad613bc7565b6153b5614cb9565b6153c06112b5613e55565b5f6153c9613948565b90505f838260dd546153db9190615b10565b6153e59190615b5b565b90508060d45460d3546153f89190615b10565b111561541657604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc602052604081208054839290615445908490615b5b565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615ed2833981519152906020015b60405180910390a35050565b8060cb5f8282546154969190615b10565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615ed28339815191529101615479565b5f54610100900460ff166154e6575f80fd5b6097805460ff19169055565b6060610ebf6001600160a01b03831660145b60605f615512836002615b6e565b61551d906002615b10565b67ffffffffffffffff81111561553557615535615be1565b6040519080825280601f01601f19166020018201604052801561555f576020820181803683370190505b509050600360fc1b815f8151811061557957615579615ea8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106155a7576155a7615ea8565b60200101906001600160f81b03191690815f1a9053505f6155c9846002615b6e565b6155d4906001615b10565b90505b600181111561564b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061560857615608615ea8565b1a60f81b82828151811061561e5761561e615ea8565b60200101906001600160f81b03191690815f1a90535060049490941c9361564481615ebc565b90506155d7565b508315611005575f80fd5b6001600160a01b0381168114611d78575f80fd5b5f6020828403121561567a575f80fd5b813561100581615656565b5f60208284031215615695575f80fd5b81356001600160e01b031981168114611005575f80fd5b80356001600160801b03811681146156c2575f80fd5b919050565b5f602082840312156156d7575f80fd5b611005826156ac565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615725575f80fd5b5035919050565b5f806040838503121561573d575f80fd5b823561574881615656565b946020939093013593505050565b5f8083601f840112615766575f80fd5b50813567ffffffffffffffff81111561577d575f80fd5b602083019150836020828501011115612426575f80fd5b5f80602083850312156157a5575f80fd5b823567ffffffffffffffff8111156157bb575f80fd5b6157c785828601615756565b90969095509350505050565b5f805f805f60a086880312156157e7575f80fd5b853594506020860135935060408601359250606086013561580781615656565b9150608086013561581781615656565b809150509295509295909350565b5f805f60608486031215615837575f80fd5b833561584281615656565b9250602084013561585281615656565b929592945050506040919091013590565b803560ff811681146156c2575f80fd5b5f60208284031215615883575f80fd5b61100582615863565b5f806040838503121561589d575f80fd5b8235915060208301356158af81615656565b809150509250929050565b5f805f80608085870312156158cd575f80fd5b84359350602085013592506040850135915060608501356158ed81615656565b939692955090935050565b5f805f6060848603121561590a575f80fd5b833561591581615656565b925060208401359150604084013561592c81615656565b809150509250925092565b5f8060408385031215615948575f80fd5b50508035926020909101359150565b5f60208284031215615967575f80fd5b81358015158114611005575f80fd5b5f805f805f805f805f806101208b8d031215615990575f80fd5b8a3567ffffffffffffffff8111156159a6575f80fd5b6159b28d828e01615756565b909b5099506159c5905060208c01615863565b97506159d360408c016156ac565b965060608b01356159e381615656565b955060808b0135945060a08b013593506159ff60c08c016156ac565b925060e08b013591506101008b013590509295989b9194979a5092959850565b5f805f60608486031215615a31575f80fd5b833592506020840135615a4381615656565b9150604084013561592c81615656565b5f805f805f805f60e0888a031215615a69575f80fd5b8735615a7481615656565b96506020880135615a8481615656565b95506040880135945060608801359350615aa060808901615863565b925060a0880135915060c0880135905092959891949750929550565b5f8060408385031215615acd575f80fd5b8235615ad881615656565b915060208301356158af81615656565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ebf57610ebf615afc565b600181811c90821680615b3757607f821691505b602082108103615b5557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610ebf57610ebf615afc565b8082028115828204841417610ebf57610ebf615afc565b5f600160ff1b8201615b9957615b99615afc565b505f0390565b8181035f831280158383131683831282161715613e1257613e12615afc565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156119f657805f5260205f20601f840160051c81016020851015615c1a5750805b601f840160051c820191505b81811015613d94575f8155600101615c26565b815167ffffffffffffffff811115615c5357615c53615be1565b615c6781615c618454615b23565b84615bf5565b602080601f831160018114615c9a575f8415615c835750858301515b5f19600386901b1c1916600185901b178555612844565b5f85815260208120601f198616915b82811015615cc857888601518255948401946001909101908401615ca9565b5085821015615ce557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b03828116828216039080821115613e1257613e12615afc565b5f60208284031215615d43575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215615d7f575f80fd5b505080516020909101519092909150565b5f82615d9e57615d9e615ae8565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615dc557615dc5615ae8565b500490565b5f808354615dd781615b23565b60018281168015615def5760018114615e0457615e30565b60ff1984168752821515830287019450615e30565b875f526020805f205f5b85811015615e275781548a820152908401908201615e0e565b50505082870194505b50929695505050505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f615e846017830185615e3c565b7001034b99036b4b9b9b4b733903937b6329607d1b815261190d6011820185615e3c565b634e487b7160e01b5f52603260045260245ffd5b5f81615eca57615eca615afc565b505f19019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204485d3d9d92eeb57ec453d55009460985e73455784e22d97a9959ce3f189d91364736f6c63430008190033", - "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610539575f3560e01c80636e76fc8f116102bf578063b2a02ff111610186578063d5164184116100ef578063e63ab1e9116100a9578063ef8b30f711610084578063ef8b30f714610d5e578063f3fdb15a14610d71578063fb0fc4c314610d84578063fea45d9414610d9b575f80fd5b8063e63ab1e914610d26578063e94b3c2114610d4d578063eee8c9e014610d56575f80fd5b8063d516418414610c92578063d547741f14610ca5578063d6b7494f14610cb8578063d905777e14610cc1578063dd62ed3e14610ce9578063e00b262514610d13575f80fd5b8063c63d75b611610140578063c63d75b614610831578063c6e6f59214610bf7578063ccfd8b1114610c0a578063ce96cb7714610c3b578063d2681a0b14610c4e578063d505accf14610c7f575f80fd5b8063b2a02ff114610b85578063b3d7f6b914610b98578063b460af9414610bab578063ba08765214610bbe578063bee36bb314610bd1578063bf722ca214610be4575f80fd5b806391d1485411610228578063a16a8850116101e2578063a16a885014610b27578063a1bab44714610b3c578063a1e8f02b14610b4f578063a217fddf14610b58578063a9059cbb14610b5f578063acb7081514610b72575f80fd5b806391d1485414610ac0578063926bb63314610ad357806394bf804d14610ae657806395d89b4114610af957806397bce8d014610b01578063a05a091a14610b14575f80fd5b80637ecebe00116102795780637ecebe0014610a6b5780638456cb5914610a8a5780638a1baa4614610a925780638bcd401614610a9b5780638c3cba5a14610aae5780638d0e5f0214610ab7575f80fd5b80636e76fc8f146109c05780636eb9ffeb146109e757806370a0823114610a1357806378007e2314610a325780637ad226dc14610a455780637e932d3214610a58575f80fd5b8063313ce567116104035780634322b7141161036c5780635cc2ef83116103265780635cc2ef83146109225780635e5c06e21461093557806361d027b31461097e57806366601032146109915780636bb65f531461099a5780636e553f65146109ad575f80fd5b80634322b7141461085857806347dffde01461088a5780634914c0081461089d5780634cdad506146108b05780634e7c5059146108c35780635c975abb14610917575f80fd5b80633aa18d6f116103bd5780633aa18d6f146107e65780633c6f317f146107ef5780633ec045a6146108025780633f4ba83a14610829578063402d267d1461083157806342da42bf14610845575f80fd5b8063313ce5671461073e57806333eeb1471461076557806334f7d1f2146107795780633644e5151461078c57806336568abe1461079457806338d52e0f146107a7575f80fd5b806313700101116104a5578063248a9ca31161045f578063248a9ca3146106bb57806325fc07a9146106dd57806328acf2cf146106fc5780632c5dcc771461070f5780632e0af008146107225780632f2ff15d1461072b575f80fd5b8063137001011461065d57806318160ddd146106705780631a5b9e62146106795780631a90f1861461068c5780631d43b30b1461069557806323b872dd146106a8575f80fd5b806307a2d13a116104f657806307a2d13a146105d6578063095ea7b3146105e95780630a28a477146105fc5780630ab69be81461060f5780630e52dbec146106365780630f2b75aa14610655575f80fd5b8063014a296f1461053d57806301e1d1141461056a57806301ffc9a714610580578063022d8af5146105a35780630539fa8c146105b857806306fdde03146105c1575b5f80fd5b61055061054b36600461566a565b610dae565b604080519283526020830191909152015b60405180910390f35b610572610de3565b604051908152602001610561565b61059361058e366004615685565b610e8f565b6040519015158152602001610561565b6105b66105b13660046156c7565b610ec5565b005b61057260d85481565b6105c9610f54565b60405161056191906156e0565b6105726105e4366004615715565b610fe0565b6105936105f736600461572c565b61100c565b61057261060a366004615715565b611077565b61055061061d366004615715565b5f90815260d16020526040902080546001909101549091565b60da546106439060ff1681565b60405160ff9091168152602001610561565b610572611096565b6105b661066b366004615794565b61113b565b61057260cb5481565b6105726106873660046157d3565b6111ac565b61057260d45481565b6105726106a336600461566a565b6116b5565b6105936106b6366004615825565b6117b5565b6105726106c9366004615715565b5f9081526065602052604090206001015490565b6105726106eb366004615715565b5f90815260d1602052604090205490565b6105b661070a366004615873565b611916565b6105b661071d36600461572c565b611962565b61057260dd5481565b6105b661073936600461588c565b6119d2565b6106437f000000000000000000000000000000000000000000000000000000000000000081565b60e35461059390600160a01b900460ff1681565b6105726107873660046158ba565b6119fb565b610572611c57565b6105b66107a236600461588c565b611cb1565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610561565b61057260d95481565b6105726107fd3660046158ba565b611cd3565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6105b6611d46565b61057261083f36600461566a565b505f1990565b6105b6610853366004615715565b611d7b565b60dc5461087290600160801b90046001600160801b031681565b6040516001600160801b039091168152602001610561565b610572610898366004615715565b611dba565b6105726108ab3660046158f8565b611dd8565b6105726108be366004615715565b6122af565b6108f76108d1366004615715565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610561565b60975460ff16610593565b6105b6610930366004615937565b6122b9565b61096361094336600461566a565b60d26020525f908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610561565b60e1546107ce906001600160a01b031681565b61057260e25481565b60e3546107ce906001600160a01b031681565b6105726109bb36600461588c565b612313565b6105727f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da546109fe90600160281b900463ffffffff1681565b60405163ffffffff9091168152602001610561565b610572610a2136600461566a565b60cc6020525f908152604090205481565b610572610a40366004615715565b6123b9565b610550610a5336600461588c565b6123d0565b6105b6610a66366004615957565b61242d565b610572610a7936600461566a565b60ce6020525f908152604090205481565b6105b66124aa565b61057260d55481565b6105b6610aa936600461566a565b6124bc565b61057260d35481565b61057260df5481565b610593610ace36600461588c565b61253c565b6105b6610ae136600461566a565b612566565b610572610af436600461588c565b61284c565b6105c96128e7565b6105b6610b0f366004615976565b6128f4565b610572610b223660046157d3565b612a55565b60da546109fe90610100900463ffffffff1681565b6105b6610b4a366004615715565b612e8d565b61057260d75481565b6105725f81565b610593610b6d36600461572c565b612ecc565b610550610b8036600461588c565b613021565b6105b6610b93366004615825565b61303d565b610572610ba6366004615715565b613051565b610572610bb9366004615a1f565b613067565b610572610bcc366004615a1f565b61316c565b6105b6610bdf36600461566a565b613266565b610572610bf2366004615715565b6132ba565b610572610c05366004615715565b6132d9565b610550610c1836600461588c565b60cf60209081525f92835260408084209091529082529020805460019091015482565b610572610c4936600461566a565b6132f0565b610550610c5c36600461588c565b60d060209081525f92835260408084209091529082529020805460019091015482565b6105b6610c8d366004615a53565b613311565b610572610ca0366004615a1f565b6134d6565b6105b6610cb336600461588c565b61372f565b61057260d65481565b610572610ccf36600461566a565b6001600160a01b03165f90815260cc602052604090205490565b610572610cf7366004615abc565b60cd60209081525f928352604080842090915290825290205481565b6105b6610d213660046156c7565b613753565b6105727f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61057260de5481565b6105726137ab565b610572610d6c366004615715565b61388c565b60db546107ce906001600160a01b031681565b60da546109fe90600160481b900463ffffffff1681565b60dc54610872906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610dd190610fe0565b610dda846116b5565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610e55575f81815260d160205260409020600381015480831115610e4957824210610e2f578160020154610e44565b6002820154610e449042839003838603613896565b860195505b50506224ea0001610dfd565b50610e7860e254670de0b6b3a76400000360d454610e716137ab565b03906138b4565b610e806138c8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610ebf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610ecf8161393e565b610ed7613948565b60dd5f828254610ee79190615b10565b90915550610ef590506139c1565b60dc80546fffffffffffffffffffffffffffffffff19166001600160801b0384169081179091556040519081527f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e906020015b60405180910390a15050565b60c98054610f6190615b23565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8d90615b23565b8015610fd85780601f10610faf57610100808354040283529160200191610fd8565b820191905f5260205f20905b815481529060010190602001808311610fbb57829003601f168201915b505050505081565b60cb545f90801561100357610ffe610ff6610de3565b849083613896565b611005565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110669086815260200190565b60405180910390a350600192915050565b60cb545f90801561100357610ffe8161108e610de3565b859190613a27565b60dd5460de545f9190828183106110af5760d8546110b3565b60d9545b60da549091505f906110ee906110d690600160481b900463ffffffff1642615b5b565b6110e09084615b6e565b6110e990615b85565b613a54565b61110090670de0b6b3a7640000615b9f565b905061110c81856138b4565b61112861112183670de0b6b3a7640000615b5b565b85906138b4565b6111329190615b10565b94505050505090565b5f6111458161393e565b8282604051602001611158929190615bbe565b60405160208183030381529060405260c990816111759190615c39565b508282604051602001611189929190615cf5565b60405160208183030381529060405260ca90816111a69190615c39565b50505050565b5f6111b5613bc7565b6111bd613bd6565b845f036111dd5760405163774257f760e01b815260040160405180910390fd5b60da546111f190879060ff1660035f613c01565b5f86815260d1602052604090206112088188613d9b565b60dd5f8282546112189190615b10565b909155505060e3546001600160a01b0316801561128657604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b15801561126f575f80fd5b505af1158015611281573d5f803e3d5ffd5b505050505b5f6112918389613e19565b90508015611324575f8160d3546112a89190615b10565b90506112ba6112b5613e55565b613f65565b60dc546112f5906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b60dd54906001600160801b03166138b4565b60d4546113029083615b10565b111561132057604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061132f611096565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff1661137d8a600101548b5f015489613fa2565b6113878888613fcf565b611394898960d354613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa1580156113ea573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140e9190615d33565b905061143361142c611420428f615b5b565b83906301e13380613896565b8c906138b4565b935050505080886114449190615b10565b93508684111561146757604051632c1b6b4160e21b815260040160405180910390fd5b6114718585614003565b5f89815260d0602090815260408083206001600160a01b0389168452909152812080549091036114c8576001600160a01b0386165f90815260d26020526040902060018101546114c1908c614079565b6001909101555b5f8061150b6114d685614164565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614190565b91509150815f1461152f5781866002015f8282546115299190615b10565b90915550505b611538816141dc565b60405180604001604052808c855f01546115529190615b10565b81526020018585600101546115679190615b10565b90525f8d815260d0602090815260408083206001600160a01b038d811680865291845293829020855181559483015160019095019490945580513381529182018f905281018790529194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139060600160405180910390a46115ee6139c1565b6115f789614208565b604051637b9d893160e01b81523060048201526001600160a01b0386811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b15801561165d575f80fd5b505af115801561166f573d5f803e3d5ffd5b506116a99250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614256565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b811561178a57600182161561176f575f81815260d0602090815260408083206001600160a01b038a16845290915281206001810154815491929161172a9190615b10565b90506117368188615b10565b96508242111561176c5761175f8561174e8542615b5b565b6117589190615b6e565b82906138b4565b6117699088615b10565b96505b50505b60019190911c906117836224ea0082615b10565b90506116e6565b600284015480156117ab5761179e81611dba565b6117a89087615b10565b95505b5050505050919050565b5f6117be613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530866117f8866122af565b6040518463ffffffff1660e01b815260040161181693929190615d4a565b5f6040518083038186803b15801561182c575f80fd5b505afa15801561183e573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561190257604051630149e46f60e01b81526001600160a01b038681166004830152821690630149e46f906024015f604051808303815f87803b158015611895575f80fd5b505af11580156118a7573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b1580156118eb575f80fd5b505af11580156118fd573d5f803e3d5ffd5b505050505b61190d858585614298565b95945050505050565b5f6119208161393e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610f48565b5f61196c8161393e565b6119776112b5613e55565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119ec8161393e565b6119f68383614372565b505050565b5f611a04613bc7565b611a0c613bd6565b835f03611a2c576040516356316e8760e01b815260040160405180910390fd5b60da54611a4090869060ff1660035f613c01565b5f85815260d16020526040812090611a588288613d9b565b90508060dd5f828254611a6b9190615b10565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f918291611ab0918a906143f7565b9092509050611abf8289615b10565b945086851015611ae257604051632c1b6b4160e21b815260040160405180910390fd5b611aec8489614448565b60d35f828254611afc9190615b5b565b90915550611b0c90508183615b10565b846002015f828254611b1e9190615b5b565b925050819055508060d55f828254611b369190615b10565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611b8b576001600160a01b0387165f90815260d2602052604090208054611b88908c614079565b90555b88815f015f828254611b9d9190615b10565b9250508190555082816001015f828254611bb79190615b10565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611c0c6139c1565b611c158a614208565b611c4a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614478565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611c8c57611c876144be565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611cc5575f80fd5b611ccf8282614557565b5050565b5f611cdc613bc7565b60da54611cf190869060ff1660036002613c01565b611cff8585858560016145bd565b9050611d096139c1565b611d3e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611d708161393e565b611d78614919565b50565b5f611d858161393e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610f48565b60df545f90801561100357610ffe611dd06137ab565b849083613a27565b5f611de1613bc7565b6001600160a01b0384163303611e0a576040516344511af160e01b815260040160405180910390fd5b60405163042dcf6b60e31b81523060048201526001600160a01b0383811660248301528581166044830152606482018590527f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890608401602060405180830381865afa158015611e83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea79190615d33565b9250825f03611ec95760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611f0357508515155b15612010576001821615611ff5575f81421015611f3a57611f278288898b5f6145bd565b9050611f338188615b5b565b9650611fe7565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611f6c9190615b10565b9150505f611f9360d6548542611f829190615b5b565b611f8c9190615b6e565b83906138b4565b611f9d9083615b10565b9050888111611fac5788611fb7565b611fb7898383613896565b9250825f03611fc8575f9850611fe4565b611fd584848b8d5f6145bd565b9250611fe1838a615b5b565b98505b50505b611ff18186615b10565b9450505b60019190911c906120096224ea0082615b10565b9050611ef5565b505083158015906120245750600281015415155b15612059575f612033856132ba565b90508015612057575f6120468288614966565b5090506120538185615b10565b9350505b505b604051636e1b003160e01b81523060048201526001600160a01b0384811660248301528681166044830152606482018490525f9182917f00000000000000000000000000000000000000000000000000000000000000001690636e1b0031906084016040805180830381865afa1580156120d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f99190615d6e565b915091508160d55f82825461210e9190615b10565b9091555050306001600160a01b038616036121345761212f30338984614ac0565b612199565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906121649033908b908690600401615d4a565b5f604051808303815f87803b15801561217b575f80fd5b505af115801561218d573d5f803e3d5ffd5b505050506121996139c1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b0388811660048301527f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906024015f604051808303815f87803b15801561224c575f80fd5b505af115801561225e573d5f803e3d5ffd5b505050506122a5333084876122739190615b10565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614478565b5050509392505050565b5f610ebf82610fe0565b5f6122c38161393e565b6122cb614cb9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61231d8361388c565b9050805f0361232a575f80fd5b61235f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614478565b6123698282614ce4565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8382614d57565b60df545f90801561100357610ffe8161108e6137ab565b5f806123da613bc7565b6123e48484614966565b90925090506123f16139c1565b6124266001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614478565b9250929050565b5f6124378161393e565b60e35460ff600160a01b90910416151582151514611ccf5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee6989061249e90851515815260200190565b60405180910390a25050565b6124b2614db6565b6124ba614e32565b565b5f6124c68161393e565b60db546001600160a01b0316156124e2576124e26112b5613e55565b60db80546001600160a01b0319166001600160a01b0384161790556125056139c1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146125af576040516317568c8f60e21b815260040160405180910390fd5b6125b7613948565b60dd5f8282546125c79190615b10565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b81156127a3576001821615612788575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916126439190615b10565b90508086106127855760e3546001600160a01b031680156126b557604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b15801561269e575f80fd5b505af11580156126b0573d5f803e3d5ffd5b505050505b6126bf8288615b5b565b96506126cb8287615b10565b83545f86815260d1602052604090209197506126e79190614e6f565b60d35f8282546126f79190615b5b565b90915550505f84815260d0602090815260408083206001600160a01b038d16845290915281208181556001908101919091558801546127369085614e92565b600189015560408051838152602081018490526001600160a01b038b1691339187917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a4505b50505b60019190911c9061279c6224ea0082615b10565b90506125ff565b6002850154158015906127c057506127ba846132ba565b93508315155b156127e1575f6127d08588614966565b5090506127dd8185615b10565b9350505b821561283c578260d55f8282546127f89190615b5b565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b6128446139c1565b505050505050565b5f61285683613051565b905061288d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b6128978284614ce4565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8184614d57565b60ca8054610f6190615b23565b5f54610100900460ff161580801561291257505f54600160ff909116105b8061292b5750303b15801561292b57505f5460ff166001145b612933575f80fd5b5f805460ff191660011790558015612954575f805461ff0019166101001790555b61295c614f52565b612964614f64565b60da805468ffffffffffffffff0019166101004263ffffffff1690810268ffffffff0000000000191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129b95f33614372565b6129c38b8b61113b565b6129cc89611916565b6129d588610ec5565b6129de876124bc565b6129e786612e8d565b6129f085611d7b565b6129f984613753565b612a0383836122b9565b8015612a48575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a5e613bc7565b845f03612a7e5760405163b8cb621960e01b815260040160405180910390fd5b60da54612a9390879060ff1660036002613c01565b5f86815260d160205260409020612aaa8188613d9b565b60dd5f828254612aba9190615b10565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612b049190615b10565b871115612b1f5760208101518151612b1c9190615b10565b96505b6040805180820190915281518152602080830151908201525f90612b4f90612b47908a614f7e565b518490614fc4565b60d354612b5c9190615b10565b905060dd5460d45482612b6f9190615b10565b1115612b8d57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612cba575f612ba1611096565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bf58a600101548b5f01548a613fa2565b612bff8989613fcf565b612c0a8a8a8a613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa158015612c60573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c849190615d33565b9050612caf612c96611420428f615b5b565b612ca890670de0b6b3a7640000615b10565b8c90615008565b965050505050612cbe565b8692505b85831015612cdf57604051632c1b6b4160e21b815260040160405180910390fd5b612ce98484614003565b5f80612d35612d00612cfb878c615b5b565b614164565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614190565b9150915081846002015f828254612d4c9190615b10565b90915550612d5b9050816141dc565b612d65838a61501c565b5060208301518351175f03612db8575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612db1908c614e92565b9055612de8565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b60408051338152602081018b90529081018690526001600160a01b0380881691908916908c907fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c9060600160405180910390a4612e436139c1565b612e4c8a614208565b612e806001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614256565b5050505095945050505050565b5f612e978161393e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610f48565b5f612ed5613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612f0f866122af565b6040518463ffffffff1660e01b8152600401612f2d93929190615d4a565b5f6040518083038186803b158015612f43575f80fd5b505afa158015612f55573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561301757604051630149e46f60e01b81523360048201526001600160a01b03821690630149e46f906024015f604051808303815f87803b158015612faa575f80fd5b505af1158015612fbc573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b158015613000575f80fd5b505af1158015613012573d5f803e3d5ffd5b505050505b611d3e848461507a565b5f8061302b613bc7565b6123e4613037856132ba565b84614966565b613045613bc7565b6119f633848484614ac0565b60cb545f90801561100357610ffe611dd0610de3565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db5906130b990309086908990600401615d4a565b5f6040518083038186803b1580156130cf575f80fd5b505afa1580156130e1573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561314f57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613138575f80fd5b505af115801561314a573d5f803e3d5ffd5b505050505b61315a8585856150dd565b91506131646139c1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530846131a7886122af565b6040518463ffffffff1660e01b81526004016131c593929190615d4a565b5f6040518083038186803b1580156131db575f80fd5b505afa1580156131ed573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561325b57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613244575f80fd5b505af1158015613256573d5f803e3d5ffd5b505050505b61315a8585856151e7565b5f6132708161393e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f90801561100357610ffe816132d16137ab565b859190613896565b60cb545f90801561100357610ffe816132d1610de3565b6001600160a01b0381165f90815260cc6020526040812054610ebf90610fe0565b4284101561331d575f80fd5b5f6001613328611c57565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613430573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134665750876001600160a01b0316816001600160a01b0316145b61346e575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134df613bc7565b6134e7613bd6565b6134f18285614003565b60e3546001600160a01b0316801561355a57604051636c912dad60e01b81526001600160a01b038481166004830152821690636c912dad906024015f604051808303815f87803b158015613543575f80fd5b505af1158015613555573d5f803e3d5ffd5b505050505b6135656112b5613e55565b61356e856123b9565b91505f8560d45461357f9190615b10565b60d481905560dc549091506135b0906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b8160d3546135be9190615b10565b11156135dc57604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135ed9190615b10565b90915550506001600160a01b0384165f90815260d260205260408120600201805485929061361c908490615b10565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136746139c1565b604051637b9d893160e01b81523060048201526001600160a01b0385811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b1580156136da575f80fd5b505af11580156136ec573d5f803e3d5ffd5b506137269250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614256565b50509392505050565b5f828152606560205260409020600101546137498161393e565b6119f68383614557565b5f61375d8161393e565b60dc80546001600160801b03908116600160801b918516918202179091556040519081527fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90602001610f48565b60d45460dd5460da545f929190839061387890613871906137d990600160281b900463ffffffff1642615b5b565b60db546301e13380906001600160a01b0316637c21fb1d6137fa888a613fcf565b613807898b60d354613fe7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613846573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061386a9190615d33565b9190613896565b84906138b4565b90506138848184615b10565b935050505090565b5f610ebf826132d9565b8282028115158415858304851417166138ad575f80fd5b0492915050565b5f6110058383670de0b6b3a7640000613896565b60da545f9081906138e490610100900463ffffffff1642615b5b565b9050805f036138f4575f91505090565b60da5461393890829061392490613912906224ea009060ff16615b6e565b60dc546001600160801b0316906138b4565b61392e9084615b10565b60d5549190613896565b91505090565b611d7881336152fc565b5f6139516138c8565b90508060d55f8282546139649190615b5b565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a3e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a6d57505f919050565b680755bf798b4a1bf1e58212613a81575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156124ba575f80fd5b60e354600160a01b900460ff16156124ba5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613c0f6224ea0086615d90565b15613c1c57506001613c6f565b428511613c2b57506002613c6f565b613c3b60ff85166224ea00615b6e565b613c486224ea0042615d90565b613c529042615b5b565b613c5c9190615b10565b851115613c6b57506004613c6f565b5060035b826004811115613c8157613c81615da3565b816004811115613c9357613c93615da3565b14158015613cc35750816004811115613cae57613cae615da3565b816004811115613cc057613cc0615da3565b14155b15613d94575f826004811115613cdb57613cdb615da3565b03613d2f57806004811115613cf257613cf2615da3565b836004811115613d0457613d04615da3565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d4157613d41615da3565b836004811115613d5357613d53615da3565b836004811115613d6557613d65615da3565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d26565b5050505050565b60038201545f9042831115613def5760028401544260038601819055613dd890613dc6908490615b5b565b613dd08487615b5b565b839190613896565b9250613de48382615b5b565b600286015550613e12565b828103613dfe575f9150613e12565b600384018390556002840180545f90915591505b5092915050565b81545f9081613e288483615b10565b9050613e41613e3b838760010154615342565b82615357565b613e4b9082615b5b565b9455509192915050565b60d45460dd545f919082613e698284613fcf565b60da549091505f90613ebb9061112190613e9090600160281b900463ffffffff1642615b5b565b60db5460d3546301e13380916001600160a01b031690637c21fb1d908890613807908b908d90613fe7565b9050613ec78185615b10565b9350613ede60e254826138b490919063ffffffff16565b945084613eeb8285615b10565b613ef59190615b5b565b60dd5560d484905560da805468ffffffff00000000001916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611d785760e154613f89906001600160a01b0316613f848361388c565b614ce4565b8060dd5f828254613f9a9190615b10565b909155505050565b5f8115801590613fb157508383115b613fbb575f611d3e565b611d3e82613fc98686615b5b565b90615365565b5f825f03613fdd575f611005565b6110058284615365565b5f835f03613ff5575f611d3e565b611d3e84613fc98486615b10565b336001600160a01b03831614611ccf576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146119f65761404782611077565b6140519082615b5b565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f0361408f57506401000000008117610ebf565b63ffffffff83168083101561410d575f6224ea006140ad8584615b5b565b6140b79190615db7565b90506140c581610100615b5b565b85901c156140e65760405163293cc41f60e21b815260040160405180910390fd5b6140f1816020615b10565b602086901c901b94508484176401000000001792505050610ebf565b5f6224ea0061411c8386615b5b565b6141269190615db7565b905060df81111561414a5760405163293cc41f60e21b815260040160405180910390fd5b614155816020615b10565b6001901b851792505050610ebf565b5f8061417b60e254846138b490919063ffffffff16565b905061418681613f65565b6110058184615b5b565b5f8082156141c4576141bf6141ad6141a787615379565b85615357565b6141b79085615b5b565b859085613896565b6141c6565b5f5b90506141d28185615b5b565b9150935093915050565b805f036141e65750565b60e254156141f757611d7881613f65565b8060d55f828254613f9a9190615b10565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806111a6575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142f1576142cd8382615b5b565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614318908490615b5b565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615ed28339815191529061435f9087815260200190565b60405180910390a3506001949350505050565b61437c828261253c565b611ccf575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143b33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f61440386615379565b9050801561443f576144246144188683615357565b60408801519083613896565b925061443083856138b4565b915061443c8284615b5b565b92505b50935093915050565b815460018301545f919061445c8482615b10565b600186015561190d61446e8383615357565b6141a79084615b5b565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d94575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144ef9190615dca565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614561828261253c565b15611ccf575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145de5760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906145f68289613d9b565b90508060dd5f8282546146099190615b10565b90915550505f88815260d0602090815260408083206001600160a01b038916845282528083208151808301909252805480835260019091015492820183905290929161465f918b9161465a91615b10565b615357565b6040805180820190915283518152602080850151908201529091505f906146869083614f7e565b5160e3549091506001600160a01b031680156146f357604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b1580156146dc575f80fd5b505af11580156146ee573d5f803e3d5ffd5b505050505b8b42101561479b5787156147935760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147419186906143f7565b90925090506147508183615b10565b886002015f8282546147629190615b5b565b925050819055508060d55f82825461477a9190615b10565b9091555061478a90508286615b5b565b985050506147e2565b8296506147e2565b60d6546147b6906147ac8e42615b5b565b6138719190615b6e565b6147c09084615b10565b96506147cc8388615b5b565b60d55f8282546147dc9190615b10565b90915550505b8987111561480357604051632c1b6b4160e21b815260040160405180910390fd5b61480d8683614e6f565b60d35f82825461481d9190615b5b565b9091555061482d9050848461501c565b5060208401518451175f03614889575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d29092529091209081015461487e908e614e92565b6001909101556148b9565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a461490a8c614208565b50505050505095945050505050565b614921615397565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001613a1d565b60e3545f9081906001600160a01b031680156149d357604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b1580156149bc575f80fd5b505af11580156149ce573d5f803e3d5ffd5b505050505b6149de6112b5613e55565b6001600160a01b0384165f90815260d2602052604090206002810154614a048782615357565b9350614a0f84611dba565b9450845f03614a315760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a429190615b5b565b90915550614a5290508482615b5b565b82600201819055508360df5f828254614a6b9190615b5b565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614ae05760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b0385811660048301523060248301527f0000000000000000000000000000000000000000000000000000000000000000169063e16ee720906044015f6040518083038186803b158015614b45575f80fd5b505afa158015614b57573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bc557604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614bae575f80fd5b505af1158015614bc0573d5f803e3d5ffd5b505050505b5f614bcf83611077565b9050614bdb83826153a5565b614be5848261541e565b60408051848152602081018390526001600160a01b03808716929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c7591815260200190565b60405180910390a3614c856139c1565b6128446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614256565b614cc1611096565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d4d57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614d36575f80fd5b505af1158015614d48573d5f803e3d5ffd5b505050505b6119f68383615485565b614d5f613bc7565b614d67613bd6565b614d6f614cb9565b5f614d78613e55565b90505f614d83613948565b9050614d8f8482615b10565b60dd5f828254614d9f9190615b10565b90915550614dae905082613f65565b6111a66139c1565b614de07f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361253c565b158015614e145750614e127f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361253c565b155b156124ba57604051631d006fdb60e31b815260040160405180910390fd5b614e3a613bc7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861494e3390565b815460018301545f9190614e838483615b5b565b855561190d61446e8383615357565b5f821580614ea65750816401000000001783145b15614eb257505f610ebf565b63ffffffff8316808303614f2057602184901c60015b60018216158015614ed857508115155b15614ee957600191821c9101614ec8565b6020614ef58282615b10565b9690961c90951b9485614f0b6224ea0083615b6e565b614f159087615b10565b179350505050610ebf565b6224ea00614f2e8285615b5b565b614f389190615db7565b614f43906020615b10565b6001901b198416915050610ebf565b5f54610100900460ff166124ba575f80fd5b5f54610100900460ff16614f76575f80fd5b6124ba6154d4565b604080518082019091525f8082526020820152825160208401515f91614fa8916132d19082615b10565b8085529050614fb78184615b5b565b6020850152509192915050565b815460018301545f919082614fd98583615b5b565b9050614fe58184615357565b614fef8385615357565b614ff99190615b5b565b60019096015550929392505050565b5f61100583670de0b6b3a764000084613896565b604080518082019091525f8082526020820152602083015183515f9161504191615b10565b90505f61504e8483615b5b565b855190915061505f90829084613896565b80865261506c9082615b5b565b602086015250929392505050565b335f90815260cc602052604081208054839190839061509a908490615b5b565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615ed2833981519152906110669086815260200190565b5f6150e784611077565b9050336001600160a01b03831614615154576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151525761512e8282615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61515e84826153a5565b615168828261541e565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614256565b5f336001600160a01b03831614615253576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146152515761522d8582615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61525c846122af565b9050805f03615269575f80fd5b61527381856153a5565b61527d828561541e565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614256565b615306828261253c565b611ccf57615313816154f2565b61531e836020615504565b60405160200161532f929190615e53565b6040516020818303038152906040525f80fd5b5f8183116153505781611005565b5090919050565b5f8183106153505781611005565b5f61100583670de0b6b3a764000084613a27565b805160208201515f919061538d8282615357565b611d3e9083615b5b565b60975460ff166124ba575f80fd5b6153ad613bc7565b6153b5614cb9565b6153c06112b5613e55565b5f6153c9613948565b90505f838260dd546153db9190615b10565b6153e59190615b5b565b90508060d45460d3546153f89190615b10565b111561541657604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc602052604081208054839290615445908490615b5b565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615ed2833981519152906020015b60405180910390a35050565b8060cb5f8282546154969190615b10565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615ed28339815191529101615479565b5f54610100900460ff166154e6575f80fd5b6097805460ff19169055565b6060610ebf6001600160a01b03831660145b60605f615512836002615b6e565b61551d906002615b10565b67ffffffffffffffff81111561553557615535615be1565b6040519080825280601f01601f19166020018201604052801561555f576020820181803683370190505b509050600360fc1b815f8151811061557957615579615ea8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106155a7576155a7615ea8565b60200101906001600160f81b03191690815f1a9053505f6155c9846002615b6e565b6155d4906001615b10565b90505b600181111561564b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061560857615608615ea8565b1a60f81b82828151811061561e5761561e615ea8565b60200101906001600160f81b03191690815f1a90535060049490941c9361564481615ebc565b90506155d7565b508315611005575f80fd5b6001600160a01b0381168114611d78575f80fd5b5f6020828403121561567a575f80fd5b813561100581615656565b5f60208284031215615695575f80fd5b81356001600160e01b031981168114611005575f80fd5b80356001600160801b03811681146156c2575f80fd5b919050565b5f602082840312156156d7575f80fd5b611005826156ac565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615725575f80fd5b5035919050565b5f806040838503121561573d575f80fd5b823561574881615656565b946020939093013593505050565b5f8083601f840112615766575f80fd5b50813567ffffffffffffffff81111561577d575f80fd5b602083019150836020828501011115612426575f80fd5b5f80602083850312156157a5575f80fd5b823567ffffffffffffffff8111156157bb575f80fd5b6157c785828601615756565b90969095509350505050565b5f805f805f60a086880312156157e7575f80fd5b853594506020860135935060408601359250606086013561580781615656565b9150608086013561581781615656565b809150509295509295909350565b5f805f60608486031215615837575f80fd5b833561584281615656565b9250602084013561585281615656565b929592945050506040919091013590565b803560ff811681146156c2575f80fd5b5f60208284031215615883575f80fd5b61100582615863565b5f806040838503121561589d575f80fd5b8235915060208301356158af81615656565b809150509250929050565b5f805f80608085870312156158cd575f80fd5b84359350602085013592506040850135915060608501356158ed81615656565b939692955090935050565b5f805f6060848603121561590a575f80fd5b833561591581615656565b925060208401359150604084013561592c81615656565b809150509250925092565b5f8060408385031215615948575f80fd5b50508035926020909101359150565b5f60208284031215615967575f80fd5b81358015158114611005575f80fd5b5f805f805f805f805f806101208b8d031215615990575f80fd5b8a3567ffffffffffffffff8111156159a6575f80fd5b6159b28d828e01615756565b909b5099506159c5905060208c01615863565b97506159d360408c016156ac565b965060608b01356159e381615656565b955060808b0135945060a08b013593506159ff60c08c016156ac565b925060e08b013591506101008b013590509295989b9194979a5092959850565b5f805f60608486031215615a31575f80fd5b833592506020840135615a4381615656565b9150604084013561592c81615656565b5f805f805f805f60e0888a031215615a69575f80fd5b8735615a7481615656565b96506020880135615a8481615656565b95506040880135945060608801359350615aa060808901615863565b925060a0880135915060c0880135905092959891949750929550565b5f8060408385031215615acd575f80fd5b8235615ad881615656565b915060208301356158af81615656565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ebf57610ebf615afc565b600181811c90821680615b3757607f821691505b602082108103615b5557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610ebf57610ebf615afc565b8082028115828204841417610ebf57610ebf615afc565b5f600160ff1b8201615b9957615b99615afc565b505f0390565b8181035f831280158383131683831282161715613e1257613e12615afc565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156119f657805f5260205f20601f840160051c81016020851015615c1a5750805b601f840160051c820191505b81811015613d94575f8155600101615c26565b815167ffffffffffffffff811115615c5357615c53615be1565b615c6781615c618454615b23565b84615bf5565b602080601f831160018114615c9a575f8415615c835750858301515b5f19600386901b1c1916600185901b178555612844565b5f85815260208120601f198616915b82811015615cc857888601518255948401946001909101908401615ca9565b5085821015615ce557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b03828116828216039080821115613e1257613e12615afc565b5f60208284031215615d43575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215615d7f575f80fd5b505080516020909101519092909150565b5f82615d9e57615d9e615ae8565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615dc557615dc5615ae8565b500490565b5f808354615dd781615b23565b60018281168015615def5760018114615e0457615e30565b60ff1984168752821515830287019450615e30565b875f526020805f205f5b85811015615e275781548a820152908401908201615e0e565b50505082870194505b50929695505050505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f615e846017830185615e3c565b7001034b99036b4b9b9b4b733903937b6329607d1b815261190d6011820185615e3c565b634e487b7160e01b5f52603260045260245ffd5b5f81615eca57615eca615afc565b505f19019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204485d3d9d92eeb57ec453d55009460985e73455784e22d97a9959ce3f189d91364736f6c63430008190033", - "devdoc": { - "events": { - "AccumulatorAccrual(uint256)": { - "params": { - "timestamp": "current timestamp." - } - }, - "BackupFeeRateSet(uint256)": { - "params": { - "backupFeeRate": "rate charged to the fixed pools to be accrued by the floating depositors." - } - }, - "Borrow(address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets that were borrowed.", - "borrower": "address which will be repaying the borrowed assets.", - "caller": "address which borrowed the asset.", - "receiver": "address that received the borrowed assets.", - "shares": "amount of borrow shares assigned to the account." - } - }, - "BorrowAtMaturity(uint256,address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of the asset that were borrowed.", - "borrower": "address which will be repaying the borrowed assets.", - "caller": "address which borrowed the asset.", - "fee": "extra amount that will need to be paid at maturity.", - "maturity": "maturity in which the account will have to repay the loan.", - "receiver": "address that received the borrowed assets." - } - }, - "DampSpeedSet(uint256,uint256)": { - "params": { - "dampSpeedDown": "represented with 18 decimals.", - "dampSpeedUp": "represented with 18 decimals." - } - }, - "DepositAtMaturity(uint256,address,address,uint256,uint256)": { - "params": { - "assets": "amount of the asset that were deposited.", - "caller": "address which deposited the assets.", - "fee": "is the extra amount that it will be collected at maturity.", - "maturity": "maturity at which the account will be able to collect his deposit + his fee.", - "owner": "address that will be able to withdraw the deposited assets." - } - }, - "EarningsAccumulatorSmoothFactorSet(uint256)": { - "params": { - "earningsAccumulatorSmoothFactor": "factor represented with 18 decimals." - } - }, - "FixedEarningsUpdate(uint256,uint256,uint256)": { - "params": { - "maturity": "maturity date where the earnings were updated.", - "timestamp": "current timestamp.", - "unassignedEarnings": "pending unassigned earnings." - } - }, - "FloatingDebtUpdate(uint256,uint256)": { - "params": { - "timestamp": "current timestamp.", - "utilization": "new floating utilization." - } - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "InterestRateModelSet(address)": { - "params": { - "interestRateModel": "new interest rate model to be used to calculate rates." - } - }, - "Liquidate(address,address,uint256,uint256,address,uint256)": { - "params": { - "assets": "amount of the asset that were repaid.", - "borrower": "address which had the original debt.", - "lendersAssets": "incentive paid to lenders.", - "receiver": "address which repaid the previously borrowed amount.", - "seizeMarket": "address of the asset that were seized by the liquidator.", - "seizedAssets": "amount seized of the collateral." - } - }, - "MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)": { - "params": { - "earningsAccumulator": "earnings accumulator.", - "floatingAssets": "total floating supply assets.", - "floatingBorrowShares": "total floating borrow shares.", - "floatingDebt": "total floating borrow assets.", - "floatingDepositShares": "total floating supply shares.", - "timestamp": "current timestamp." - } - }, - "MaxFuturePoolsSet(uint256)": { - "params": { - "maxFuturePools": "represented with 0 decimals." - } - }, - "Paused(address)": { - "details": "Emitted when the pause is triggered by `account`." - }, - "PenaltyRateSet(uint256)": { - "params": { - "penaltyRate": "penaltyRate percentage per second represented with 18 decimals." - } - }, - "Repay(address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets that was repaid.", - "borrower": "address which had the original debt.", - "caller": "address which repaid the previously borrowed amount.", - "shares": "amount of borrow shares that were subtracted from the account's accountability." - } - }, - "RepayAtMaturity(uint256,address,address,uint256,uint256)": { - "params": { - "assets": "amount that was repaid.", - "borrower": "address which had the original debt.", - "caller": "address which repaid the previously borrowed amount.", - "maturity": "maturity where the account repaid its borrowed amounts.", - "positionAssets": "amount of the debt that was covered in this repayment (penalties could have been repaid)." - } - }, - "ReserveFactorSet(uint256)": { - "params": { - "reserveFactor": "reserveFactor percentage." - } - }, - "RewardsControllerSet(address)": { - "params": { - "rewardsController": "new rewards controller to update account rewards when operating with the Market." - } - }, - "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`)" - }, - "Seize(address,address,uint256)": { - "params": { - "assets": "amount seized of the collateral.", - "borrower": "address which had the original debt.", - "liquidator": "address which seized this collateral." - } - }, - "SpreadBadDebt(address,uint256)": { - "params": { - "assets": "amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.", - "borrower": "address which was cleared from bad debt." - } - }, - "TreasurySet(address,uint256)": { - "params": { - "treasury": "address of the treasury that will receive the minted eTokens.", - "treasuryFeeRate": "represented with 18 decimals." - } - }, - "Unpaused(address)": { - "details": "Emitted when the pause is lifted by `account`." - }, - "WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets withdrawn (can include a discount for early withdraw).", - "caller": "address which withdraw the asset.", - "maturity": "maturity where the account withdraw its deposits.", - "owner": "address which had the assets withdrawn.", - "positionAssets": "position size reduced.", - "receiver": "address which will be collecting the assets." - } - } - }, - "kind": "dev", - "methods": { - "accountSnapshot(address)": { - "params": { - "account": "account to return status snapshot in the specified maturity date." - }, - "returns": { - "_0": "the amount deposited to the floating pool and the amount owed to floating and fixed pools." - } - }, - "borrow(uint256,address,address)": { - "params": { - "assets": "amount to be sent to receiver and repaid by borrower.", - "borrower": "address that will repay the borrowed assets.", - "receiver": "address that will receive the borrowed assets." - }, - "returns": { - "borrowShares": "shares corresponding to the borrowed assets." - } - }, - "borrowAtMaturity(uint256,uint256,uint256,address,address)": { - "params": { - "assets": "amount to be sent to receiver and repaid by borrower.", - "borrower": "address that will repay the borrowed assets.", - "maturity": "maturity date for repayment.", - "maxAssets": "maximum amount of debt that the account is willing to accept.", - "receiver": "address that will receive the borrowed assets." - }, - "returns": { - "assetsOwed": "total amount of assets (principal + fee) to be repaid at maturity." - } - }, - "clearBadDebt(address)": { - "details": "Can only be called from the auditor.", - "params": { - "borrower": "account with insufficient collateral to be cleared the debt." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "depositAtMaturity(uint256,uint256,uint256,address)": { - "params": { - "assets": "amount to receive from the msg.sender.", - "maturity": "maturity date where the assets will be deposited.", - "minAssetsRequired": "minimum amount of assets required by the depositor for the transaction to be accepted.", - "receiver": "address that will be able to withdraw the deposited assets." - }, - "returns": { - "positionAssets": "total amount of assets (principal + fee) to be withdrawn at maturity." - } - }, - "fixedPoolBalance(uint256)": { - "params": { - "maturity": "maturity date of the fixed pool." - }, - "returns": { - "_0": "borrowed and supplied amount of the fixed pool." - } - }, - "fixedPoolBorrowed(uint256)": { - "params": { - "maturity": "maturity date of the fixed pool." - }, - "returns": { - "_0": "borrowed amount of the fixed pool." - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)": { - "details": "can only be called once." - }, - "liquidate(address,uint256,address)": { - "details": "Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.", - "params": { - "borrower": "account that has an outstanding debt across floating or fixed pools.", - "maxAssets": "maximum amount of debt that the liquidator is willing to accept. (it can be less)", - "seizeMarket": "market from which the collateral will be seized to give to the liquidator." - }, - "returns": { - "repaidAssets": "actual amount repaid." - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "previewBorrow(uint256)": { - "params": { - "assets": "amount of assets to borrow." - }, - "returns": { - "_0": "amount of shares that will be asigned to the account after the borrow." - } - }, - "previewDebt(address)": { - "params": { - "borrower": "account to return status snapshot for fixed and floating borrows." - }, - "returns": { - "debt": "the total debt, denominated in number of assets." - } - }, - "previewFloatingAssetsAverage()": { - "returns": { - "_0": "projected `floatingAssetsAverage`." - } - }, - "previewRefund(uint256)": { - "params": { - "shares": "amount of shares to subtract from caller's accountability." - }, - "returns": { - "_0": "amount of assets that will be repaid." - } - }, - "previewRepay(uint256)": { - "params": { - "assets": "amount of assets to repay." - }, - "returns": { - "_0": "amount of shares that will be subtracted from the account after the repay." - } - }, - "redeem(uint256,address,address)": { - "details": "Makes sure that the owner doesn't have shortfall after withdrawing.", - "params": { - "owner": "address which owns the floating pool assets.", - "receiver": "address to which the assets will be transferred.", - "shares": "amount of shares to be redeemed for underlying asset." - }, - "returns": { - "assets": "amount of underlying asset that was withdrawn." - } - }, - "refund(uint256,address)": { - "params": { - "borrowShares": "shares to be subtracted from the borrower's accountability.", - "borrower": "address of the account that has the debt." - }, - "returns": { - "actualShares": "actual subtracted shares from the borrower's accountability.", - "assets": "subtracted assets from the borrower's accountability." - } - }, - "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." - }, - "repay(uint256,address)": { - "params": { - "assets": "assets to be subtracted from the borrower's accountability.", - "borrower": "address of the account that has the debt." - }, - "returns": { - "actualRepay": "the actual amount that should be transferred into the protocol.", - "borrowShares": "subtracted shares from the borrower's accountability." - } - }, - "repayAtMaturity(uint256,uint256,uint256,address)": { - "params": { - "borrower": "address of the account that has the debt.", - "maturity": "maturity date where the assets will be repaid.", - "maxAssets": "maximum amount of debt that the account is willing to accept to be repaid.", - "positionAssets": "amount to be paid for the borrower's debt." - }, - "returns": { - "actualRepayAssets": "the actual amount that was transferred into the protocol." - } - }, - "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." - }, - "seize(address,address,uint256)": { - "details": "Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).", - "params": { - "assets": "amount to be removed from borrower's possession.", - "borrower": "address from which the assets will be seized.", - "liquidator": "address which will receive the seized assets." - } - }, - "setAssetSymbol(string)": { - "params": { - "assetSymbol": "the symbol for the underlying asset." - } - }, - "setBackupFeeRate(uint256)": { - "params": { - "backupFeeRate_": "percentage amount represented with 18 decimals." - } - }, - "setDampSpeed(uint256,uint256)": { - "params": { - "down": "damp speed down, represented with 18 decimals.", - "up": "damp speed up, represented with 18 decimals." - } - }, - "setEarningsAccumulatorSmoothFactor(uint128)": { - "params": { - "earningsAccumulatorSmoothFactor_": "represented with 18 decimals." - } - }, - "setInterestRateModel(address)": { - "params": { - "interestRateModel_": "new interest rate model." - } - }, - "setMaxFuturePools(uint8)": { - "details": "If value is decreased, VALID maturities will become NOT_READY.", - "params": { - "futurePools": "number of pools to be active at the same time." - } - }, - "setPenaltyRate(uint256)": { - "params": { - "penaltyRate_": "percentage represented with 18 decimals." - } - }, - "setReserveFactor(uint128)": { - "params": { - "reserveFactor_": "parameter represented with 18 decimals." - } - }, - "setRewardsController(address)": { - "params": { - "rewardsController_": "new rewards controller." - } - }, - "setTreasury(address,uint256)": { - "params": { - "treasuryFeeRate_": "represented with 18 decimals.", - "treasury_": "address of the treasury that will receive the minted eTokens." - } - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "totalAssets()": { - "returns": { - "_0": "actual floatingAssets plus earnings to be accrued at current timestamp." - } - }, - "totalFloatingBorrowAssets()": { - "returns": { - "_0": "actual floating debt plus projected interest." - } - }, - "transfer(address,uint256)": { - "details": "Makes sure that the caller doesn't have shortfall after transferring.", - "params": { - "shares": "amount of shares to be transferred.", - "to": "address to which the assets will be transferred." - } - }, - "transferFrom(address,address,uint256)": { - "details": "Makes sure that `from` address doesn't have shortfall after transferring.", - "params": { - "from": "address from which the assets will be transferred.", - "shares": "amount of shares to be transferred.", - "to": "address to which the assets will be transferred." - } - }, - "withdraw(uint256,address,address)": { - "details": "Makes sure that the owner doesn't have shortfall after withdrawing.", - "params": { - "assets": "amount of underlying to be withdrawn.", - "owner": "address which owns the floating pool assets.", - "receiver": "address to which the assets will be transferred." - }, - "returns": { - "shares": "amount of shares redeemed for underlying asset." - } - }, - "withdrawAtMaturity(uint256,uint256,uint256,address,address)": { - "params": { - "maturity": "maturity date where the assets will be withdrawn.", - "minAssetsRequired": "minimum amount required by the account (if discount included for early withdrawal).", - "owner": "address that previously deposited the assets.", - "positionAssets": "position size to be reduced.", - "receiver": "address that will receive the withdrawn assets." - }, - "returns": { - "assetsDiscounted": "amount of assets withdrawn (can include a discount for early withdraw)." - } - } - }, - "stateVariables": { - "__gap": { - "custom:oz-renamed-from": "floatingUtilization", - "details": "gap from deprecated state." - }, - "auditor": { - "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" - } - }, - "version": 1 - }, - "userdoc": { - "events": { - "AccumulatorAccrual(uint256)": { - "notice": "Emitted when accumulator distributes earnings." - }, - "BackupFeeRateSet(uint256)": { - "notice": "Emitted when the backupFeeRate parameter is changed by admin." - }, - "Borrow(address,address,address,uint256,uint256)": { - "notice": "Event emitted when an account borrows amount of assets from a floating pool." - }, - "BorrowAtMaturity(uint256,address,address,address,uint256,uint256)": { - "notice": "Emitted when an account borrows amount of an asset from a certain maturity date." - }, - "DampSpeedSet(uint256,uint256)": { - "notice": "Emitted when the damp speeds are changed by admin." - }, - "DepositAtMaturity(uint256,address,address,uint256,uint256)": { - "notice": "Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period." - }, - "EarningsAccumulatorSmoothFactorSet(uint256)": { - "notice": "Emitted when the earningsAccumulatorSmoothFactor is changed by admin." - }, - "FixedEarningsUpdate(uint256,uint256,uint256)": { - "notice": "Emitted when the earnings of a maturity are updated." - }, - "FloatingDebtUpdate(uint256,uint256)": { - "notice": "Emitted when the floating debt is updated." - }, - "Frozen(address,bool)": { - "notice": "Emitted when `account` sets the `isFrozen` flag." - }, - "InterestRateModelSet(address)": { - "notice": "Emitted when the interestRateModel is changed by admin." - }, - "Liquidate(address,address,uint256,uint256,address,uint256)": { - "notice": "Emitted when an account's position had a liquidation." - }, - "MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)": { - "notice": "Emitted when market state is updated." - }, - "MaxFuturePoolsSet(uint256)": { - "notice": "Emitted when the maxFuturePools is changed by admin." - }, - "PenaltyRateSet(uint256)": { - "notice": "Emitted when the penaltyRate is changed by admin." - }, - "Repay(address,address,uint256,uint256)": { - "notice": "Emitted when an account repays amount of assets to a floating pool." - }, - "RepayAtMaturity(uint256,address,address,uint256,uint256)": { - "notice": "Emitted when an account repays its borrows after maturity." - }, - "ReserveFactorSet(uint256)": { - "notice": "Emitted when the reserveFactor is changed by admin." - }, - "RewardsControllerSet(address)": { - "notice": "Emitted when the rewardsController is changed by admin." - }, - "Seize(address,address,uint256)": { - "notice": "Emitted when an account's collateral has been seized." - }, - "SpreadBadDebt(address,uint256)": { - "notice": "Emitted when an account is cleared from bad debt." - }, - "TreasurySet(address,uint256)": { - "notice": "Emitted when the treasury variables are changed by admin." - }, - "WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)": { - "notice": "Emitted when an account withdraws from a fixed rate pool." - } - }, - "kind": "user", - "methods": { - "accountSnapshot(address)": { - "notice": "Gets current snapshot for an account across all maturities." - }, - "accounts(address)": { - "notice": "Tracks fixed deposit and borrow map and floating borrow shares of an account." - }, - "backupFeeRate()": { - "notice": "Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity." - }, - "borrow(uint256,address,address)": { - "notice": "Borrows a certain amount from the floating pool." - }, - "borrowAtMaturity(uint256,uint256,uint256,address,address)": { - "notice": "Borrows a certain amount from a maturity." - }, - "clearBadDebt(address)": { - "notice": "Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`." - }, - "dampSpeedDown()": { - "notice": "Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower." - }, - "dampSpeedUp()": { - "notice": "Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher." - }, - "depositAtMaturity(uint256,uint256,uint256,address)": { - "notice": "Deposits a certain amount to a maturity." - }, - "earningsAccumulator()": { - "notice": "Accumulated earnings from extraordinary sources to be gradually distributed." - }, - "earningsAccumulatorSmoothFactor()": { - "notice": "Factor used for gradual accrual of earnings to the floating pool." - }, - "fixedBorrowPositions(uint256,address)": { - "notice": "Tracks account's fixed borrow positions by maturity, account and position." - }, - "fixedDepositPositions(uint256,address)": { - "notice": "Tracks account's fixed deposit positions by maturity, account and position." - }, - "fixedPoolBalance(uint256)": { - "notice": "Retrieves a fixed pool's borrowed and supplied amount." - }, - "fixedPoolBorrowed(uint256)": { - "notice": "Retrieves a fixed pool's borrowed amount." - }, - "fixedPools(uint256)": { - "notice": "Tracks fixed pools state by maturity." - }, - "floatingAssets()": { - "notice": "Amount of floating assets deposited to the pool." - }, - "floatingAssetsAverage()": { - "notice": "Average of the floating assets to get fixed borrow rates and prevent rate manipulation." - }, - "floatingBackupBorrowed()": { - "notice": "Amount of assets lent by the floating pool to the fixed pools." - }, - "floatingDebt()": { - "notice": "Amount of assets lent by the floating pool to accounts." - }, - "initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)": { - "notice": "Initializes the contract." - }, - "interestRateModel()": { - "notice": "Interest rate model contract used to get the borrow rates." - }, - "isFrozen()": { - "notice": "Flag to prevent new borrows and deposits." - }, - "lastAccumulatorAccrual()": { - "notice": "Last time the accumulator distributed earnings." - }, - "lastAverageUpdate()": { - "notice": "Last time the floating assets average was updated." - }, - "lastFloatingDebtUpdate()": { - "notice": "Last time the floating debt was updated." - }, - "liquidate(address,uint256,address)": { - "notice": "Liquidates undercollateralized fixed/floating (or both) position(s)." - }, - "maxFuturePools()": { - "notice": "Number of fixed pools to be active at the same time." - }, - "pause()": { - "notice": "Sets the pause state to true in case of emergency, triggered by an authorized account." - }, - "penaltyRate()": { - "notice": "Rate per second to be charged to delayed fixed pools borrowers after maturity." - }, - "previewBorrow(uint256)": { - "notice": "Simulates the effects of a borrow at the current time, given current contract conditions." - }, - "previewDebt(address)": { - "notice": "Gets all borrows and penalties for an account." - }, - "previewFloatingAssetsAverage()": { - "notice": "Returns the current `floatingAssetsAverage` without updating the storage variable." - }, - "previewRefund(uint256)": { - "notice": "Simulates the effects of a refund at the current time, given current contract conditions." - }, - "previewRepay(uint256)": { - "notice": "Simulates the effects of a repay at the current time, given current contract conditions." - }, - "redeem(uint256,address,address)": { - "notice": "Redeems the owner's floating pool assets to the receiver address." - }, - "refund(uint256,address)": { - "notice": "Repays a certain amount of shares to the floating pool." - }, - "repay(uint256,address)": { - "notice": "Repays a certain amount of assets to the floating pool." - }, - "repayAtMaturity(uint256,uint256,uint256,address)": { - "notice": "Repays a certain amount to a maturity." - }, - "reserveFactor()": { - "notice": "Percentage factor that represents the liquidity reserves that can't be borrowed." - }, - "rewardsController()": { - "notice": "Address of the rewards controller that will accrue rewards for accounts operating with the Market." - }, - "seize(address,address,uint256)": { - "notice": "Public function to seize a certain amount of assets." - }, - "setAssetSymbol(string)": { - "notice": "Sets name and symbol for the Market." - }, - "setBackupFeeRate(uint256)": { - "notice": "Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity." - }, - "setDampSpeed(uint256,uint256)": { - "notice": "Sets the damp speed used to update the floatingAssetsAverage." - }, - "setEarningsAccumulatorSmoothFactor(uint128)": { - "notice": "Sets the factor used when smoothly accruing earnings to the floating pool." - }, - "setFrozen(bool)": { - "notice": "Sets `isFrozen` state, triggered by an authorized account." - }, - "setInterestRateModel(address)": { - "notice": "Sets the interest rate model to be used to calculate rates." - }, - "setMaxFuturePools(uint8)": { - "notice": "Sets the protocol's max future pools for fixed borrowing and lending." - }, - "setPenaltyRate(uint256)": { - "notice": "Sets the penalty rate per second." - }, - "setReserveFactor(uint128)": { - "notice": "Sets the percentage that represents the liquidity reserves that can't be borrowed." - }, - "setRewardsController(address)": { - "notice": "Sets the rewards controller to update account rewards when operating with the Market." - }, - "setTreasury(address,uint256)": { - "notice": "Sets the treasury variables." - }, - "totalAssets()": { - "notice": "Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator." - }, - "totalFloatingBorrowAssets()": { - "notice": "Calculates the total floating debt, considering elapsed time since last update and current interest rate." - }, - "totalFloatingBorrowShares()": { - "notice": "Total amount of floating borrow shares assigned to floating borrow accounts." - }, - "transfer(address,uint256)": { - "notice": "Moves amount of shares from the caller's account to `to`." - }, - "transferFrom(address,address,uint256)": { - "notice": "Moves amount of shares from `from` to `to` using the allowance mechanism." - }, - "treasury()": { - "notice": "Address of the treasury that will receive the allocated earnings." - }, - "treasuryFeeRate()": { - "notice": "Rate to be charged by the treasury to floating and fixed borrows." - }, - "unpause()": { - "notice": "Sets the pause state to false when threat is gone, triggered by an authorized account." - }, - "withdraw(uint256,address,address)": { - "notice": "Withdraws the owner's floating pool assets to the receiver address." - }, - "withdrawAtMaturity(uint256,uint256,uint256,address,address)": { - "notice": "Withdraws a certain amount from a maturity." - } - }, - "version": 1 - }, + "numDeployments": 8, + "solcInputHash": "6e57950826dfd6055f8dc377807ae48e", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"contract Auditor\",\"name\":\"auditor_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Disagreement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientProtocolLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketFrozen\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaturityOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAuditor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPausingRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SelfLiquidation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolState\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"alternativeState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolStates\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBorrow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRepay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWithdraw\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AccumulatorAccrual\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"backupFeeRate\",\"type\":\"uint256\"}],\"name\":\"BackupFeeRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"BorrowAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedUp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedDown\",\"type\":\"uint256\"}],\"name\":\"DampSpeedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"DepositAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulatorSmoothFactor\",\"type\":\"uint256\"}],\"name\":\"EarningsAccumulatorSmoothFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"}],\"name\":\"FixedEarningsUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilization\",\"type\":\"uint256\"}],\"name\":\"FloatingDebtUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isFrozen\",\"type\":\"bool\"}],\"name\":\"Frozen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel\",\"type\":\"address\"}],\"name\":\"InterestRateModelSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lendersAssets\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizedAssets\",\"type\":\"uint256\"}],\"name\":\"Liquidate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDepositShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDebt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulator\",\"type\":\"uint256\"}],\"name\":\"MarketUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxFuturePools\",\"type\":\"uint256\"}],\"name\":\"MaxFuturePoolsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyRate\",\"type\":\"uint256\"}],\"name\":\"PenaltyRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Repay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"name\":\"RepayAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveFactor\",\"type\":\"uint256\"}],\"name\":\"ReserveFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController\",\"type\":\"address\"}],\"name\":\"RewardsControllerSet\",\"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\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"SpreadBadDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate\",\"type\":\"uint256\"}],\"name\":\"TreasurySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"WithdrawAtMaturity\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EMERGENCY_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"accountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fixedDeposits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fixedBorrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auditor\",\"outputs\":[{\"internalType\":\"contract Auditor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"backupFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrowAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsOwed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"clearBadDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"depositAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulatorSmoothFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedBorrowPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedDepositPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"fixedPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplied\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastAccrual\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingBackupBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"maxFuturePools_\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedUp_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedDown_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAccumulatorAccrual\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAverageUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFloatingDebtUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxFuturePools\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"previewDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"debt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewFloatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRefund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewRepay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repayAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepayAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsController\",\"outputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"}],\"name\":\"setAssetSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setBackupFeeRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"up\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"down\",\"type\":\"uint256\"}],\"name\":\"setDampSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"}],\"name\":\"setEarningsAccumulatorSmoothFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isFrozen_\",\"type\":\"bool\"}],\"name\":\"setFrozen\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"futurePools\",\"type\":\"uint8\"}],\"name\":\"setMaxFuturePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"}],\"name\":\"setReserveFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController_\",\"type\":\"address\"}],\"name\":\"setRewardsController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setTreasury\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasuryFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsDiscounted\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\"}},\"BackupFeeRateSet(uint256)\":{\"params\":{\"backupFeeRate\":\"rate charged to the fixed pools to be accrued by the floating depositors.\"}},\"Borrow(address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"receiver\":\"address that received the borrowed assets.\",\"shares\":\"amount of borrow shares assigned to the account.\"}},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"fee\":\"extra amount that will need to be paid at maturity.\",\"maturity\":\"maturity in which the account will have to repay the loan.\",\"receiver\":\"address that received the borrowed assets.\"}},\"DampSpeedSet(uint256,uint256)\":{\"params\":{\"dampSpeedDown\":\"represented with 18 decimals.\",\"dampSpeedUp\":\"represented with 18 decimals.\"}},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were deposited.\",\"caller\":\"address which deposited the assets.\",\"fee\":\"is the extra amount that it will be collected at maturity.\",\"maturity\":\"maturity at which the account will be able to collect his deposit + his fee.\",\"owner\":\"address that will be able to withdraw the deposited assets.\"}},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"params\":{\"earningsAccumulatorSmoothFactor\":\"factor represented with 18 decimals.\"}},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"params\":{\"maturity\":\"maturity date where the earnings were updated.\",\"timestamp\":\"current timestamp.\",\"unassignedEarnings\":\"pending unassigned earnings.\"}},\"FloatingDebtUpdate(uint256,uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\",\"utilization\":\"new floating utilization.\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InterestRateModelSet(address)\":{\"params\":{\"interestRateModel\":\"new interest rate model to be used to calculate rates.\"}},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were repaid.\",\"borrower\":\"address which had the original debt.\",\"lendersAssets\":\"incentive paid to lenders.\",\"receiver\":\"address which repaid the previously borrowed amount.\",\"seizeMarket\":\"address of the asset that were seized by the liquidator.\",\"seizedAssets\":\"amount seized of the collateral.\"}},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"earningsAccumulator\":\"earnings accumulator.\",\"floatingAssets\":\"total floating supply assets.\",\"floatingBorrowShares\":\"total floating borrow shares.\",\"floatingDebt\":\"total floating borrow assets.\",\"floatingDepositShares\":\"total floating supply shares.\",\"timestamp\":\"current timestamp.\"}},\"MaxFuturePoolsSet(uint256)\":{\"params\":{\"maxFuturePools\":\"represented with 0 decimals.\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PenaltyRateSet(uint256)\":{\"params\":{\"penaltyRate\":\"penaltyRate percentage per second represented with 18 decimals.\"}},\"Repay(address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"shares\":\"amount of borrow shares that were subtracted from the account's accountability.\"}},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"maturity\":\"maturity where the account repaid its borrowed amounts.\",\"positionAssets\":\"amount of the debt that was covered in this repayment (penalties could have been repaid).\"}},\"ReserveFactorSet(uint256)\":{\"params\":{\"reserveFactor\":\"reserveFactor percentage.\"}},\"RewardsControllerSet(address)\":{\"params\":{\"rewardsController\":\"new rewards controller to update account rewards when operating with the Market.\"}},\"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`)\"},\"Seize(address,address,uint256)\":{\"params\":{\"assets\":\"amount seized of the collateral.\",\"borrower\":\"address which had the original debt.\",\"liquidator\":\"address which seized this collateral.\"}},\"SpreadBadDebt(address,uint256)\":{\"params\":{\"assets\":\"amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\",\"borrower\":\"address which was cleared from bad debt.\"}},\"TreasurySet(address,uint256)\":{\"params\":{\"treasury\":\"address of the treasury that will receive the minted eTokens.\",\"treasuryFeeRate\":\"represented with 18 decimals.\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets withdrawn (can include a discount for early withdraw).\",\"caller\":\"address which withdraw the asset.\",\"maturity\":\"maturity where the account withdraw its deposits.\",\"owner\":\"address which had the assets withdrawn.\",\"positionAssets\":\"position size reduced.\",\"receiver\":\"address which will be collecting the assets.\"}}},\"kind\":\"dev\",\"methods\":{\"accountSnapshot(address)\":{\"params\":{\"account\":\"account to return status snapshot in the specified maturity date.\"},\"returns\":{\"_0\":\"the amount deposited to the floating pool and the amount owed to floating and fixed pools.\"}},\"borrow(uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"borrowShares\":\"shares corresponding to the borrowed assets.\"}},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"maturity\":\"maturity date for repayment.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"assetsOwed\":\"total amount of assets (principal + fee) to be repaid at maturity.\"}},\"clearBadDebt(address)\":{\"details\":\"Can only be called from the auditor.\",\"params\":{\"borrower\":\"account with insufficient collateral to be cleared the debt.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"assets\":\"amount to receive from the msg.sender.\",\"maturity\":\"maturity date where the assets will be deposited.\",\"minAssetsRequired\":\"minimum amount of assets required by the depositor for the transaction to be accepted.\",\"receiver\":\"address that will be able to withdraw the deposited assets.\"},\"returns\":{\"positionAssets\":\"total amount of assets (principal + fee) to be withdrawn at maturity.\"}},\"fixedPoolBalance(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed and supplied amount of the fixed pool.\"}},\"fixedPoolBorrowed(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed amount of the fixed pool.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"details\":\"can only be called once.\"},\"liquidate(address,uint256,address)\":{\"details\":\"Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.\",\"params\":{\"borrower\":\"account that has an outstanding debt across floating or fixed pools.\",\"maxAssets\":\"maximum amount of debt that the liquidator is willing to accept. (it can be less)\",\"seizeMarket\":\"market from which the collateral will be seized to give to the liquidator.\"},\"returns\":{\"repaidAssets\":\"actual amount repaid.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"previewBorrow(uint256)\":{\"params\":{\"assets\":\"amount of assets to borrow.\"},\"returns\":{\"_0\":\"amount of shares that will be asigned to the account after the borrow.\"}},\"previewDebt(address)\":{\"params\":{\"borrower\":\"account to return status snapshot for fixed and floating borrows.\"},\"returns\":{\"debt\":\"the total debt, denominated in number of assets.\"}},\"previewFloatingAssetsAverage()\":{\"returns\":{\"_0\":\"projected `floatingAssetsAverage`.\"}},\"previewRefund(uint256)\":{\"params\":{\"shares\":\"amount of shares to subtract from caller's accountability.\"},\"returns\":{\"_0\":\"amount of assets that will be repaid.\"}},\"previewRepay(uint256)\":{\"params\":{\"assets\":\"amount of assets to repay.\"},\"returns\":{\"_0\":\"amount of shares that will be subtracted from the account after the repay.\"}},\"redeem(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\",\"shares\":\"amount of shares to be redeemed for underlying asset.\"},\"returns\":{\"assets\":\"amount of underlying asset that was withdrawn.\"}},\"refund(uint256,address)\":{\"params\":{\"borrowShares\":\"shares to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualShares\":\"actual subtracted shares from the borrower's accountability.\",\"assets\":\"subtracted assets from the borrower's accountability.\"}},\"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.\"},\"repay(uint256,address)\":{\"params\":{\"assets\":\"assets to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualRepay\":\"the actual amount that should be transferred into the protocol.\",\"borrowShares\":\"subtracted shares from the borrower's accountability.\"}},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"borrower\":\"address of the account that has the debt.\",\"maturity\":\"maturity date where the assets will be repaid.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept to be repaid.\",\"positionAssets\":\"amount to be paid for the borrower's debt.\"},\"returns\":{\"actualRepayAssets\":\"the actual amount that was transferred into the protocol.\"}},\"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.\"},\"seize(address,address,uint256)\":{\"details\":\"Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\",\"params\":{\"assets\":\"amount to be removed from borrower's possession.\",\"borrower\":\"address from which the assets will be seized.\",\"liquidator\":\"address which will receive the seized assets.\"}},\"setAssetSymbol(string)\":{\"params\":{\"assetSymbol\":\"the symbol for the underlying asset.\"}},\"setBackupFeeRate(uint256)\":{\"params\":{\"backupFeeRate_\":\"percentage amount represented with 18 decimals.\"}},\"setDampSpeed(uint256,uint256)\":{\"params\":{\"down\":\"damp speed down, represented with 18 decimals.\",\"up\":\"damp speed up, represented with 18 decimals.\"}},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"params\":{\"earningsAccumulatorSmoothFactor_\":\"represented with 18 decimals.\"}},\"setInterestRateModel(address)\":{\"params\":{\"interestRateModel_\":\"new interest rate model.\"}},\"setMaxFuturePools(uint8)\":{\"details\":\"If value is decreased, VALID maturities will become NOT_READY.\",\"params\":{\"futurePools\":\"number of pools to be active at the same time.\"}},\"setPenaltyRate(uint256)\":{\"params\":{\"penaltyRate_\":\"percentage represented with 18 decimals.\"}},\"setReserveFactor(uint128)\":{\"params\":{\"reserveFactor_\":\"parameter represented with 18 decimals.\"}},\"setRewardsController(address)\":{\"params\":{\"rewardsController_\":\"new rewards controller.\"}},\"setTreasury(address,uint256)\":{\"params\":{\"treasuryFeeRate_\":\"represented with 18 decimals.\",\"treasury_\":\"address of the treasury that will receive the minted eTokens.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalAssets()\":{\"returns\":{\"_0\":\"actual floatingAssets plus earnings to be accrued at current timestamp.\"}},\"totalFloatingBorrowAssets()\":{\"returns\":{\"_0\":\"actual floating debt plus projected interest.\"}},\"transfer(address,uint256)\":{\"details\":\"Makes sure that the caller doesn't have shortfall after transferring.\",\"params\":{\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Makes sure that `from` address doesn't have shortfall after transferring.\",\"params\":{\"from\":\"address from which the assets will be transferred.\",\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"withdraw(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"assets\":\"amount of underlying to be withdrawn.\",\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\"},\"returns\":{\"shares\":\"amount of shares redeemed for underlying asset.\"}},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"maturity\":\"maturity date where the assets will be withdrawn.\",\"minAssetsRequired\":\"minimum amount required by the account (if discount included for early withdrawal).\",\"owner\":\"address that previously deposited the assets.\",\"positionAssets\":\"position size to be reduced.\",\"receiver\":\"address that will receive the withdrawn assets.\"},\"returns\":{\"assetsDiscounted\":\"amount of assets withdrawn (can include a discount for early withdraw).\"}}},\"stateVariables\":{\"__gap\":{\"custom:oz-renamed-from\":\"floatingUtilization\",\"details\":\"gap from deprecated state.\"},\"auditor\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"notice\":\"Emitted when accumulator distributes earnings.\"},\"BackupFeeRateSet(uint256)\":{\"notice\":\"Emitted when the backupFeeRate parameter is changed by admin.\"},\"Borrow(address,address,address,uint256,uint256)\":{\"notice\":\"Event emitted when an account borrows amount of assets from a floating pool.\"},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account borrows amount of an asset from a certain maturity date.\"},\"DampSpeedSet(uint256,uint256)\":{\"notice\":\"Emitted when the damp speeds are changed by admin.\"},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period.\"},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"notice\":\"Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\"},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"notice\":\"Emitted when the earnings of a maturity are updated.\"},\"FloatingDebtUpdate(uint256,uint256)\":{\"notice\":\"Emitted when the floating debt is updated.\"},\"Frozen(address,bool)\":{\"notice\":\"Emitted when `account` sets the `isFrozen` flag.\"},\"InterestRateModelSet(address)\":{\"notice\":\"Emitted when the interestRateModel is changed by admin.\"},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"notice\":\"Emitted when an account's position had a liquidation.\"},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when market state is updated.\"},\"MaxFuturePoolsSet(uint256)\":{\"notice\":\"Emitted when the maxFuturePools is changed by admin.\"},\"PenaltyRateSet(uint256)\":{\"notice\":\"Emitted when the penaltyRate is changed by admin.\"},\"Repay(address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays amount of assets to a floating pool.\"},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays its borrows after maturity.\"},\"ReserveFactorSet(uint256)\":{\"notice\":\"Emitted when the reserveFactor is changed by admin.\"},\"RewardsControllerSet(address)\":{\"notice\":\"Emitted when the rewardsController is changed by admin.\"},\"Seize(address,address,uint256)\":{\"notice\":\"Emitted when an account's collateral has been seized.\"},\"SpreadBadDebt(address,uint256)\":{\"notice\":\"Emitted when an account is cleared from bad debt.\"},\"TreasurySet(address,uint256)\":{\"notice\":\"Emitted when the treasury variables are changed by admin.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account withdraws from a fixed rate pool.\"}},\"kind\":\"user\",\"methods\":{\"accountSnapshot(address)\":{\"notice\":\"Gets current snapshot for an account across all maturities.\"},\"accounts(address)\":{\"notice\":\"Tracks fixed deposit and borrow map and floating borrow shares of an account.\"},\"backupFeeRate()\":{\"notice\":\"Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\"},\"borrow(uint256,address,address)\":{\"notice\":\"Borrows a certain amount from the floating pool.\"},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Borrows a certain amount from a maturity.\"},\"clearBadDebt(address)\":{\"notice\":\"Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\"},\"dampSpeedDown()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\"},\"dampSpeedUp()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Deposits a certain amount to a maturity.\"},\"earningsAccumulator()\":{\"notice\":\"Accumulated earnings from extraordinary sources to be gradually distributed.\"},\"earningsAccumulatorSmoothFactor()\":{\"notice\":\"Factor used for gradual accrual of earnings to the floating pool.\"},\"fixedBorrowPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed borrow positions by maturity, account and position.\"},\"fixedDepositPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed deposit positions by maturity, account and position.\"},\"fixedPoolBalance(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed and supplied amount.\"},\"fixedPoolBorrowed(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed amount.\"},\"fixedPools(uint256)\":{\"notice\":\"Tracks fixed pools state by maturity.\"},\"floatingAssets()\":{\"notice\":\"Amount of floating assets deposited to the pool.\"},\"floatingAssetsAverage()\":{\"notice\":\"Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\"},\"floatingBackupBorrowed()\":{\"notice\":\"Amount of assets lent by the floating pool to the fixed pools.\"},\"floatingDebt()\":{\"notice\":\"Amount of assets lent by the floating pool to accounts.\"},\"initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"notice\":\"Initializes the contract.\"},\"interestRateModel()\":{\"notice\":\"Interest rate model contract used to get the borrow rates.\"},\"isFrozen()\":{\"notice\":\"Flag to prevent new borrows and deposits.\"},\"lastAccumulatorAccrual()\":{\"notice\":\"Last time the accumulator distributed earnings.\"},\"lastAverageUpdate()\":{\"notice\":\"Last time the floating assets average was updated.\"},\"lastFloatingDebtUpdate()\":{\"notice\":\"Last time the floating debt was updated.\"},\"liquidate(address,uint256,address)\":{\"notice\":\"Liquidates undercollateralized fixed/floating (or both) position(s).\"},\"maxFuturePools()\":{\"notice\":\"Number of fixed pools to be active at the same time.\"},\"pause()\":{\"notice\":\"Sets the pause state to true in case of emergency, triggered by an authorized account.\"},\"penaltyRate()\":{\"notice\":\"Rate per second to be charged to delayed fixed pools borrowers after maturity.\"},\"previewBorrow(uint256)\":{\"notice\":\"Simulates the effects of a borrow at the current time, given current contract conditions.\"},\"previewDebt(address)\":{\"notice\":\"Gets all borrows and penalties for an account.\"},\"previewFloatingAssetsAverage()\":{\"notice\":\"Returns the current `floatingAssetsAverage` without updating the storage variable.\"},\"previewRefund(uint256)\":{\"notice\":\"Simulates the effects of a refund at the current time, given current contract conditions.\"},\"previewRepay(uint256)\":{\"notice\":\"Simulates the effects of a repay at the current time, given current contract conditions.\"},\"redeem(uint256,address,address)\":{\"notice\":\"Redeems the owner's floating pool assets to the receiver address.\"},\"refund(uint256,address)\":{\"notice\":\"Repays a certain amount of shares to the floating pool.\"},\"repay(uint256,address)\":{\"notice\":\"Repays a certain amount of assets to the floating pool.\"},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Repays a certain amount to a maturity.\"},\"reserveFactor()\":{\"notice\":\"Percentage factor that represents the liquidity reserves that can't be borrowed.\"},\"rewardsController()\":{\"notice\":\"Address of the rewards controller that will accrue rewards for accounts operating with the Market.\"},\"seize(address,address,uint256)\":{\"notice\":\"Public function to seize a certain amount of assets.\"},\"setAssetSymbol(string)\":{\"notice\":\"Sets name and symbol for the Market.\"},\"setBackupFeeRate(uint256)\":{\"notice\":\"Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity.\"},\"setDampSpeed(uint256,uint256)\":{\"notice\":\"Sets the damp speed used to update the floatingAssetsAverage.\"},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"notice\":\"Sets the factor used when smoothly accruing earnings to the floating pool.\"},\"setFrozen(bool)\":{\"notice\":\"Sets `isFrozen` state, triggered by an authorized account.\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model to be used to calculate rates.\"},\"setMaxFuturePools(uint8)\":{\"notice\":\"Sets the protocol's max future pools for fixed borrowing and lending.\"},\"setPenaltyRate(uint256)\":{\"notice\":\"Sets the penalty rate per second.\"},\"setReserveFactor(uint128)\":{\"notice\":\"Sets the percentage that represents the liquidity reserves that can't be borrowed.\"},\"setRewardsController(address)\":{\"notice\":\"Sets the rewards controller to update account rewards when operating with the Market.\"},\"setTreasury(address,uint256)\":{\"notice\":\"Sets the treasury variables.\"},\"totalAssets()\":{\"notice\":\"Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator.\"},\"totalFloatingBorrowAssets()\":{\"notice\":\"Calculates the total floating debt, considering elapsed time since last update and current interest rate.\"},\"totalFloatingBorrowShares()\":{\"notice\":\"Total amount of floating borrow shares assigned to floating borrow accounts.\"},\"transfer(address,uint256)\":{\"notice\":\"Moves amount of shares from the caller's account to `to`.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Moves amount of shares from `from` to `to` using the allowance mechanism.\"},\"treasury()\":{\"notice\":\"Address of the treasury that will receive the allocated earnings.\"},\"treasuryFeeRate()\":{\"notice\":\"Rate to be charged by the treasury to floating and fixed borrows.\"},\"unpause()\":{\"notice\":\"Sets the pause state to false when threat is gone, triggered by an authorized account.\"},\"withdraw(uint256,address,address)\":{\"notice\":\"Withdraws the owner's floating pool assets to the receiver address.\"},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Withdraws a certain amount from a maturity.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Market.sol\":\"Market\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":70},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\":{\"keccak256\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b83b7afa4d2372da3ba5402fb10860a105c35d79812c60dc61007be2afc17618\",\"dweb:/ipfs/QmYX9xPmbNVSKXrepKiUZiG5oL3SdzFp9a4kqspxX1sEUx\"]},\"@openzeppelin/contracts-upgradeable-v4/access/IAccessControlUpgradeable.sol\":{\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://740cf4dc535e3082560cf5a031473029f322690fc8037fe9d5e3a8bef42e757c\",\"dweb:/ipfs/QmTQxFdfxcaueQa23VX34wAPqzruZbkzyeN58tZK2yav2b\"]},\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e\",\"dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv\"]},\"@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol\":{\"keccak256\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6d362da7417bc7d7cc8623f3d3f8f04c3808d043ee6379568c63a63ec14a124e\",\"dweb:/ipfs/QmYm3wDHUcfGh3MNiRqpWEBbSSYnDSyUsppDATy5DVsfui\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b\",\"dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8b06267c5f80bad727af3e48b1382333d591dad51376399ef2f6b0ee6d58bf95\",\"dweb:/ipfs/QmdU5La1agcQvghnfMpWZGDPz2TUDTCxUwTLKmuMRXBpAx\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/StringsUpgradeable.sol\":{\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f8613145881436fc0480fff22da4868d611e2b0c0c3da083334eb4362ce1945a\",\"dweb:/ipfs/QmPqpP3YeRbBdTJRe6Gv2eGsUaANf4J6RwTNRW36iYahfV\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/introspection/ERC165Upgradeable.sol\":{\"keccak256\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1b13befeb3413749292f9fb229de1c7a509a5ce2c8047d9094fc004ca9d3af89\",\"dweb:/ipfs/QmRzJ2hZSwRtMejHUZAYTPRKgZsnfb112Fno9Jf3EiDfwA\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/introspection/IERC165Upgradeable.sol\":{\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://92ad7e572cf44e6b4b37631b44b62f9eb9fb1cf14d9ce51c1504d5dc7ccaf758\",\"dweb:/ipfs/QmcnbqX85tsWnUXPmtuPLE4SczME2sJaTfmqEFkuAJvWhy\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\":{\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2b2835c737d073ef8b82a4cc246495a9740f43e7ff2cf130906b2449ff9bfb91\",\"dweb:/ipfs/QmSCWfNoSvvTN57ic7o1RW6NqSxxGAqbBTnLKc7QHe27qB\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/math/SignedMathUpgradeable.sol\":{\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://88ace2d60f265752f18903d839910be4e4e104340b2957678585b812447825d4\",\"dweb:/ipfs/QmXFkNxMc3AAGzhs2wUEZyErWQjsvoTGyYjuU5oZkFki5Z\"]},\"@openzeppelin/contracts-v4/utils/math/Math.sol\":{\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c\",\"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS\"]},\"@openzeppelin/contracts-v4/utils/math/SafeCast.sol\":{\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://495145362c7ff1c9ca88c58bbbbcb412e3c2004406647412394486552ff6c278\",\"dweb:/ipfs/QmNNCeng6d5eRPDn6tkWSQhjE39XWfQEfjA63rRwHmr1iH\"]},\"contracts/Auditor.sol\":{\"keccak256\":\"0x5110a03bc02c12d47bc64ccb39250e2c9eaa4c4089e63ed143e0513bf7ede5d8\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e61331e636beec80bc57e2b751fa672ee98dab4fb489c9ea4cf19cd68acbddfd\",\"dweb:/ipfs/QmPgu5ZNy8b7ywz6fX658A5ETWTKdGLXCwtX5eAPEiZfH8\"]},\"contracts/InterestRateModel.sol\":{\"keccak256\":\"0x21b3897afb0da4e23559f3122f2292deb79516d8850a4995ece47b8c4d278004\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://a8aad4f1b7340db20e72e3c115e951ad5c71c87fb6139729f9b3279289f82908\",\"dweb:/ipfs/QmZ1UAp33jbcHJZFmsDSokVM6tSCPTPXi3zEranQDP4ZQE\"]},\"contracts/Market.sol\":{\"keccak256\":\"0xea262e9a46d356f8626b4ea1d2bf9017e009b3d4f95809f5f33331b0236b3ce6\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e05e0132c04440fa2a3bd7d991940f4f14f70efe0414f7b8085f5a2247aea6ec\",\"dweb:/ipfs/QmWwjTo5nRbuY1GywEXUPdA9tDvN6CgA8pL147dQdPTacW\"]},\"contracts/RewardsController.sol\":{\"keccak256\":\"0xab502e9e6c6fdd56878d80fde0aee78c360234b15b1db8d7cb6508fe3c430163\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://08502c85c6753a61ff24aeab55809674dd47cb206ad02aa615c81a53820acb06\",\"dweb:/ipfs/Qmazc5RbGCq7QXsuqqfkC5yC4LgkTUQLg5Xn1YCyi5Rxi4\"]},\"contracts/utils/FixedLib.sol\":{\"keccak256\":\"0x9eb04f02cac9a0c2fd049587524799c8ab4fa1840d9550bad02d87d81074187c\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://885545fb71ae6e82d70b364dd2fc021e25435b01131f1e7a63755c303a350928\",\"dweb:/ipfs/QmaejvpPc1qX1GWvwodnUaHgKzob8WpsU3kz84qpk7vRn3\"]},\"contracts/utils/IPriceFeed.sol\":{\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://b06913f9c7e4fe67bbb1ddf3d9335a2a6c0e7a537aae8ed7d8b5825c61e80514\",\"dweb:/ipfs/Qmb34jWcW4Pv8Upsq2rtoYoncPHoUgDUET6JHBBsTo583L\"]},\"solmate/src/mixins/ERC4626.sol\":{\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1dca20fc42d20ce7b6023fafd744dc7e91ed2d1f6c5f1fb45e3004b1d5f33100\",\"dweb:/ipfs/Qmf7MtQTTSJYEhsJ3HDmegt4PFSG13msyFAv4DFAoqyypa\"]},\"solmate/src/tokens/ERC20.sol\":{\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb440672ebad7d487c1600e406e140fd1ffc4bd7520c86b5709183ca2602da58\",\"dweb:/ipfs/QmNgZaBoAZwnwm4mTL1cUZnMtvt1iZnruMnfpJnDu6upuc\"]},\"solmate/src/utils/FixedPointMathLib.sol\":{\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://737232ccd46bfbe6f34a3e5bc24c345777da47e6ea27bcc46d2c3931883c2257\",\"dweb:/ipfs/QmeA6ikG9dQKZgkJYUVGXcApuCii34h7qtmguToRdSU3qZ\"]},\"solmate/src/utils/SafeTransferLib.sol\":{\"keccak256\":\"0xbb4580ec2c735b5f31bb176567c886a87c2800b3eff132eda15ddc2b28cc2932\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://27ce4609ece6f8635dafd662cf8a45a4e0b5c3240e6f26c6b0081df880039152\",\"dweb:/ipfs/QmYPBJ1DPeFNUTPSPka3G9iwpSfbyJnYQeo5YGvbfyQFGC\"]}},\"version\":1}", + "bytecode": "0x610120604052348015610010575f80fd5b5060405161651138038061651183398101604081905261002f9161021c565b8160405180602001604052805f81525060405180602001604052805f8152508181846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100b09190610254565b60c96100bc8482610313565b5060ca6100c98382610313565b5060ff81166080524660a0526100dd610108565b60c0525050506001600160a01b0392831660e05250508116610100526101016101a1565b505061043e565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c960405161013991906103cd565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f54610100900460ff16156101b4575f80fd5b5f5460ff90811614610203575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610219575f80fd5b50565b5f806040838503121561022d575f80fd5b825161023881610205565b602084015190925061024981610205565b809150509250929050565b5f60208284031215610264575f80fd5b815160ff81168114610274575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102a357607f821691505b6020821081036102c157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561030e57805f5260205f20601f840160051c810160208510156102ec5750805b601f840160051c820191505b8181101561030b575f81556001016102f8565b50505b505050565b81516001600160401b0381111561032c5761032c61027b565b6103408161033a845461028f565b846102c7565b6020601f821160018114610372575f831561035b5750848201515b5f19600385901b1c1916600184901b17845561030b565b5f84815260208120601f198516915b828110156103a15787850151825560209485019460019092019101610381565b50848210156103be57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f8083546103da8161028f565b6001821680156103f1576001811461040657610433565b60ff1983168652811515820286019350610433565b865f5260205f205f5b8381101561042b5781548882015260019091019060200161040f565b505081860193505b509195945050505050565b60805160a05160c05160e05161010051615ff561051c5f395f81816107840152818161154d015281816116fe01528181611d7a01528181611faa01528181612184015281816124b201528181612e8b0152818161303c0152818161312e015281816136700152614b2801525f8181610734015281816115be01528181611b7101528181611c650152818161206c015281816122780152818161233f0152818161282e01528181612e0d015281816136e101528181614cb2015281816151cd01526152cf01525f611bde01525f611ba901525f6106cb0152615ff55ff3fe608060405234801561000f575f80fd5b50600436106104c1575f3560e01c80636e76fc8f11610283578063b2a02ff111610168578063d5164184116100e0578063e63ab1e91161009a578063e63ab1e914610c98578063e94b3c2114610cac578063eee8c9e014610cb5578063ef8b30f714610cbd578063f3fdb15a14610cd0578063fb0fc4c314610ce3578063fea45d9414610cfa575f80fd5b8063d516418414610c04578063d547741f14610c17578063d6b7494f14610c2a578063d905777e14610c33578063dd62ed3e14610c5b578063e00b262514610c85575f80fd5b8063b2a02ff114610af7578063b3d7f6b914610b0a578063b460af9414610b1d578063ba08765214610b30578063bee36bb314610b43578063bf722ca214610b56578063c63d75b6146107ae578063c6e6f59214610b69578063ccfd8b1114610b7c578063ce96cb7714610bad578063d2681a0b14610bc0578063d505accf14610bf1575f80fd5b806391d14854116101fb57806391d1485414610a32578063926bb63314610a4557806394bf804d14610a5857806395d89b4114610a6b57806397bce8d014610a73578063a05a091a14610a86578063a16a885014610a99578063a1bab44714610aae578063a1e8f02b14610ac1578063a217fddf14610aca578063a9059cbb14610ad1578063acb7081514610ae4575f80fd5b80636e76fc8f146109325780636eb9ffeb1461095957806370a082311461098557806378007e23146109a45780637ad226dc146109b75780637e932d32146109ca5780637ecebe00146109dd5780638456cb59146109fc5780638a1baa4614610a045780638bcd401614610a0d5780638c3cba5a14610a205780638d0e5f0214610a29575f80fd5b8063313ce567116103a95780634322b714116103215780634322b714146107d557806347dffde0146107fc5780634914c0081461080f5780634cdad506146108225780634e7c5059146108355780635c975abb146108895780635cc2ef83146108945780635e5c06e2146108a757806361d027b3146108f057806366601032146109035780636bb65f531461090c5780636e553f651461091f575f80fd5b8063313ce567146106c657806333eeb147146106ed57806334f7d1f2146107015780633644e5151461071457806336568abe1461071c57806338d52e0f1461072f5780633aa18d6f146107635780633c6f317f1461076c5780633ec045a61461077f5780633f4ba83a146107a6578063402d267d146107ae57806342da42bf146107c2575f80fd5b8063137001011161043c57806313700101146105e557806318160ddd146105f85780631a5b9e62146106015780631a90f186146106145780631d43b30b1461061d57806323b872dd14610630578063248a9ca31461064357806325fc07a91461066557806328acf2cf146106845780632c5dcc77146106975780632e0af008146106aa5780632f2ff15d146106b3575f80fd5b8063014a296f146104c557806301e1d114146104f257806301ffc9a714610508578063022d8af51461052b5780630539fa8c1461054057806306fdde031461054957806307a2d13a1461055e578063095ea7b3146105715780630a28a477146105845780630ab69be8146105975780630e52dbec146105be5780630f2b75aa146105dd575b5f80fd5b6104d86104d336600461564e565b610d0d565b604080519283526020830191909152015b60405180910390f35b6104fa610d42565b6040519081526020016104e9565b61051b610516366004615669565b610dee565b60405190151581526020016104e9565b61053e6105393660046156ab565b610e24565b005b6104fa60d85481565b610551610eab565b6040516104e991906156c4565b6104fa61056c3660046156f9565b610f37565b61051b61057f366004615710565b610f63565b6104fa6105923660046156f9565b610fce565b6104d86105a53660046156f9565b5f90815260d16020526040902080546001909101549091565b60da546105cb9060ff1681565b60405160ff90911681526020016104e9565b6104fa610fed565b61053e6105f3366004615777565b611092565b6104fa60cb5481565b6104fa61060f3660046157b5565b611103565b6104fa60d45481565b6104fa61062b36600461564e565b6115f3565b61051b61063e366004615807565b6116f3565b6104fa6106513660046156f9565b5f9081526065602052604090206001015490565b6104fa6106733660046156f9565b5f90815260d1602052604090205490565b61053e610692366004615855565b61185a565b61053e6106a5366004615710565b6118a6565b6104fa60dd5481565b61053e6106c136600461586e565b611916565b6105cb7f000000000000000000000000000000000000000000000000000000000000000081565b60e35461051b90600160a01b900460ff1681565b6104fa61070f36600461589c565b61193f565b6104fa611ba6565b61053e61072a36600461586e565b611c00565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b6040516104e991906158da565b6104fa60d95481565b6104fa61077a36600461589c565b611c22565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b61053e611c95565b6104fa6107bc36600461564e565b505f1990565b61053e6107d03660046156f9565b611cb7565b60dc546107ef90600160801b90046001600160801b031681565b6040516104e991906158ee565b6104fa61080a3660046156f9565b611cf6565b6104fa61081d366004615902565b611d14565b6104fa6108303660046156f9565b6121f0565b6108696108433660046156f9565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016104e9565b60975460ff1661051b565b61053e6108a2366004615941565b6121fa565b6108d56108b536600461564e565b60d26020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016104e9565b60e154610756906001600160a01b031681565b6104fa60e25481565b60e354610756906001600160a01b031681565b6104fa61092d36600461586e565b612254565b6104fa7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da5461097090600160281b900463ffffffff1681565b60405163ffffffff90911681526020016104e9565b6104fa61099336600461564e565b60cc6020525f908152604090205481565b6104fa6109b23660046156f9565b6122fa565b6104d86109c536600461586e565b612311565b61053e6109d8366004615961565b61236e565b6104fa6109eb36600461564e565b60ce6020525f908152604090205481565b61053e6123eb565b6104fa60d55481565b61053e610a1b36600461564e565b6123fd565b6104fa60d35481565b6104fa60df5481565b61051b610a4036600461586e565b61247d565b61053e610a5336600461564e565b6124a7565b6104fa610a6636600461586e565b612815565b6105516128b0565b61053e610a81366004615980565b6128bd565b6104fa610a943660046157b5565b612a1c565b60da5461097090610100900463ffffffff1681565b61053e610abc3660046156f9565b612e41565b6104fa60d75481565b6104fa5f81565b61051b610adf366004615710565b612e80565b6104d8610af236600461586e565b612fdd565b61053e610b05366004615807565b612ff9565b6104fa610b183660046156f9565b61300d565b6104fa610b2b366004615a2b565b613023565b6104fa610b3e366004615a2b565b61312b565b61053e610b5136600461564e565b613228565b6104fa610b643660046156f9565b61327c565b6104fa610b773660046156f9565b61329b565b6104d8610b8a36600461586e565b60cf60209081525f92835260408084209091529082529020805460019091015482565b6104fa610bbb36600461564e565b6132b2565b6104d8610bce36600461586e565b60d060209081525f92835260408084209091529082529020805460019091015482565b61053e610bff366004615a5f565b6132d3565b6104fa610c12366004615a2b565b613498565b61053e610c2536600461586e565b613713565b6104fa60d65481565b6104fa610c4136600461564e565b6001600160a01b03165f90815260cc602052604090205490565b6104fa610c69366004615ac9565b60cd60209081525f928352604080842090915290825290205481565b61053e610c933660046156ab565b613737565b6104fa5f80516020615f8083398151915281565b6104fa60de5481565b6104fa61378b565b6104fa610ccb3660046156f9565b61386c565b60db54610756906001600160a01b031681565b60da5461097090600160481b900463ffffffff1681565b60dc546107ef906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610d3090610f37565b610d39846115f3565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610db4575f81815260d160205260409020600381015480831115610da857824210610d8e578160020154610da3565b6002820154610da39042839003838603613876565b860195505b50506224ea0001610d5c565b50610dd760e254670de0b6b3a76400000360d454610dd061378b565b0390613894565b610ddf6138a8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610e1e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610e2e8161391e565b610e36613928565b60dd5f828254610e469190615b1d565b90915550610e5490506139a1565b60dc80546001600160801b0319166001600160801b0384161790556040517f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e90610e9f9084906158ee565b60405180910390a15050565b60c98054610eb890615b30565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee490615b30565b8015610f2f5780601f10610f0657610100808354040283529160200191610f2f565b820191905f5260205f20905b815481529060010190602001808311610f1257829003601f168201915b505050505081565b60cb545f908015610f5a57610f55610f4d610d42565b849083613876565b610f5c565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fbd9086815260200190565b60405180910390a350600192915050565b60cb545f908015610f5a57610f5581610fe5610d42565b859190613a07565b60dd5460de545f9190828183106110065760d85461100a565b60d9545b60da549091505f906110459061102d90600160481b900463ffffffff1642615b68565b6110379084615b7b565b61104090615b92565b613a34565b61105790670de0b6b3a7640000615bac565b90506110638185613894565b61107f61107883670de0b6b3a7640000615b68565b8590613894565b6110899190615b1d565b94505050505090565b5f61109c8161391e565b82826040516020016110af929190615bcb565b60405160208183030381529060405260c990816110cc9190615c46565b5082826040516020016110e0929190615d00565b60405160208183030381529060405260ca90816110fd9190615c46565b50505050565b5f61110c613ba7565b611114613bb6565b845f036111345760405163774257f760e01b815260040160405180910390fd5b60da5461114890879060ff1660035f613be1565b5f86815260d160205260409020611165611160613d7b565b613e89565b61116f8188613ec6565b60dd5f82825461117f9190615b1d565b909155505060e3546001600160a01b031680156111f057604051636c912dad60e01b81526001600160a01b03821690636c912dad906111c29087906004016158da565b5f604051808303815f87803b1580156111d9575f80fd5b505af11580156111eb573d5f803e3d5ffd5b505050505b5f6111fb8389613f44565b9050801561127f575f8160d3546112129190615b1d565b60dc549091506112509061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b60dd54906001600160801b0316613894565b60d45461125d9083615b1d565b111561127b57604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061128a610fed565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff166112d88a600101548b5f015489613f80565b6112e28888613fad565b6112ef898960d354613fc5565b6040518663ffffffff1660e01b815260040161130f959493929190615d3d565b602060405180830381865afa15801561132a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061134e9190615d63565b905061137361136c611360428f615b68565b83906301e13380613876565b8c90613fe1565b935050505080886113849190615b1d565b9350868411156113a757604051632c1b6b4160e21b815260040160405180910390fd5b6113b18585613ff5565b5f89815260d0602090815260408083206001600160a01b038916845290915281208054909103611408576001600160a01b0386165f90815260d2602052604090206001810154611401908c61406b565b6001909101555b5f8061144b61141685614154565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614180565b91509150815f1461146f5781866002015f8282546114699190615b1d565b90915550505b611478816141cc565b60405180604001604052808c855f01546114929190615b1d565b81526020018585600101546114a79190615b1d565b90525f8d815260d0602090815260408083206001600160a01b03808e168086529184529382902085518155949092015160019094019390935591519194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139061151d9033908e908890615d7a565b60405180910390a461152d6139a1565b611536896141f8565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906115849030908990600401615d9b565b5f604051808303815f87803b15801561159b575f80fd5b505af11580156115ad573d5f803e3d5ffd5b506115e79250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614246565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b81156116c85760018216156116ad575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916116689190615b1d565b90506116748188615b1d565b9650824211156116aa5761169d8561168c8542615b68565b6116969190615b7b565b8290613894565b6116a79088615b1d565b96505b50505b60019190911c906116c16224ea0082615b1d565b9050611624565b600284015480156116e9576116dc81611cf6565b6116e69087615b1d565b95505b5050505050919050565b5f6116fc613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53086611736866121f0565b6040518463ffffffff1660e01b815260040161175493929190615db5565b5f6040518083038186803b15801561176a575f80fd5b505afa15801561177c573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561184657604051630149e46f60e01b81526001600160a01b03821690630149e46f906117bf9088906004016158da565b5f604051808303815f87803b1580156117d6575f80fd5b505af11580156117e8573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f91506118189087906004016158da565b5f604051808303815f87803b15801561182f575f80fd5b505af1158015611841573d5f803e3d5ffd5b505050505b611851858585614291565b95945050505050565b5f6118648161391e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610e9f565b5f6118b08161391e565b6118bb611160613d7b565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119308161391e565b61193a838361436b565b505050565b5f611948613ba7565b611950613bb6565b835f03611970576040516356316e8760e01b815260040160405180910390fd5b60da5461198490869060ff1660035f613be1565b5f85815260d1602052604081209061199c8288613ec6565b90506119a9611160613d7b565b8060dd5f8282546119ba9190615b1d565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f9182916119ff918a906143f0565b9092509050611a0e8289615b1d565b945086851015611a3157604051632c1b6b4160e21b815260040160405180910390fd5b611a3b8489614441565b60d35f828254611a4b9190615b68565b90915550611a5b90508183615b1d565b846002015f828254611a6d9190615b68565b925050819055508060d55f828254611a859190615b1d565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611ada576001600160a01b0387165f90815260d2602052604090208054611ad7908c61406b565b90555b88815f015f828254611aec9190615b1d565b9250508190555082816001015f828254611b069190615b1d565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611b5b6139a1565b611b648a6141f8565b611b996001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614471565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611bdb57611bd66144c9565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611c14575f80fd5b611c1e8282614562565b5050565b5f611c2b613ba7565b60da54611c4090869060ff1660036002613be1565b611c4e8585858560016145c8565b9050611c586139a1565b611c8d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b949350505050565b5f80516020615f80833981519152611cac8161391e565b611cb4614952565b50565b5f611cc18161391e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610e9f565b60df545f908015610f5a57610f55611d0c61378b565b849083613a07565b5f611d1d613ba7565b6001600160a01b0384163303611d46576040516344511af160e01b815260040160405180910390fd5b611d4e613928565b60dd5f828254611d5e9190615b1d565b909155505060405163042dcf6b60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890611db5903090869089908990600401615dd9565b602060405180830381865afa158015611dd0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df49190615d63565b9250825f03611e165760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611e5057508515155b15611f5d576001821615611f42575f81421015611e8757611e748288898b5f6145c8565b9050611e808188615b68565b9650611f34565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611eb99190615b1d565b9150505f611ee060d6548542611ecf9190615b68565b611ed99190615b7b565b8390613894565b611eea9083615b1d565b9050888111611ef95788611f04565b611f04898383613876565b9250825f03611f15575f9850611f31565b611f2284848b8d5f6145c8565b9250611f2e838a615b68565b98505b50505b611f3e8186615b1d565b9450505b60019190911c90611f566224ea0082615b1d565b9050611e42565b50508315801590611f715750600281015415155b15611fa6575f611f808561327c565b90508015611fa4575f611f938288614994565b509050611fa08185615b1d565b9350505b505b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1b003130878a886040518563ffffffff1660e01b8152600401611ffa9493929190615dd9565b6040805180830381865afa158015612014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120389190615e03565b915091508160d55f82825461204d9190615b1d565b90915550612094905033306120628588615b1d565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614471565b306001600160a01b038616036120b5576120b030338984614af1565b61211a565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906120e59033908b908690600401615db5565b5f604051808303815f87803b1580156120fc575f80fd5b505af115801561210e573d5f803e3d5ffd5b5050505061211a6139a1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906121b9908a906004016158da565b5f604051808303815f87803b1580156121d0575f80fd5b505af11580156121e2573d5f803e3d5ffd5b505050505050509392505050565b5f610e1e82610f37565b5f6122048161391e565b61220c614cd9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61225e8361386c565b9050805f0361226b575f80fd5b6122a06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614471565b6122aa8282614d04565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8382614d7a565b60df545f908015610f5a57610f5581610fe561378b565b5f8061231b613ba7565b6123258484614994565b90925090506123326139a1565b6123676001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614471565b9250929050565b5f6123788161391e565b60e35460ff600160a01b90910416151582151514611c1e5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee698906123df90851515815260200190565b60405180910390a25050565b6123f3614dd9565b6123fb614e42565b565b5f6124078161391e565b60db546001600160a01b03161561242357612423611160613d7b565b60db80546001600160a01b0319166001600160a01b0384161790556124466139a1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146124f0576040516317568c8f60e21b815260040160405180910390fd5b6124f8613928565b60dd5f8282546125089190615b1d565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b811561276c576001821615612751575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916125849190615b1d565b905080861061274e5760e3546001600160a01b031680156125f957604051636c912dad60e01b81526001600160a01b03821690636c912dad906125cb908c906004016158da565b5f604051808303815f87803b1580156125e2575f80fd5b505af11580156125f4573d5f803e3d5ffd5b505050505b6126038288615b68565b965061260f8287615b1d565b83545f86815260d1602052604081209298509161262b91614e7f565b905080156126c4578060d35f8282546126449190615b68565b909155505083545f906126739061265b9084614e9e565b5f88815260d160205260409020600201549084613876565b90508060d15f8881526020019081526020015f206002015f8282546126989190615b68565b925050819055508060d55f8282546126b09190615b1d565b909155506126c09050818a615b1d565b9850505b5f85815260d0602090815260408083206001600160a01b038e16845290915281208181556001908101919091558901546126fe9086614eb3565b60018a015560408051848152602081018590526001600160a01b038c1691339188917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a450505b50505b60019190911c906127656224ea0082615b1d565b9050612540565b60028501541580159061278957506127838461327c565b93508315155b156127aa575f6127998588614994565b5090506127a68185615b1d565b9350505b8215612805578260d55f8282546127c19190615b68565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b61280d6139a1565b505050505050565b5f61281f8361300d565b90506128566001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b6128608284614d04565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8184614d7a565b60ca8054610eb890615b30565b5f54610100900460ff16158080156128db57505f54600160ff909116105b806128f45750303b1580156128f457505f5460ff166001145b6128fc575f80fd5b5f805460ff19166001179055801561291d575f805461ff0019166101001790555b612925614f72565b61292d614f84565b60da805468ffffffffffffffff0019166101004263ffffffff1690810263ffffffff60281b191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129805f3361436b565b61298a8b8b611092565b6129938961185a565b61299c88610e24565b6129a5876123fd565b6129ae86612e41565b6129b785611cb7565b6129c084613737565b6129ca83836121fa565b8015612a0f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a25613ba7565b845f03612a455760405163b8cb621960e01b815260040160405180910390fd5b60da54612a5a90879060ff1660036002613be1565b5f86815260d160205260409020612a72611160613d7b565b612a7c8188613ec6565b60dd5f828254612a8c9190615b1d565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612ad69190615b1d565b871115612af15760208101518151612aee9190615b1d565b96505b6040805180820190915281518152602080830151908201525f90612b2190612b19908a614f9e565b518490614fe4565b60d354612b2e9190615b1d565b905060dd5460d45482612b419190615b1d565b1115612b5f57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612c71575f612b73610fed565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bc78a600101548b5f01548a613f80565b612bd18989613fad565b612bdc8a8a8a613fc5565b6040518663ffffffff1660e01b8152600401612bfc959493929190615d3d565b602060405180830381865afa158015612c17573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c3b9190615d63565b9050612c66612c4d611360428f615b68565b612c5f90670de0b6b3a7640000615b1d565b8c90615028565b965050505050612c75565b8692505b85831015612c9657604051632c1b6b4160e21b815260040160405180910390fd5b612ca08484613ff5565b5f80612cec612cb7612cb2878c615b68565b614154565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614180565b9150915081846002015f828254612d039190615b1d565b90915550612d129050816141cc565b612d1c838a61503c565b5060208301518351175f03612d6f575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612d68908c614eb3565b9055612d9f565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b856001600160a01b0316876001600160a01b03168b7fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c338d8a604051612de793929190615d7a565b60405180910390a4612df76139a1565b612e008a6141f8565b612e346001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614246565b5050505095945050505050565b5f612e4b8161391e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610e9f565b5f612e89613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612ec3866121f0565b6040518463ffffffff1660e01b8152600401612ee193929190615db5565b5f6040518083038186803b158015612ef7575f80fd5b505afa158015612f09573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015612fd357604051630149e46f60e01b81526001600160a01b03821690630149e46f90612f4c9033906004016158da565b5f604051808303815f87803b158015612f63575f80fd5b505af1158015612f75573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f9150612fa59087906004016158da565b5f604051808303815f87803b158015612fbc575f80fd5b505af1158015612fce573d5f803e3d5ffd5b505050505b611c8d848461509a565b5f80612fe7613ba7565b612325612ff38561327c565b84614994565b613001613ba7565b61193a33848484614af1565b60cb545f908015610f5a57610f55611d0c610d42565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db59061307590309086908990600401615db5565b5f6040518083038186803b15801561308b575f80fd5b505afa15801561309d573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561310e57604051630149e46f60e01b81526001600160a01b03821690630149e46f906130e09086906004016158da565b5f604051808303815f87803b1580156130f7575f80fd5b505af1158015613109573d5f803e3d5ffd5b505050505b6131198585856150fd565b91506131236139a1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53084613166886121f0565b6040518463ffffffff1660e01b815260040161318493929190615db5565b5f6040518083038186803b15801561319a575f80fd5b505afa1580156131ac573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561321d57604051630149e46f60e01b81526001600160a01b03821690630149e46f906131ef9086906004016158da565b5f604051808303815f87803b158015613206575f80fd5b505af1158015613218573d5f803e3d5ffd5b505050505b6131198585856151f4565b5f6132328161391e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f908015610f5a57610f558161329361378b565b859190613876565b60cb545f908015610f5a57610f5581613293610d42565b6001600160a01b0381165f90815260cc6020526040812054610e1e90610f37565b428410156132df575f80fd5b5f60016132ea611ba6565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156133f2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134285750876001600160a01b0316816001600160a01b0316145b613430575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134a1613ba7565b6134a9613bb6565b835f036134c95760405163774257f760e01b815260040160405180910390fd5b6134d38285613ff5565b60e3546001600160a01b0316801561353f57604051636c912dad60e01b81526001600160a01b03821690636c912dad906135119086906004016158da565b5f604051808303815f87803b158015613528575f80fd5b505af115801561353a573d5f803e3d5ffd5b505050505b61354a611160613d7b565b613553856122fa565b91505f8560d4546135649190615b1d565b60d481905560dc549091506135959061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b8160d3546135a39190615b1d565b11156135c157604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135d29190615b1d565b90915550506001600160a01b0384165f90815260d2602052604081206002018054859290613601908490615b1d565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136596139a1565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906136a79030908890600401615d9b565b5f604051808303815f87803b1580156136be575f80fd5b505af11580156136d0573d5f803e3d5ffd5b5061370a9250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614246565b50509392505050565b5f8281526065602052604090206001015461372d8161391e565b61193a8383614562565b5f6137418161391e565b60dc80546001600160801b03808516600160801b0291161790556040517fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90610e9f9084906158ee565b60d45460dd5460da545f929190839061385890613851906137b990600160281b900463ffffffff1642615b68565b60db546301e13380906001600160a01b0316637c21fb1d6137da888a613fad565b6137e7898b60d354613fc5565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613826573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061384a9190615d63565b9190613876565b8490613894565b90506138648184615b1d565b935050505090565b5f610e1e8261329b565b82820281151584158583048514171661388d575f80fd5b0492915050565b5f610f5c8383670de0b6b3a7640000613876565b60da545f9081906138c490610100900463ffffffff1642615b68565b9050805f036138d4575f91505090565b60da54613918908290613904906138f2906224ea009060ff16615b7b565b60dc546001600160801b031690613894565b61390e9084615b1d565b60d5549190613876565b91505090565b611cb481336152f6565b5f6139316138a8565b90508060d55f8282546139449190615b68565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a1e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a4d57505f919050565b680755bf798b4a1bf1e58212613a61575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156123fb575f80fd5b60e354600160a01b900460ff16156123fb5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613bef6224ea0086615e25565b15613bfc57506001613c4f565b428511613c0b57506002613c4f565b613c1b60ff85166224ea00615b7b565b613c286224ea0042615e25565b613c329042615b68565b613c3c9190615b1d565b851115613c4b57506004613c4f565b5060035b826004811115613c6157613c61615e38565b816004811115613c7357613c73615e38565b14158015613ca35750816004811115613c8e57613c8e615e38565b816004811115613ca057613ca0615e38565b14155b15613d74575f826004811115613cbb57613cbb615e38565b03613d0f57806004811115613cd257613cd2615e38565b836004811115613ce457613ce4615e38565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d2157613d21615e38565b836004811115613d3357613d33615e38565b836004811115613d4557613d45615e38565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d06565b5050505050565b60d45460dd545f919082613d8f8284613fad565b60da549091505f90613de19061107890613db690600160281b900463ffffffff1642615b68565b60db5460d3546301e13380916001600160a01b031690637c21fb1d9088906137e7908b908d90613fc5565b9050613ded8185615b1d565b9350613e0460e2548261389490919063ffffffff16565b945084613e118285615b1d565b613e1b9190615b68565b60dd5560d484905560da805463ffffffff60281b1916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611cb45760e154613ead906001600160a01b0316613ea88361386c565b614d04565b8060dd5f828254613ebe9190615b1d565b909155505050565b60038201545f9042831115613f1a5760028401544260038601819055613f0390613ef1908490615b68565b613efb8487615b68565b839190613876565b9250613f0f8382615b68565b600286015550613f3d565b828103613f29575f9150613f3d565b600384018390556002840180545f90915591505b5092915050565b81545f9081613f538483615b1d565b9050613f6c613f6683876001015461533c565b82614e9e565b613f769082615b68565b9455509192915050565b5f8115801590613f8f57508383115b613f99575f611c8d565b611c8d82613fa78686615b68565b9061534a565b5f825f03613fbb575f610f5c565b610f5c828461534a565b5f835f03613fd3575f611c8d565b611c8d84613fa78486615b1d565b5f610f5c8383670de0b6b3a7640000613a07565b336001600160a01b03831614611c1e576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461193a5761403982610fce565b6140439082615b68565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f036140805750600160201b8117610e1e565b63ffffffff8316808310156140fd575f6224ea0061409e8584615b68565b6140a89190615e4c565b90506140b681610100615b68565b85901c156140d75760405163293cc41f60e21b815260040160405180910390fd5b6140e2816020615b1d565b602086901c901b9450848417600160201b1792505050610e1e565b5f6224ea0061410c8386615b68565b6141169190615e4c565b905060df81111561413a5760405163293cc41f60e21b815260040160405180910390fd5b614145816020615b1d565b6001901b851792505050610e1e565b5f8061416b60e2548461389490919063ffffffff16565b905061417681613e89565b610f5c8184615b68565b5f8082156141b4576141af61419d6141978761535e565b85614e9e565b6141a79085615b68565b859085613876565b6141b6565b5f5b90506141c28185615b68565b9150935093915050565b805f036141d65750565b60e254156141e757611cb481613e89565b8060d55f828254613ebe9190615b1d565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806110fd575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142ea576142c68382615b68565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614311908490615b68565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615fa0833981519152906143589087815260200190565b60405180910390a3506001949350505050565b614375828261247d565b611c1e575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f6143fc8661535e565b905080156144385761441d6144118683614e9e565b60408801519083613876565b92506144298385613894565b91506144358284615b68565b92505b50935093915050565b815460018301545f91906144558482615b1d565b60018601556118516144678383614e9e565b6141979084615b68565b5f6040516323b872dd60e01b5f526001600160a01b0385166004526001600160a01b0384166024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d74575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144fa9190615e5f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61456c828261247d565b15611c1e575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145e95760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906146018289613ec6565b905061460e611160613d7b565b8060dd5f82825461461f9190615b1d565b90915550505f88815260d0602090815260408083206001600160a01b0389168452825280832081518083019092528054808352600190910154928201839052909291614675918b9161467091615b1d565b614e9e565b6040805180820190915283518152602080850151908201529091505f9061469c9083614f9e565b5160e3549091506001600160a01b0316801561470c57604051636c912dad60e01b81526001600160a01b03821690636c912dad906146de908c906004016158da565b5f604051808303815f87803b1580156146f5575f80fd5b505af1158015614707573d5f803e3d5ffd5b505050505b8b4210156147d45760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147549186906143f0565b90925090506147638183615b1d565b886002015f8282546147759190615b68565b909155505089156147a8578060d55f8282546147919190615b1d565b909155506147a190508286615b68565b98506147cd565b6147b28183615b1d565b60d55f8282546147c29190615b1d565b925050819055508498505b505061481b565b60d6546147ef906147e58e42615b68565b6138519190615b7b565b6147f99084615b1d565b96506148058388615b68565b60d55f8282546148159190615b1d565b90915550505b8987111561483c57604051632c1b6b4160e21b815260040160405180910390fd5b6148468683614e7f565b60d35f8282546148569190615b68565b909155506148669050848461503c565b5060208401518451175f036148c2575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d2909252909120908101546148b7908e614eb3565b6001909101556148f2565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a46149438c6141f8565b50505050505095945050505050565b61495a61537c565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516139fd91906158da565b60e3545f9081906001600160a01b03168015614a0457604051636c912dad60e01b81526001600160a01b03821690636c912dad906149d69087906004016158da565b5f604051808303815f87803b1580156149ed575f80fd5b505af11580156149ff573d5f803e3d5ffd5b505050505b614a0f611160613d7b565b6001600160a01b0384165f90815260d2602052604090206002810154614a358782614e9e565b9350614a4084611cf6565b9450845f03614a625760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a739190615b68565b90915550614a8390508482615b68565b82600201819055508360df5f828254614a9c9190615b68565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614b115760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e16ee72090614b5f9087903090600401615d9b565b5f6040518083038186803b158015614b75575f80fd5b505afa158015614b87573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bf857604051630149e46f60e01b81526001600160a01b03821690630149e46f90614bca9086906004016158da565b5f604051808303815f87803b158015614be1575f80fd5b505af1158015614bf3573d5f803e3d5ffd5b505050505b5f614c0283610fce565b9050614c0e838261538a565b614c188482615403565b60408051848152602081018390526001600160a01b03808716929088169133915f80516020615f60833981519152910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c9591815260200190565b60405180910390a3614ca56139a1565b61280d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614246565b614ce1610fed565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d7057604051630149e46f60e01b81526001600160a01b03821690630149e46f90614d429086906004016158da565b5f604051808303815f87803b158015614d59575f80fd5b505af1158015614d6b573d5f803e3d5ffd5b505050505b61193a838361546a565b614d82613ba7565b614d8a613bb6565b614d92614cd9565b5f614d9b613d7b565b90505f614da6613928565b9050614db28482615b1d565b60dd5f828254614dc29190615b1d565b90915550614dd1905082613e89565b6110fd6139a1565b614e037f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361247d565b158015614e245750614e225f80516020615f808339815191523361247d565b155b156123fb57604051631d006fdb60e31b815260040160405180910390fd5b614e4a613ba7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586149873390565b815460018301545f9190614e938483615b68565b855561185161446783835b5f818310614eac5781610f5c565b5090919050565b5f821580614ec6575081600160201b1783145b15614ed257505f610e1e565b63ffffffff8316808303614f4057602184901c60015b60018216158015614ef857508115155b15614f0957600191821c9101614ee8565b6020614f158282615b1d565b9690961c90951b9485614f2b6224ea0083615b7b565b614f359087615b1d565b179350505050610e1e565b6224ea00614f4e8285615b68565b614f589190615e4c565b614f63906020615b1d565b6001901b198416915050610e1e565b5f54610100900460ff166123fb575f80fd5b5f54610100900460ff16614f96575f80fd5b6123fb6154b9565b604080518082019091525f8082526020820152825160208401515f91614fc8916132939082615b1d565b8085529050614fd78184615b68565b6020850152509192915050565b815460018301545f919082614ff98583615b68565b90506150058184614e9e565b61500f8385614e9e565b6150199190615b68565b60019096015550929392505050565b5f610f5c83670de0b6b3a764000084613876565b604080518082019091525f8082526020820152602083015183515f9161506191615b1d565b90505f61506e8483615b68565b855190915061507f90829084613876565b80865261508c9082615b68565b602086015250929392505050565b335f90815260cc60205260408120805483919083906150ba908490615b68565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615fa083398151915290610fbd9086815260200190565b5f61510784610fce565b9050336001600160a01b03831614615174576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151725761514e8282615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61517e848261538a565b6151888282615403565b60408051858152602081018390526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614246565b5f336001600160a01b03831614615260576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461525e5761523a8582615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b615269846121f0565b9050805f03615276575f80fd5b615280818561538a565b61528a8285615403565b60408051828152602081018690526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614246565b615300828261247d565b611c1e5761530d816154d7565b6153188360206154e9565b604051602001615329929190615ee7565b6040516020818303038152906040525f80fd5b5f818311614eac5781610f5c565b5f610f5c83670de0b6b3a764000084613a07565b805160208201515f91906153728282614e9e565b611c8d9083615b68565b60975460ff166123fb575f80fd5b615392613ba7565b61539a614cd9565b6153a5611160613d7b565b5f6153ae613928565b90505f838260dd546153c09190615b1d565b6153ca9190615b68565b90508060d45460d3546153dd9190615b1d565b11156153fb57604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc60205260408120805483929061542a908490615b68565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615fa0833981519152906020015b60405180910390a35050565b8060cb5f82825461547b9190615b1d565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615fa0833981519152910161545e565b5f54610100900460ff166154cb575f80fd5b6097805460ff19169055565b6060610e1e6001600160a01b03831660145b60605f6154f7836002615b7b565b615502906002615b1d565b6001600160401b0381111561551957615519615bee565b6040519080825280601f01601f191660200182016040528015615543576020820181803683370190505b509050600360fc1b815f8151811061555d5761555d615f36565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061558b5761558b615f36565b60200101906001600160f81b03191690815f1a9053505f6155ad846002615b7b565b6155b8906001615b1d565b90505b600181111561562f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106155ec576155ec615f36565b1a60f81b82828151811061560257615602615f36565b60200101906001600160f81b03191690815f1a90535060049490941c9361562881615f4a565b90506155bb565b508315610f5c575f80fd5b6001600160a01b0381168114611cb4575f80fd5b5f6020828403121561565e575f80fd5b8135610f5c8161563a565b5f60208284031215615679575f80fd5b81356001600160e01b031981168114610f5c575f80fd5b80356001600160801b03811681146156a6575f80fd5b919050565b5f602082840312156156bb575f80fd5b610f5c82615690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615709575f80fd5b5035919050565b5f8060408385031215615721575f80fd5b823561572c8161563a565b946020939093013593505050565b5f8083601f84011261574a575f80fd5b5081356001600160401b03811115615760575f80fd5b602083019150836020828501011115612367575f80fd5b5f8060208385031215615788575f80fd5b82356001600160401b0381111561579d575f80fd5b6157a98582860161573a565b90969095509350505050565b5f805f805f60a086880312156157c9575f80fd5b85359450602086013593506040860135925060608601356157e98161563a565b915060808601356157f98161563a565b809150509295509295909350565b5f805f60608486031215615819575f80fd5b83356158248161563a565b925060208401356158348161563a565b929592945050506040919091013590565b803560ff811681146156a6575f80fd5b5f60208284031215615865575f80fd5b610f5c82615845565b5f806040838503121561587f575f80fd5b8235915060208301356158918161563a565b809150509250929050565b5f805f80608085870312156158af575f80fd5b84359350602085013592506040850135915060608501356158cf8161563a565b939692955090935050565b6001600160a01b0391909116815260200190565b6001600160801b0391909116815260200190565b5f805f60608486031215615914575f80fd5b833561591f8161563a565b92506020840135915060408401356159368161563a565b809150509250925092565b5f8060408385031215615952575f80fd5b50508035926020909101359150565b5f60208284031215615971575f80fd5b81358015158114610f5c575f80fd5b5f805f805f805f805f806101208b8d03121561599a575f80fd5b8a356001600160401b038111156159af575f80fd5b6159bb8d828e0161573a565b909b5099506159ce905060208c01615845565b97506159dc60408c01615690565b965060608b01356159ec8161563a565b955060808b0135945060a08b01359350615a0860c08c01615690565b999c989b50969995989497939650919460e0810135936101009091013592509050565b5f805f60608486031215615a3d575f80fd5b833592506020840135615a4f8161563a565b915060408401356159368161563a565b5f805f805f805f60e0888a031215615a75575f80fd5b8735615a808161563a565b96506020880135615a908161563a565b95506040880135945060608801359350615aac60808901615845565b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215615ada575f80fd5b8235615ae58161563a565b915060208301356158918161563a565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610e1e57610e1e615b09565b600181811c90821680615b4457607f821691505b602082108103615b6257634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610e1e57610e1e615b09565b8082028115828204841417610e1e57610e1e615b09565b5f600160ff1b8201615ba657615ba6615b09565b505f0390565b8181035f831280158383131683831282161715613f3d57613f3d615b09565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f82111561193a57805f5260205f20601f840160051c81016020851015615c275750805b601f840160051c820191505b81811015613d74575f8155600101615c33565b81516001600160401b03811115615c5f57615c5f615bee565b615c7381615c6d8454615b30565b84615c02565b6020601f821160018114615ca5575f8315615c8e5750848201515b5f19600385901b1c1916600184901b178455613d74565b5f84815260208120601f198516915b82811015615cd45787850151825560209485019460019092019101615cb4565b5084821015615cf157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b038281168282160390811115610e1e57610e1e615b09565b94855260ff93909316602085015260408401919091526060830152608082015260a00190565b5f60208284031215615d73575f80fd5b5051919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b5f8060408385031215615e14575f80fd5b505080516020909101519092909150565b5f82615e3357615e33615af5565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615e5a57615e5a615af5565b500490565b5f808354615e6c81615b30565b600182168015615e835760018114615e9857615ec5565b60ff1983168652811515820286019350615ec5565b865f5260205f205f5b83811015615ebd57815488820152600190910190602001615ea1565b505081860193505b509195945050505050565b5f81518060208401855e5f93019283525090919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81525f615f126017830185615ed0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526118516011820185615ed0565b634e487b7160e01b5f52603260045260245ffd5b5f81615f5857615f58615b09565b505f19019056fefbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122005ec196d152ea67004b2106a9e8456d6fce9e4ca698150d3a643ce4c0c94880d64736f6c634300081a0033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106104c1575f3560e01c80636e76fc8f11610283578063b2a02ff111610168578063d5164184116100e0578063e63ab1e91161009a578063e63ab1e914610c98578063e94b3c2114610cac578063eee8c9e014610cb5578063ef8b30f714610cbd578063f3fdb15a14610cd0578063fb0fc4c314610ce3578063fea45d9414610cfa575f80fd5b8063d516418414610c04578063d547741f14610c17578063d6b7494f14610c2a578063d905777e14610c33578063dd62ed3e14610c5b578063e00b262514610c85575f80fd5b8063b2a02ff114610af7578063b3d7f6b914610b0a578063b460af9414610b1d578063ba08765214610b30578063bee36bb314610b43578063bf722ca214610b56578063c63d75b6146107ae578063c6e6f59214610b69578063ccfd8b1114610b7c578063ce96cb7714610bad578063d2681a0b14610bc0578063d505accf14610bf1575f80fd5b806391d14854116101fb57806391d1485414610a32578063926bb63314610a4557806394bf804d14610a5857806395d89b4114610a6b57806397bce8d014610a73578063a05a091a14610a86578063a16a885014610a99578063a1bab44714610aae578063a1e8f02b14610ac1578063a217fddf14610aca578063a9059cbb14610ad1578063acb7081514610ae4575f80fd5b80636e76fc8f146109325780636eb9ffeb1461095957806370a082311461098557806378007e23146109a45780637ad226dc146109b75780637e932d32146109ca5780637ecebe00146109dd5780638456cb59146109fc5780638a1baa4614610a045780638bcd401614610a0d5780638c3cba5a14610a205780638d0e5f0214610a29575f80fd5b8063313ce567116103a95780634322b714116103215780634322b714146107d557806347dffde0146107fc5780634914c0081461080f5780634cdad506146108225780634e7c5059146108355780635c975abb146108895780635cc2ef83146108945780635e5c06e2146108a757806361d027b3146108f057806366601032146109035780636bb65f531461090c5780636e553f651461091f575f80fd5b8063313ce567146106c657806333eeb147146106ed57806334f7d1f2146107015780633644e5151461071457806336568abe1461071c57806338d52e0f1461072f5780633aa18d6f146107635780633c6f317f1461076c5780633ec045a61461077f5780633f4ba83a146107a6578063402d267d146107ae57806342da42bf146107c2575f80fd5b8063137001011161043c57806313700101146105e557806318160ddd146105f85780631a5b9e62146106015780631a90f186146106145780631d43b30b1461061d57806323b872dd14610630578063248a9ca31461064357806325fc07a91461066557806328acf2cf146106845780632c5dcc77146106975780632e0af008146106aa5780632f2ff15d146106b3575f80fd5b8063014a296f146104c557806301e1d114146104f257806301ffc9a714610508578063022d8af51461052b5780630539fa8c1461054057806306fdde031461054957806307a2d13a1461055e578063095ea7b3146105715780630a28a477146105845780630ab69be8146105975780630e52dbec146105be5780630f2b75aa146105dd575b5f80fd5b6104d86104d336600461564e565b610d0d565b604080519283526020830191909152015b60405180910390f35b6104fa610d42565b6040519081526020016104e9565b61051b610516366004615669565b610dee565b60405190151581526020016104e9565b61053e6105393660046156ab565b610e24565b005b6104fa60d85481565b610551610eab565b6040516104e991906156c4565b6104fa61056c3660046156f9565b610f37565b61051b61057f366004615710565b610f63565b6104fa6105923660046156f9565b610fce565b6104d86105a53660046156f9565b5f90815260d16020526040902080546001909101549091565b60da546105cb9060ff1681565b60405160ff90911681526020016104e9565b6104fa610fed565b61053e6105f3366004615777565b611092565b6104fa60cb5481565b6104fa61060f3660046157b5565b611103565b6104fa60d45481565b6104fa61062b36600461564e565b6115f3565b61051b61063e366004615807565b6116f3565b6104fa6106513660046156f9565b5f9081526065602052604090206001015490565b6104fa6106733660046156f9565b5f90815260d1602052604090205490565b61053e610692366004615855565b61185a565b61053e6106a5366004615710565b6118a6565b6104fa60dd5481565b61053e6106c136600461586e565b611916565b6105cb7f000000000000000000000000000000000000000000000000000000000000000081565b60e35461051b90600160a01b900460ff1681565b6104fa61070f36600461589c565b61193f565b6104fa611ba6565b61053e61072a36600461586e565b611c00565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b6040516104e991906158da565b6104fa60d95481565b6104fa61077a36600461589c565b611c22565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b61053e611c95565b6104fa6107bc36600461564e565b505f1990565b61053e6107d03660046156f9565b611cb7565b60dc546107ef90600160801b90046001600160801b031681565b6040516104e991906158ee565b6104fa61080a3660046156f9565b611cf6565b6104fa61081d366004615902565b611d14565b6104fa6108303660046156f9565b6121f0565b6108696108433660046156f9565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016104e9565b60975460ff1661051b565b61053e6108a2366004615941565b6121fa565b6108d56108b536600461564e565b60d26020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016104e9565b60e154610756906001600160a01b031681565b6104fa60e25481565b60e354610756906001600160a01b031681565b6104fa61092d36600461586e565b612254565b6104fa7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da5461097090600160281b900463ffffffff1681565b60405163ffffffff90911681526020016104e9565b6104fa61099336600461564e565b60cc6020525f908152604090205481565b6104fa6109b23660046156f9565b6122fa565b6104d86109c536600461586e565b612311565b61053e6109d8366004615961565b61236e565b6104fa6109eb36600461564e565b60ce6020525f908152604090205481565b61053e6123eb565b6104fa60d55481565b61053e610a1b36600461564e565b6123fd565b6104fa60d35481565b6104fa60df5481565b61051b610a4036600461586e565b61247d565b61053e610a5336600461564e565b6124a7565b6104fa610a6636600461586e565b612815565b6105516128b0565b61053e610a81366004615980565b6128bd565b6104fa610a943660046157b5565b612a1c565b60da5461097090610100900463ffffffff1681565b61053e610abc3660046156f9565b612e41565b6104fa60d75481565b6104fa5f81565b61051b610adf366004615710565b612e80565b6104d8610af236600461586e565b612fdd565b61053e610b05366004615807565b612ff9565b6104fa610b183660046156f9565b61300d565b6104fa610b2b366004615a2b565b613023565b6104fa610b3e366004615a2b565b61312b565b61053e610b5136600461564e565b613228565b6104fa610b643660046156f9565b61327c565b6104fa610b773660046156f9565b61329b565b6104d8610b8a36600461586e565b60cf60209081525f92835260408084209091529082529020805460019091015482565b6104fa610bbb36600461564e565b6132b2565b6104d8610bce36600461586e565b60d060209081525f92835260408084209091529082529020805460019091015482565b61053e610bff366004615a5f565b6132d3565b6104fa610c12366004615a2b565b613498565b61053e610c2536600461586e565b613713565b6104fa60d65481565b6104fa610c4136600461564e565b6001600160a01b03165f90815260cc602052604090205490565b6104fa610c69366004615ac9565b60cd60209081525f928352604080842090915290825290205481565b61053e610c933660046156ab565b613737565b6104fa5f80516020615f8083398151915281565b6104fa60de5481565b6104fa61378b565b6104fa610ccb3660046156f9565b61386c565b60db54610756906001600160a01b031681565b60da5461097090600160481b900463ffffffff1681565b60dc546107ef906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610d3090610f37565b610d39846115f3565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610db4575f81815260d160205260409020600381015480831115610da857824210610d8e578160020154610da3565b6002820154610da39042839003838603613876565b860195505b50506224ea0001610d5c565b50610dd760e254670de0b6b3a76400000360d454610dd061378b565b0390613894565b610ddf6138a8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610e1e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610e2e8161391e565b610e36613928565b60dd5f828254610e469190615b1d565b90915550610e5490506139a1565b60dc80546001600160801b0319166001600160801b0384161790556040517f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e90610e9f9084906158ee565b60405180910390a15050565b60c98054610eb890615b30565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee490615b30565b8015610f2f5780601f10610f0657610100808354040283529160200191610f2f565b820191905f5260205f20905b815481529060010190602001808311610f1257829003601f168201915b505050505081565b60cb545f908015610f5a57610f55610f4d610d42565b849083613876565b610f5c565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fbd9086815260200190565b60405180910390a350600192915050565b60cb545f908015610f5a57610f5581610fe5610d42565b859190613a07565b60dd5460de545f9190828183106110065760d85461100a565b60d9545b60da549091505f906110459061102d90600160481b900463ffffffff1642615b68565b6110379084615b7b565b61104090615b92565b613a34565b61105790670de0b6b3a7640000615bac565b90506110638185613894565b61107f61107883670de0b6b3a7640000615b68565b8590613894565b6110899190615b1d565b94505050505090565b5f61109c8161391e565b82826040516020016110af929190615bcb565b60405160208183030381529060405260c990816110cc9190615c46565b5082826040516020016110e0929190615d00565b60405160208183030381529060405260ca90816110fd9190615c46565b50505050565b5f61110c613ba7565b611114613bb6565b845f036111345760405163774257f760e01b815260040160405180910390fd5b60da5461114890879060ff1660035f613be1565b5f86815260d160205260409020611165611160613d7b565b613e89565b61116f8188613ec6565b60dd5f82825461117f9190615b1d565b909155505060e3546001600160a01b031680156111f057604051636c912dad60e01b81526001600160a01b03821690636c912dad906111c29087906004016158da565b5f604051808303815f87803b1580156111d9575f80fd5b505af11580156111eb573d5f803e3d5ffd5b505050505b5f6111fb8389613f44565b9050801561127f575f8160d3546112129190615b1d565b60dc549091506112509061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b60dd54906001600160801b0316613894565b60d45461125d9083615b1d565b111561127b57604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061128a610fed565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff166112d88a600101548b5f015489613f80565b6112e28888613fad565b6112ef898960d354613fc5565b6040518663ffffffff1660e01b815260040161130f959493929190615d3d565b602060405180830381865afa15801561132a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061134e9190615d63565b905061137361136c611360428f615b68565b83906301e13380613876565b8c90613fe1565b935050505080886113849190615b1d565b9350868411156113a757604051632c1b6b4160e21b815260040160405180910390fd5b6113b18585613ff5565b5f89815260d0602090815260408083206001600160a01b038916845290915281208054909103611408576001600160a01b0386165f90815260d2602052604090206001810154611401908c61406b565b6001909101555b5f8061144b61141685614154565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614180565b91509150815f1461146f5781866002015f8282546114699190615b1d565b90915550505b611478816141cc565b60405180604001604052808c855f01546114929190615b1d565b81526020018585600101546114a79190615b1d565b90525f8d815260d0602090815260408083206001600160a01b03808e168086529184529382902085518155949092015160019094019390935591519194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139061151d9033908e908890615d7a565b60405180910390a461152d6139a1565b611536896141f8565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906115849030908990600401615d9b565b5f604051808303815f87803b15801561159b575f80fd5b505af11580156115ad573d5f803e3d5ffd5b506115e79250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614246565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b81156116c85760018216156116ad575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916116689190615b1d565b90506116748188615b1d565b9650824211156116aa5761169d8561168c8542615b68565b6116969190615b7b565b8290613894565b6116a79088615b1d565b96505b50505b60019190911c906116c16224ea0082615b1d565b9050611624565b600284015480156116e9576116dc81611cf6565b6116e69087615b1d565b95505b5050505050919050565b5f6116fc613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53086611736866121f0565b6040518463ffffffff1660e01b815260040161175493929190615db5565b5f6040518083038186803b15801561176a575f80fd5b505afa15801561177c573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561184657604051630149e46f60e01b81526001600160a01b03821690630149e46f906117bf9088906004016158da565b5f604051808303815f87803b1580156117d6575f80fd5b505af11580156117e8573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f91506118189087906004016158da565b5f604051808303815f87803b15801561182f575f80fd5b505af1158015611841573d5f803e3d5ffd5b505050505b611851858585614291565b95945050505050565b5f6118648161391e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610e9f565b5f6118b08161391e565b6118bb611160613d7b565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119308161391e565b61193a838361436b565b505050565b5f611948613ba7565b611950613bb6565b835f03611970576040516356316e8760e01b815260040160405180910390fd5b60da5461198490869060ff1660035f613be1565b5f85815260d1602052604081209061199c8288613ec6565b90506119a9611160613d7b565b8060dd5f8282546119ba9190615b1d565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f9182916119ff918a906143f0565b9092509050611a0e8289615b1d565b945086851015611a3157604051632c1b6b4160e21b815260040160405180910390fd5b611a3b8489614441565b60d35f828254611a4b9190615b68565b90915550611a5b90508183615b1d565b846002015f828254611a6d9190615b68565b925050819055508060d55f828254611a859190615b1d565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611ada576001600160a01b0387165f90815260d2602052604090208054611ad7908c61406b565b90555b88815f015f828254611aec9190615b1d565b9250508190555082816001015f828254611b069190615b1d565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611b5b6139a1565b611b648a6141f8565b611b996001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614471565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611bdb57611bd66144c9565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611c14575f80fd5b611c1e8282614562565b5050565b5f611c2b613ba7565b60da54611c4090869060ff1660036002613be1565b611c4e8585858560016145c8565b9050611c586139a1565b611c8d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b949350505050565b5f80516020615f80833981519152611cac8161391e565b611cb4614952565b50565b5f611cc18161391e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610e9f565b60df545f908015610f5a57610f55611d0c61378b565b849083613a07565b5f611d1d613ba7565b6001600160a01b0384163303611d46576040516344511af160e01b815260040160405180910390fd5b611d4e613928565b60dd5f828254611d5e9190615b1d565b909155505060405163042dcf6b60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890611db5903090869089908990600401615dd9565b602060405180830381865afa158015611dd0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df49190615d63565b9250825f03611e165760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611e5057508515155b15611f5d576001821615611f42575f81421015611e8757611e748288898b5f6145c8565b9050611e808188615b68565b9650611f34565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611eb99190615b1d565b9150505f611ee060d6548542611ecf9190615b68565b611ed99190615b7b565b8390613894565b611eea9083615b1d565b9050888111611ef95788611f04565b611f04898383613876565b9250825f03611f15575f9850611f31565b611f2284848b8d5f6145c8565b9250611f2e838a615b68565b98505b50505b611f3e8186615b1d565b9450505b60019190911c90611f566224ea0082615b1d565b9050611e42565b50508315801590611f715750600281015415155b15611fa6575f611f808561327c565b90508015611fa4575f611f938288614994565b509050611fa08185615b1d565b9350505b505b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1b003130878a886040518563ffffffff1660e01b8152600401611ffa9493929190615dd9565b6040805180830381865afa158015612014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120389190615e03565b915091508160d55f82825461204d9190615b1d565b90915550612094905033306120628588615b1d565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614471565b306001600160a01b038616036120b5576120b030338984614af1565b61211a565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906120e59033908b908690600401615db5565b5f604051808303815f87803b1580156120fc575f80fd5b505af115801561210e573d5f803e3d5ffd5b5050505061211a6139a1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906121b9908a906004016158da565b5f604051808303815f87803b1580156121d0575f80fd5b505af11580156121e2573d5f803e3d5ffd5b505050505050509392505050565b5f610e1e82610f37565b5f6122048161391e565b61220c614cd9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61225e8361386c565b9050805f0361226b575f80fd5b6122a06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614471565b6122aa8282614d04565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8382614d7a565b60df545f908015610f5a57610f5581610fe561378b565b5f8061231b613ba7565b6123258484614994565b90925090506123326139a1565b6123676001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614471565b9250929050565b5f6123788161391e565b60e35460ff600160a01b90910416151582151514611c1e5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee698906123df90851515815260200190565b60405180910390a25050565b6123f3614dd9565b6123fb614e42565b565b5f6124078161391e565b60db546001600160a01b03161561242357612423611160613d7b565b60db80546001600160a01b0319166001600160a01b0384161790556124466139a1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146124f0576040516317568c8f60e21b815260040160405180910390fd5b6124f8613928565b60dd5f8282546125089190615b1d565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b811561276c576001821615612751575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916125849190615b1d565b905080861061274e5760e3546001600160a01b031680156125f957604051636c912dad60e01b81526001600160a01b03821690636c912dad906125cb908c906004016158da565b5f604051808303815f87803b1580156125e2575f80fd5b505af11580156125f4573d5f803e3d5ffd5b505050505b6126038288615b68565b965061260f8287615b1d565b83545f86815260d1602052604081209298509161262b91614e7f565b905080156126c4578060d35f8282546126449190615b68565b909155505083545f906126739061265b9084614e9e565b5f88815260d160205260409020600201549084613876565b90508060d15f8881526020019081526020015f206002015f8282546126989190615b68565b925050819055508060d55f8282546126b09190615b1d565b909155506126c09050818a615b1d565b9850505b5f85815260d0602090815260408083206001600160a01b038e16845290915281208181556001908101919091558901546126fe9086614eb3565b60018a015560408051848152602081018590526001600160a01b038c1691339188917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a450505b50505b60019190911c906127656224ea0082615b1d565b9050612540565b60028501541580159061278957506127838461327c565b93508315155b156127aa575f6127998588614994565b5090506127a68185615b1d565b9350505b8215612805578260d55f8282546127c19190615b68565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b61280d6139a1565b505050505050565b5f61281f8361300d565b90506128566001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b6128608284614d04565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8184614d7a565b60ca8054610eb890615b30565b5f54610100900460ff16158080156128db57505f54600160ff909116105b806128f45750303b1580156128f457505f5460ff166001145b6128fc575f80fd5b5f805460ff19166001179055801561291d575f805461ff0019166101001790555b612925614f72565b61292d614f84565b60da805468ffffffffffffffff0019166101004263ffffffff1690810263ffffffff60281b191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129805f3361436b565b61298a8b8b611092565b6129938961185a565b61299c88610e24565b6129a5876123fd565b6129ae86612e41565b6129b785611cb7565b6129c084613737565b6129ca83836121fa565b8015612a0f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a25613ba7565b845f03612a455760405163b8cb621960e01b815260040160405180910390fd5b60da54612a5a90879060ff1660036002613be1565b5f86815260d160205260409020612a72611160613d7b565b612a7c8188613ec6565b60dd5f828254612a8c9190615b1d565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612ad69190615b1d565b871115612af15760208101518151612aee9190615b1d565b96505b6040805180820190915281518152602080830151908201525f90612b2190612b19908a614f9e565b518490614fe4565b60d354612b2e9190615b1d565b905060dd5460d45482612b419190615b1d565b1115612b5f57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612c71575f612b73610fed565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bc78a600101548b5f01548a613f80565b612bd18989613fad565b612bdc8a8a8a613fc5565b6040518663ffffffff1660e01b8152600401612bfc959493929190615d3d565b602060405180830381865afa158015612c17573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c3b9190615d63565b9050612c66612c4d611360428f615b68565b612c5f90670de0b6b3a7640000615b1d565b8c90615028565b965050505050612c75565b8692505b85831015612c9657604051632c1b6b4160e21b815260040160405180910390fd5b612ca08484613ff5565b5f80612cec612cb7612cb2878c615b68565b614154565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614180565b9150915081846002015f828254612d039190615b1d565b90915550612d129050816141cc565b612d1c838a61503c565b5060208301518351175f03612d6f575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612d68908c614eb3565b9055612d9f565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b856001600160a01b0316876001600160a01b03168b7fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c338d8a604051612de793929190615d7a565b60405180910390a4612df76139a1565b612e008a6141f8565b612e346001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614246565b5050505095945050505050565b5f612e4b8161391e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610e9f565b5f612e89613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612ec3866121f0565b6040518463ffffffff1660e01b8152600401612ee193929190615db5565b5f6040518083038186803b158015612ef7575f80fd5b505afa158015612f09573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015612fd357604051630149e46f60e01b81526001600160a01b03821690630149e46f90612f4c9033906004016158da565b5f604051808303815f87803b158015612f63575f80fd5b505af1158015612f75573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f9150612fa59087906004016158da565b5f604051808303815f87803b158015612fbc575f80fd5b505af1158015612fce573d5f803e3d5ffd5b505050505b611c8d848461509a565b5f80612fe7613ba7565b612325612ff38561327c565b84614994565b613001613ba7565b61193a33848484614af1565b60cb545f908015610f5a57610f55611d0c610d42565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db59061307590309086908990600401615db5565b5f6040518083038186803b15801561308b575f80fd5b505afa15801561309d573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561310e57604051630149e46f60e01b81526001600160a01b03821690630149e46f906130e09086906004016158da565b5f604051808303815f87803b1580156130f7575f80fd5b505af1158015613109573d5f803e3d5ffd5b505050505b6131198585856150fd565b91506131236139a1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53084613166886121f0565b6040518463ffffffff1660e01b815260040161318493929190615db5565b5f6040518083038186803b15801561319a575f80fd5b505afa1580156131ac573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561321d57604051630149e46f60e01b81526001600160a01b03821690630149e46f906131ef9086906004016158da565b5f604051808303815f87803b158015613206575f80fd5b505af1158015613218573d5f803e3d5ffd5b505050505b6131198585856151f4565b5f6132328161391e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f908015610f5a57610f558161329361378b565b859190613876565b60cb545f908015610f5a57610f5581613293610d42565b6001600160a01b0381165f90815260cc6020526040812054610e1e90610f37565b428410156132df575f80fd5b5f60016132ea611ba6565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156133f2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134285750876001600160a01b0316816001600160a01b0316145b613430575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134a1613ba7565b6134a9613bb6565b835f036134c95760405163774257f760e01b815260040160405180910390fd5b6134d38285613ff5565b60e3546001600160a01b0316801561353f57604051636c912dad60e01b81526001600160a01b03821690636c912dad906135119086906004016158da565b5f604051808303815f87803b158015613528575f80fd5b505af115801561353a573d5f803e3d5ffd5b505050505b61354a611160613d7b565b613553856122fa565b91505f8560d4546135649190615b1d565b60d481905560dc549091506135959061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b8160d3546135a39190615b1d565b11156135c157604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135d29190615b1d565b90915550506001600160a01b0384165f90815260d2602052604081206002018054859290613601908490615b1d565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136596139a1565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906136a79030908890600401615d9b565b5f604051808303815f87803b1580156136be575f80fd5b505af11580156136d0573d5f803e3d5ffd5b5061370a9250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614246565b50509392505050565b5f8281526065602052604090206001015461372d8161391e565b61193a8383614562565b5f6137418161391e565b60dc80546001600160801b03808516600160801b0291161790556040517fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90610e9f9084906158ee565b60d45460dd5460da545f929190839061385890613851906137b990600160281b900463ffffffff1642615b68565b60db546301e13380906001600160a01b0316637c21fb1d6137da888a613fad565b6137e7898b60d354613fc5565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613826573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061384a9190615d63565b9190613876565b8490613894565b90506138648184615b1d565b935050505090565b5f610e1e8261329b565b82820281151584158583048514171661388d575f80fd5b0492915050565b5f610f5c8383670de0b6b3a7640000613876565b60da545f9081906138c490610100900463ffffffff1642615b68565b9050805f036138d4575f91505090565b60da54613918908290613904906138f2906224ea009060ff16615b7b565b60dc546001600160801b031690613894565b61390e9084615b1d565b60d5549190613876565b91505090565b611cb481336152f6565b5f6139316138a8565b90508060d55f8282546139449190615b68565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a1e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a4d57505f919050565b680755bf798b4a1bf1e58212613a61575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156123fb575f80fd5b60e354600160a01b900460ff16156123fb5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613bef6224ea0086615e25565b15613bfc57506001613c4f565b428511613c0b57506002613c4f565b613c1b60ff85166224ea00615b7b565b613c286224ea0042615e25565b613c329042615b68565b613c3c9190615b1d565b851115613c4b57506004613c4f565b5060035b826004811115613c6157613c61615e38565b816004811115613c7357613c73615e38565b14158015613ca35750816004811115613c8e57613c8e615e38565b816004811115613ca057613ca0615e38565b14155b15613d74575f826004811115613cbb57613cbb615e38565b03613d0f57806004811115613cd257613cd2615e38565b836004811115613ce457613ce4615e38565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d2157613d21615e38565b836004811115613d3357613d33615e38565b836004811115613d4557613d45615e38565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d06565b5050505050565b60d45460dd545f919082613d8f8284613fad565b60da549091505f90613de19061107890613db690600160281b900463ffffffff1642615b68565b60db5460d3546301e13380916001600160a01b031690637c21fb1d9088906137e7908b908d90613fc5565b9050613ded8185615b1d565b9350613e0460e2548261389490919063ffffffff16565b945084613e118285615b1d565b613e1b9190615b68565b60dd5560d484905560da805463ffffffff60281b1916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611cb45760e154613ead906001600160a01b0316613ea88361386c565b614d04565b8060dd5f828254613ebe9190615b1d565b909155505050565b60038201545f9042831115613f1a5760028401544260038601819055613f0390613ef1908490615b68565b613efb8487615b68565b839190613876565b9250613f0f8382615b68565b600286015550613f3d565b828103613f29575f9150613f3d565b600384018390556002840180545f90915591505b5092915050565b81545f9081613f538483615b1d565b9050613f6c613f6683876001015461533c565b82614e9e565b613f769082615b68565b9455509192915050565b5f8115801590613f8f57508383115b613f99575f611c8d565b611c8d82613fa78686615b68565b9061534a565b5f825f03613fbb575f610f5c565b610f5c828461534a565b5f835f03613fd3575f611c8d565b611c8d84613fa78486615b1d565b5f610f5c8383670de0b6b3a7640000613a07565b336001600160a01b03831614611c1e576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461193a5761403982610fce565b6140439082615b68565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f036140805750600160201b8117610e1e565b63ffffffff8316808310156140fd575f6224ea0061409e8584615b68565b6140a89190615e4c565b90506140b681610100615b68565b85901c156140d75760405163293cc41f60e21b815260040160405180910390fd5b6140e2816020615b1d565b602086901c901b9450848417600160201b1792505050610e1e565b5f6224ea0061410c8386615b68565b6141169190615e4c565b905060df81111561413a5760405163293cc41f60e21b815260040160405180910390fd5b614145816020615b1d565b6001901b851792505050610e1e565b5f8061416b60e2548461389490919063ffffffff16565b905061417681613e89565b610f5c8184615b68565b5f8082156141b4576141af61419d6141978761535e565b85614e9e565b6141a79085615b68565b859085613876565b6141b6565b5f5b90506141c28185615b68565b9150935093915050565b805f036141d65750565b60e254156141e757611cb481613e89565b8060d55f828254613ebe9190615b1d565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806110fd575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142ea576142c68382615b68565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614311908490615b68565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615fa0833981519152906143589087815260200190565b60405180910390a3506001949350505050565b614375828261247d565b611c1e575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f6143fc8661535e565b905080156144385761441d6144118683614e9e565b60408801519083613876565b92506144298385613894565b91506144358284615b68565b92505b50935093915050565b815460018301545f91906144558482615b1d565b60018601556118516144678383614e9e565b6141979084615b68565b5f6040516323b872dd60e01b5f526001600160a01b0385166004526001600160a01b0384166024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d74575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144fa9190615e5f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61456c828261247d565b15611c1e575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145e95760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906146018289613ec6565b905061460e611160613d7b565b8060dd5f82825461461f9190615b1d565b90915550505f88815260d0602090815260408083206001600160a01b0389168452825280832081518083019092528054808352600190910154928201839052909291614675918b9161467091615b1d565b614e9e565b6040805180820190915283518152602080850151908201529091505f9061469c9083614f9e565b5160e3549091506001600160a01b0316801561470c57604051636c912dad60e01b81526001600160a01b03821690636c912dad906146de908c906004016158da565b5f604051808303815f87803b1580156146f5575f80fd5b505af1158015614707573d5f803e3d5ffd5b505050505b8b4210156147d45760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147549186906143f0565b90925090506147638183615b1d565b886002015f8282546147759190615b68565b909155505089156147a8578060d55f8282546147919190615b1d565b909155506147a190508286615b68565b98506147cd565b6147b28183615b1d565b60d55f8282546147c29190615b1d565b925050819055508498505b505061481b565b60d6546147ef906147e58e42615b68565b6138519190615b7b565b6147f99084615b1d565b96506148058388615b68565b60d55f8282546148159190615b1d565b90915550505b8987111561483c57604051632c1b6b4160e21b815260040160405180910390fd5b6148468683614e7f565b60d35f8282546148569190615b68565b909155506148669050848461503c565b5060208401518451175f036148c2575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d2909252909120908101546148b7908e614eb3565b6001909101556148f2565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a46149438c6141f8565b50505050505095945050505050565b61495a61537c565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516139fd91906158da565b60e3545f9081906001600160a01b03168015614a0457604051636c912dad60e01b81526001600160a01b03821690636c912dad906149d69087906004016158da565b5f604051808303815f87803b1580156149ed575f80fd5b505af11580156149ff573d5f803e3d5ffd5b505050505b614a0f611160613d7b565b6001600160a01b0384165f90815260d2602052604090206002810154614a358782614e9e565b9350614a4084611cf6565b9450845f03614a625760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a739190615b68565b90915550614a8390508482615b68565b82600201819055508360df5f828254614a9c9190615b68565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614b115760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e16ee72090614b5f9087903090600401615d9b565b5f6040518083038186803b158015614b75575f80fd5b505afa158015614b87573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bf857604051630149e46f60e01b81526001600160a01b03821690630149e46f90614bca9086906004016158da565b5f604051808303815f87803b158015614be1575f80fd5b505af1158015614bf3573d5f803e3d5ffd5b505050505b5f614c0283610fce565b9050614c0e838261538a565b614c188482615403565b60408051848152602081018390526001600160a01b03808716929088169133915f80516020615f60833981519152910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c9591815260200190565b60405180910390a3614ca56139a1565b61280d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614246565b614ce1610fed565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d7057604051630149e46f60e01b81526001600160a01b03821690630149e46f90614d429086906004016158da565b5f604051808303815f87803b158015614d59575f80fd5b505af1158015614d6b573d5f803e3d5ffd5b505050505b61193a838361546a565b614d82613ba7565b614d8a613bb6565b614d92614cd9565b5f614d9b613d7b565b90505f614da6613928565b9050614db28482615b1d565b60dd5f828254614dc29190615b1d565b90915550614dd1905082613e89565b6110fd6139a1565b614e037f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361247d565b158015614e245750614e225f80516020615f808339815191523361247d565b155b156123fb57604051631d006fdb60e31b815260040160405180910390fd5b614e4a613ba7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586149873390565b815460018301545f9190614e938483615b68565b855561185161446783835b5f818310614eac5781610f5c565b5090919050565b5f821580614ec6575081600160201b1783145b15614ed257505f610e1e565b63ffffffff8316808303614f4057602184901c60015b60018216158015614ef857508115155b15614f0957600191821c9101614ee8565b6020614f158282615b1d565b9690961c90951b9485614f2b6224ea0083615b7b565b614f359087615b1d565b179350505050610e1e565b6224ea00614f4e8285615b68565b614f589190615e4c565b614f63906020615b1d565b6001901b198416915050610e1e565b5f54610100900460ff166123fb575f80fd5b5f54610100900460ff16614f96575f80fd5b6123fb6154b9565b604080518082019091525f8082526020820152825160208401515f91614fc8916132939082615b1d565b8085529050614fd78184615b68565b6020850152509192915050565b815460018301545f919082614ff98583615b68565b90506150058184614e9e565b61500f8385614e9e565b6150199190615b68565b60019096015550929392505050565b5f610f5c83670de0b6b3a764000084613876565b604080518082019091525f8082526020820152602083015183515f9161506191615b1d565b90505f61506e8483615b68565b855190915061507f90829084613876565b80865261508c9082615b68565b602086015250929392505050565b335f90815260cc60205260408120805483919083906150ba908490615b68565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615fa083398151915290610fbd9086815260200190565b5f61510784610fce565b9050336001600160a01b03831614615174576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151725761514e8282615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61517e848261538a565b6151888282615403565b60408051858152602081018390526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614246565b5f336001600160a01b03831614615260576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461525e5761523a8582615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b615269846121f0565b9050805f03615276575f80fd5b615280818561538a565b61528a8285615403565b60408051828152602081018690526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614246565b615300828261247d565b611c1e5761530d816154d7565b6153188360206154e9565b604051602001615329929190615ee7565b6040516020818303038152906040525f80fd5b5f818311614eac5781610f5c565b5f610f5c83670de0b6b3a764000084613a07565b805160208201515f91906153728282614e9e565b611c8d9083615b68565b60975460ff166123fb575f80fd5b615392613ba7565b61539a614cd9565b6153a5611160613d7b565b5f6153ae613928565b90505f838260dd546153c09190615b1d565b6153ca9190615b68565b90508060d45460d3546153dd9190615b1d565b11156153fb57604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc60205260408120805483929061542a908490615b68565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615fa0833981519152906020015b60405180910390a35050565b8060cb5f82825461547b9190615b1d565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615fa0833981519152910161545e565b5f54610100900460ff166154cb575f80fd5b6097805460ff19169055565b6060610e1e6001600160a01b03831660145b60605f6154f7836002615b7b565b615502906002615b1d565b6001600160401b0381111561551957615519615bee565b6040519080825280601f01601f191660200182016040528015615543576020820181803683370190505b509050600360fc1b815f8151811061555d5761555d615f36565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061558b5761558b615f36565b60200101906001600160f81b03191690815f1a9053505f6155ad846002615b7b565b6155b8906001615b1d565b90505b600181111561562f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106155ec576155ec615f36565b1a60f81b82828151811061560257615602615f36565b60200101906001600160f81b03191690815f1a90535060049490941c9361562881615f4a565b90506155bb565b508315610f5c575f80fd5b6001600160a01b0381168114611cb4575f80fd5b5f6020828403121561565e575f80fd5b8135610f5c8161563a565b5f60208284031215615679575f80fd5b81356001600160e01b031981168114610f5c575f80fd5b80356001600160801b03811681146156a6575f80fd5b919050565b5f602082840312156156bb575f80fd5b610f5c82615690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615709575f80fd5b5035919050565b5f8060408385031215615721575f80fd5b823561572c8161563a565b946020939093013593505050565b5f8083601f84011261574a575f80fd5b5081356001600160401b03811115615760575f80fd5b602083019150836020828501011115612367575f80fd5b5f8060208385031215615788575f80fd5b82356001600160401b0381111561579d575f80fd5b6157a98582860161573a565b90969095509350505050565b5f805f805f60a086880312156157c9575f80fd5b85359450602086013593506040860135925060608601356157e98161563a565b915060808601356157f98161563a565b809150509295509295909350565b5f805f60608486031215615819575f80fd5b83356158248161563a565b925060208401356158348161563a565b929592945050506040919091013590565b803560ff811681146156a6575f80fd5b5f60208284031215615865575f80fd5b610f5c82615845565b5f806040838503121561587f575f80fd5b8235915060208301356158918161563a565b809150509250929050565b5f805f80608085870312156158af575f80fd5b84359350602085013592506040850135915060608501356158cf8161563a565b939692955090935050565b6001600160a01b0391909116815260200190565b6001600160801b0391909116815260200190565b5f805f60608486031215615914575f80fd5b833561591f8161563a565b92506020840135915060408401356159368161563a565b809150509250925092565b5f8060408385031215615952575f80fd5b50508035926020909101359150565b5f60208284031215615971575f80fd5b81358015158114610f5c575f80fd5b5f805f805f805f805f806101208b8d03121561599a575f80fd5b8a356001600160401b038111156159af575f80fd5b6159bb8d828e0161573a565b909b5099506159ce905060208c01615845565b97506159dc60408c01615690565b965060608b01356159ec8161563a565b955060808b0135945060a08b01359350615a0860c08c01615690565b999c989b50969995989497939650919460e0810135936101009091013592509050565b5f805f60608486031215615a3d575f80fd5b833592506020840135615a4f8161563a565b915060408401356159368161563a565b5f805f805f805f60e0888a031215615a75575f80fd5b8735615a808161563a565b96506020880135615a908161563a565b95506040880135945060608801359350615aac60808901615845565b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215615ada575f80fd5b8235615ae58161563a565b915060208301356158918161563a565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610e1e57610e1e615b09565b600181811c90821680615b4457607f821691505b602082108103615b6257634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610e1e57610e1e615b09565b8082028115828204841417610e1e57610e1e615b09565b5f600160ff1b8201615ba657615ba6615b09565b505f0390565b8181035f831280158383131683831282161715613f3d57613f3d615b09565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f82111561193a57805f5260205f20601f840160051c81016020851015615c275750805b601f840160051c820191505b81811015613d74575f8155600101615c33565b81516001600160401b03811115615c5f57615c5f615bee565b615c7381615c6d8454615b30565b84615c02565b6020601f821160018114615ca5575f8315615c8e5750848201515b5f19600385901b1c1916600184901b178455613d74565b5f84815260208120601f198516915b82811015615cd45787850151825560209485019460019092019101615cb4565b5084821015615cf157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b038281168282160390811115610e1e57610e1e615b09565b94855260ff93909316602085015260408401919091526060830152608082015260a00190565b5f60208284031215615d73575f80fd5b5051919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b5f8060408385031215615e14575f80fd5b505080516020909101519092909150565b5f82615e3357615e33615af5565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615e5a57615e5a615af5565b500490565b5f808354615e6c81615b30565b600182168015615e835760018114615e9857615ec5565b60ff1983168652811515820286019350615ec5565b865f5260205f205f5b83811015615ebd57815488820152600190910190602001615ea1565b505081860193505b509195945050505050565b5f81518060208401855e5f93019283525090919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81525f615f126017830185615ed0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526118516011820185615ed0565b634e487b7160e01b5f52603260045260245ffd5b5f81615f5857615f58615b09565b505f19019056fefbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122005ec196d152ea67004b2106a9e8456d6fce9e4ca698150d3a643ce4c0c94880d64736f6c634300081a0033", "storageLayout": { "storage": [ { - "astId": 543, + "astId": 416, "contract": "contracts/Market.sol:Market", "label": "_initialized", "offset": 0, @@ -3528,7 +2785,7 @@ "type": "t_uint8" }, { - "astId": 546, + "astId": 419, "contract": "contracts/Market.sol:Market", "label": "_initializing", "offset": 1, @@ -3536,7 +2793,7 @@ "type": "t_bool" }, { - "astId": 3288, + "astId": 1086, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3544,7 +2801,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 4287, + "astId": 1360, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3568,7 +2825,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 727, + "astId": 600, "contract": "contracts/Market.sol:Market", "label": "_paused", "offset": 0, @@ -3576,7 +2833,7 @@ "type": "t_bool" }, { - "astId": 832, + "astId": 705, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3584,7 +2841,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 35688, + "astId": 16118, "contract": "contracts/Market.sol:Market", "label": "name", "offset": 0, @@ -3592,7 +2849,7 @@ "type": "t_string_storage" }, { - "astId": 35690, + "astId": 16120, "contract": "contracts/Market.sol:Market", "label": "symbol", "offset": 0, @@ -3600,7 +2857,7 @@ "type": "t_string_storage" }, { - "astId": 35694, + "astId": 16124, "contract": "contracts/Market.sol:Market", "label": "totalSupply", "offset": 0, @@ -3608,7 +2865,7 @@ "type": "t_uint256" }, { - "astId": 35698, + "astId": 16128, "contract": "contracts/Market.sol:Market", "label": "balanceOf", "offset": 0, @@ -3616,7 +2873,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 35704, + "astId": 16134, "contract": "contracts/Market.sol:Market", "label": "allowance", "offset": 0, @@ -3624,7 +2881,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 35712, + "astId": 16142, "contract": "contracts/Market.sol:Market", "label": "nonces", "offset": 0, @@ -3632,39 +2889,39 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 15178, + "astId": 7382, "contract": "contracts/Market.sol:Market", "label": "fixedDepositPositions", "offset": 0, "slot": "207", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))" }, { - "astId": 15186, + "astId": 7390, "contract": "contracts/Market.sol:Market", "label": "fixedBorrowPositions", "offset": 0, "slot": "208", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))" }, { - "astId": 15192, + "astId": 7396, "contract": "contracts/Market.sol:Market", "label": "fixedPools", "offset": 0, "slot": "209", - "type": "t_mapping(t_uint256,t_struct(Pool)35048_storage)" + "type": "t_mapping(t_uint256,t_struct(Pool)15534_storage)" }, { - "astId": 15198, + "astId": 7402, "contract": "contracts/Market.sol:Market", "label": "accounts", "offset": 0, "slot": "210", - "type": "t_mapping(t_address,t_struct(Account)19124_storage)" + "type": "t_mapping(t_address,t_struct(Account)11401_storage)" }, { - "astId": 15201, + "astId": 7405, "contract": "contracts/Market.sol:Market", "label": "floatingBackupBorrowed", "offset": 0, @@ -3672,7 +2929,7 @@ "type": "t_uint256" }, { - "astId": 15204, + "astId": 7408, "contract": "contracts/Market.sol:Market", "label": "floatingDebt", "offset": 0, @@ -3680,7 +2937,7 @@ "type": "t_uint256" }, { - "astId": 15207, + "astId": 7411, "contract": "contracts/Market.sol:Market", "label": "earningsAccumulator", "offset": 0, @@ -3688,7 +2945,7 @@ "type": "t_uint256" }, { - "astId": 15210, + "astId": 7414, "contract": "contracts/Market.sol:Market", "label": "penaltyRate", "offset": 0, @@ -3696,7 +2953,7 @@ "type": "t_uint256" }, { - "astId": 15213, + "astId": 7417, "contract": "contracts/Market.sol:Market", "label": "backupFeeRate", "offset": 0, @@ -3704,7 +2961,7 @@ "type": "t_uint256" }, { - "astId": 15216, + "astId": 7420, "contract": "contracts/Market.sol:Market", "label": "dampSpeedUp", "offset": 0, @@ -3712,7 +2969,7 @@ "type": "t_uint256" }, { - "astId": 15219, + "astId": 7423, "contract": "contracts/Market.sol:Market", "label": "dampSpeedDown", "offset": 0, @@ -3720,7 +2977,7 @@ "type": "t_uint256" }, { - "astId": 15222, + "astId": 7426, "contract": "contracts/Market.sol:Market", "label": "maxFuturePools", "offset": 0, @@ -3728,7 +2985,7 @@ "type": "t_uint8" }, { - "astId": 15225, + "astId": 7429, "contract": "contracts/Market.sol:Market", "label": "lastAccumulatorAccrual", "offset": 1, @@ -3736,7 +2993,7 @@ "type": "t_uint32" }, { - "astId": 15228, + "astId": 7432, "contract": "contracts/Market.sol:Market", "label": "lastFloatingDebtUpdate", "offset": 5, @@ -3744,7 +3001,7 @@ "type": "t_uint32" }, { - "astId": 15231, + "astId": 7435, "contract": "contracts/Market.sol:Market", "label": "lastAverageUpdate", "offset": 9, @@ -3752,15 +3009,15 @@ "type": "t_uint32" }, { - "astId": 15235, + "astId": 7439, "contract": "contracts/Market.sol:Market", "label": "interestRateModel", "offset": 0, "slot": "219", - "type": "t_contract(InterestRateModel)15062" + "type": "t_contract(InterestRateModel)7266" }, { - "astId": 15238, + "astId": 7442, "contract": "contracts/Market.sol:Market", "label": "earningsAccumulatorSmoothFactor", "offset": 0, @@ -3768,7 +3025,7 @@ "type": "t_uint128" }, { - "astId": 15241, + "astId": 7445, "contract": "contracts/Market.sol:Market", "label": "reserveFactor", "offset": 16, @@ -3776,7 +3033,7 @@ "type": "t_uint128" }, { - "astId": 15244, + "astId": 7448, "contract": "contracts/Market.sol:Market", "label": "floatingAssets", "offset": 0, @@ -3784,7 +3041,7 @@ "type": "t_uint256" }, { - "astId": 15247, + "astId": 7451, "contract": "contracts/Market.sol:Market", "label": "floatingAssetsAverage", "offset": 0, @@ -3792,7 +3049,7 @@ "type": "t_uint256" }, { - "astId": 15250, + "astId": 7454, "contract": "contracts/Market.sol:Market", "label": "totalFloatingBorrowShares", "offset": 0, @@ -3800,7 +3057,7 @@ "type": "t_uint256" }, { - "astId": 15253, + "astId": 7457, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3808,7 +3065,7 @@ "type": "t_uint256" }, { - "astId": 15256, + "astId": 7460, "contract": "contracts/Market.sol:Market", "label": "treasury", "offset": 0, @@ -3816,7 +3073,7 @@ "type": "t_address" }, { - "astId": 15259, + "astId": 7463, "contract": "contracts/Market.sol:Market", "label": "treasuryFeeRate", "offset": 0, @@ -3824,15 +3081,15 @@ "type": "t_uint256" }, { - "astId": 15263, + "astId": 7467, "contract": "contracts/Market.sol:Market", "label": "rewardsController", "offset": 0, "slot": "227", - "type": "t_contract(RewardsController)23082" + "type": "t_contract(RewardsController)14682" }, { - "astId": 15266, + "astId": 7470, "contract": "contracts/Market.sol:Market", "label": "isFrozen", "offset": 20, @@ -3868,12 +3125,12 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(InterestRateModel)15062": { + "t_contract(InterestRateModel)7266": { "encoding": "inplace", "label": "contract InterestRateModel", "numberOfBytes": "20" }, - "t_contract(RewardsController)23082": { + "t_contract(RewardsController)14682": { "encoding": "inplace", "label": "contract RewardsController", "numberOfBytes": "20" @@ -3892,19 +3149,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_uint256)" }, - "t_mapping(t_address,t_struct(Account)19124_storage)": { + "t_mapping(t_address,t_struct(Account)11401_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct Market.Account)", "numberOfBytes": "32", - "value": "t_struct(Account)19124_storage" + "value": "t_struct(Account)11401_storage" }, - "t_mapping(t_address,t_struct(Position)35054_storage)": { + "t_mapping(t_address,t_struct(Position)15540_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct FixedLib.Position)", "numberOfBytes": "32", - "value": "t_struct(Position)35054_storage" + "value": "t_struct(Position)15540_storage" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -3920,31 +3177,31 @@ "numberOfBytes": "32", "value": "t_struct(RoleData)23_storage" }, - "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))": { + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => mapping(address => struct FixedLib.Position))", "numberOfBytes": "32", - "value": "t_mapping(t_address,t_struct(Position)35054_storage)" + "value": "t_mapping(t_address,t_struct(Position)15540_storage)" }, - "t_mapping(t_uint256,t_struct(Pool)35048_storage)": { + "t_mapping(t_uint256,t_struct(Pool)15534_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct FixedLib.Pool)", "numberOfBytes": "32", - "value": "t_struct(Pool)35048_storage" + "value": "t_struct(Pool)15534_storage" }, "t_string_storage": { "encoding": "bytes", "label": "string", "numberOfBytes": "32" }, - "t_struct(Account)19124_storage": { + "t_struct(Account)11401_storage": { "encoding": "inplace", "label": "struct Market.Account", "members": [ { - "astId": 19119, + "astId": 11396, "contract": "contracts/Market.sol:Market", "label": "fixedDeposits", "offset": 0, @@ -3952,7 +3209,7 @@ "type": "t_uint256" }, { - "astId": 19121, + "astId": 11398, "contract": "contracts/Market.sol:Market", "label": "fixedBorrows", "offset": 0, @@ -3960,7 +3217,7 @@ "type": "t_uint256" }, { - "astId": 19123, + "astId": 11400, "contract": "contracts/Market.sol:Market", "label": "floatingBorrowShares", "offset": 0, @@ -3970,12 +3227,12 @@ ], "numberOfBytes": "96" }, - "t_struct(Pool)35048_storage": { + "t_struct(Pool)15534_storage": { "encoding": "inplace", "label": "struct FixedLib.Pool", "members": [ { - "astId": 35041, + "astId": 15527, "contract": "contracts/Market.sol:Market", "label": "borrowed", "offset": 0, @@ -3983,7 +3240,7 @@ "type": "t_uint256" }, { - "astId": 35043, + "astId": 15529, "contract": "contracts/Market.sol:Market", "label": "supplied", "offset": 0, @@ -3991,7 +3248,7 @@ "type": "t_uint256" }, { - "astId": 35045, + "astId": 15531, "contract": "contracts/Market.sol:Market", "label": "unassignedEarnings", "offset": 0, @@ -3999,7 +3256,7 @@ "type": "t_uint256" }, { - "astId": 35047, + "astId": 15533, "contract": "contracts/Market.sol:Market", "label": "lastAccrual", "offset": 0, @@ -4009,12 +3266,12 @@ ], "numberOfBytes": "128" }, - "t_struct(Position)35054_storage": { + "t_struct(Position)15540_storage": { "encoding": "inplace", "label": "struct FixedLib.Position", "members": [ { - "astId": 35051, + "astId": 15537, "contract": "contracts/Market.sol:Market", "label": "principal", "offset": 0, @@ -4022,7 +3279,7 @@ "type": "t_uint256" }, { - "astId": 35053, + "astId": 15539, "contract": "contracts/Market.sol:Market", "label": "fee", "offset": 0, diff --git a/deployments/optimism/MarketwstETH.json b/deployments/optimism/MarketwstETH.json index 637d72ab..ad54887d 100644 --- a/deployments/optimism/MarketwstETH.json +++ b/deployments/optimism/MarketwstETH.json @@ -2989,12 +2989,12 @@ "0xfBa759BCd1a99a7724c5068FEddb4F5b844b941A", "0x9f73066e00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000001bc16d674ec8000000000000000000000000000060d92e570d096f8e5c99a600bd130d71295aaf380000000000000000000000000000000000000000000000000000000c206898d5000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000001057acf5f78000000000000000000000000000000000000000000000000000058d15e176280000" ], - "numDeployments": 4, + "numDeployments": 5, "solcInputHash": "7f84a745038d683ecec6e9910037248b", "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"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\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"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.\",\"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`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"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\":{\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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.5.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 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(\\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(\\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\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"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/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../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 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(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) 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 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 Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\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\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 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(\\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 (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\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 /// @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\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405260405162000b5038038062000b5083398101604081905262000026916200038b565b828162000036828260006200004d565b50620000449050826200008a565b50505062000489565b6200005883620000e5565b600082511180620000665750805b1562000085576200008383836200012760201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000b562000156565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e2816200018f565b50565b620000f081620001ed565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200014f838360405180606001604052806027815260200162000b296027913962000247565b9392505050565b60006200018060008051602062000b0983398151915260001b620002c660201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b038116620001a357600080fd5b80620001cc60008051602062000b0983398151915260001b620002c660201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200020381620002c960201b6200025a1760201c565b6200020d57600080fd5b80620001cc7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b620002c660201b620001ea1760201c565b6060600080856001600160a01b0316856040516200026691906200046b565b600060405180830381855af49150503d8060008114620002a3576040519150601f19603f3d011682016040523d82523d6000602084013e620002a8565b606091505b509092509050620002bc86838387620002d8565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200030857825160000362000300576001600160a01b0385163b6200030057600080fd5b508162000314565b6200031483836200031c565b949350505050565b8151156200032d5781518083602001fd5b600080fd5b80516001600160a01b03811681146200034a57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200038257818101518382015260200162000368565b50506000910152565b600080600060608486031215620003a157600080fd5b620003ac8462000332565b9250620003bc6020850162000332565b60408501519092506001600160401b0380821115620003da57600080fd5b818601915086601f830112620003ef57600080fd5b8151818111156200040457620004046200034f565b604051601f8201601f19908116603f011681019083821181831017156200042f576200042f6200034f565b816040528281528960208487010111156200044957600080fd5b6200045c83602083016020880162000365565b80955050505050509250925092565b600082516200047f81846020870162000365565b9190910192915050565b61067080620004996000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b610080366004610546565b610118565b61005b610093366004610561565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e4366004610546565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b610116610111610285565b61028f565b565b6101206102b3565b6001600160a01b0316330361014d5761014a816040518060200160405280600081525060006102e6565b50565b61014a6100fe565b61015d6102b3565b6001600160a01b031633036101b4576101af8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506102e6915050565b505050565b6101af6100fe565b60006101c66102b3565b6001600160a01b031633036101e2576101dd610285565b905090565b6101ea6100fe565b90565b6101f56102b3565b6001600160a01b0316330361014d5761014a81610311565b60006102176102b3565b6001600160a01b031633036101e2576101dd6102b3565b6060610253838360405180606001604052806027815260200161061460279139610365565b9392505050565b6001600160a01b03163b151590565b6102716102b3565b6001600160a01b0316330361011657600080fd5b60006101dd6103dd565b3660008037600080366000845af43d6000803e8080156102ae573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6102ef83610405565b6000825111806102fc5750805b156101af5761030b838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61033a6102b3565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610445565b6060600080856001600160a01b03168560405161038291906105e4565b600060405180830381855af49150503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091506103d38683838761049c565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6102d7565b61040e816104da565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661045857600080fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156104c85782516000036104c1576001600160a01b0385163b6104c157600080fd5b50816104d2565b6104d28383610515565b949350505050565b6001600160a01b0381163b6104ee57600080fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61047b565b8151156105255781518083602001fd5b600080fd5b80356001600160a01b038116811461054157600080fd5b919050565b60006020828403121561055857600080fd5b6102538261052a565b60008060006040848603121561057657600080fd5b61057f8461052a565b9250602084013567ffffffffffffffff8082111561059c57600080fd5b818601915086601f8301126105b057600080fd5b8135818111156105bf57600080fd5b8760208285010111156105d157600080fd5b6020830194508093505050509250925092565b6000825160005b8181101561060557602081860181015185830152016105eb565b50600092019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203011748945e626a6c7d6bd1969f4e5640e829c89504a5d4e52671d90f482851564736f6c63430008110033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b610080366004610546565b610118565b61005b610093366004610561565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e4366004610546565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b610116610111610285565b61028f565b565b6101206102b3565b6001600160a01b0316330361014d5761014a816040518060200160405280600081525060006102e6565b50565b61014a6100fe565b61015d6102b3565b6001600160a01b031633036101b4576101af8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506102e6915050565b505050565b6101af6100fe565b60006101c66102b3565b6001600160a01b031633036101e2576101dd610285565b905090565b6101ea6100fe565b90565b6101f56102b3565b6001600160a01b0316330361014d5761014a81610311565b60006102176102b3565b6001600160a01b031633036101e2576101dd6102b3565b6060610253838360405180606001604052806027815260200161061460279139610365565b9392505050565b6001600160a01b03163b151590565b6102716102b3565b6001600160a01b0316330361011657600080fd5b60006101dd6103dd565b3660008037600080366000845af43d6000803e8080156102ae573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6102ef83610405565b6000825111806102fc5750805b156101af5761030b838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61033a6102b3565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610445565b6060600080856001600160a01b03168560405161038291906105e4565b600060405180830381855af49150503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091506103d38683838761049c565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6102d7565b61040e816104da565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661045857600080fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156104c85782516000036104c1576001600160a01b0385163b6104c157600080fd5b50816104d2565b6104d28383610515565b949350505050565b6001600160a01b0381163b6104ee57600080fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61047b565b8151156105255781518083602001fd5b600080fd5b80356001600160a01b038116811461054157600080fd5b919050565b60006020828403121561055857600080fd5b6102538261052a565b60008060006040848603121561057657600080fd5b61057f8461052a565b9250602084013567ffffffffffffffff8082111561059c57600080fd5b818601915086601f8301126105b057600080fd5b8135818111156105bf57600080fd5b8760208285010111156105d157600080fd5b6020830194508093505050509250925092565b6000825160005b8181101561060557602081860181015185830152016105eb565b50600092019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203011748945e626a6c7d6bd1969f4e5640e829c89504a5d4e52671d90f482851564736f6c63430008110033", - "implementation": "0x8b60497274fF470786a0b5636379aAD8580C1b96", + "implementation": "0x3E5A7019e3e59f355e2575556Cf8baf83F3f4c2A", "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.", "kind": "dev", diff --git a/deployments/optimism/MarketwstETH_Implementation.json b/deployments/optimism/MarketwstETH_Implementation.json index 47506ee6..903ad293 100644 --- a/deployments/optimism/MarketwstETH_Implementation.json +++ b/deployments/optimism/MarketwstETH_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x8b60497274fF470786a0b5636379aAD8580C1b96", + "address": "0x3E5A7019e3e59f355e2575556Cf8baf83F3f4c2A", "abi": [ { "inputs": [ @@ -2736,32 +2736,32 @@ "type": "function" } ], - "transactionHash": "0x8ced3381c4736b97be95508989c3ab0401f775c5b2e09ddd6a6e310fa011fb3d", + "transactionHash": "0x4464b169c0b1d6599fbe41c7027c673eed552339f757a5127045ac1f875d0e99", "receipt": { "to": null, "from": "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", - "contractAddress": "0x8b60497274fF470786a0b5636379aAD8580C1b96", - "transactionIndex": 10, - "gasUsed": "5369868", - "logsBloom": "0x00000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xf57dd2ed76c2ade909c33b391f57531f0fff51880f2e1c59b330ec4f3c9bb5c6", - "transactionHash": "0x8ced3381c4736b97be95508989c3ab0401f775c5b2e09ddd6a6e310fa011fb3d", + "contractAddress": "0x3E5A7019e3e59f355e2575556Cf8baf83F3f4c2A", + "transactionIndex": 6, + "gasUsed": "5414705", + "logsBloom": "0x00000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000004000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x79797a0c018988047fbedb0d7326f0756b449a316a681e9fba696e3dff9ecf15", + "transactionHash": "0x4464b169c0b1d6599fbe41c7027c673eed552339f757a5127045ac1f875d0e99", "logs": [ { - "transactionIndex": 10, - "blockNumber": 118840713, - "transactionHash": "0x8ced3381c4736b97be95508989c3ab0401f775c5b2e09ddd6a6e310fa011fb3d", - "address": "0x8b60497274fF470786a0b5636379aAD8580C1b96", + "transactionIndex": 6, + "blockNumber": 124901280, + "transactionHash": "0x4464b169c0b1d6599fbe41c7027c673eed552339f757a5127045ac1f875d0e99", + "address": "0x3E5A7019e3e59f355e2575556Cf8baf83F3f4c2A", "topics": [ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" ], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 51, - "blockHash": "0xf57dd2ed76c2ade909c33b391f57531f0fff51880f2e1c59b330ec4f3c9bb5c6" + "logIndex": 8, + "blockHash": "0x79797a0c018988047fbedb0d7326f0756b449a316a681e9fba696e3dff9ecf15" } ], - "blockNumber": 118840713, - "cumulativeGasUsed": "6969998", + "blockNumber": 124901280, + "cumulativeGasUsed": "6379875", "status": 1, "byzantium": true }, @@ -2769,758 +2769,15 @@ "0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb", "0xaEb62e6F27BC103702E7BC879AE98bceA56f027E" ], - "numDeployments": 4, - "solcInputHash": "e3ac7af802d0124bd24cbb337b6ddc93", - "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"contract Auditor\",\"name\":\"auditor_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Disagreement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientProtocolLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketFrozen\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaturityOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAuditor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPausingRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SelfLiquidation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolState\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"alternativeState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolStates\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBorrow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRepay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWithdraw\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AccumulatorAccrual\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"backupFeeRate\",\"type\":\"uint256\"}],\"name\":\"BackupFeeRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"BorrowAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedUp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedDown\",\"type\":\"uint256\"}],\"name\":\"DampSpeedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"DepositAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulatorSmoothFactor\",\"type\":\"uint256\"}],\"name\":\"EarningsAccumulatorSmoothFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"}],\"name\":\"FixedEarningsUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilization\",\"type\":\"uint256\"}],\"name\":\"FloatingDebtUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isFrozen\",\"type\":\"bool\"}],\"name\":\"Frozen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel\",\"type\":\"address\"}],\"name\":\"InterestRateModelSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lendersAssets\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizedAssets\",\"type\":\"uint256\"}],\"name\":\"Liquidate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDepositShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDebt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulator\",\"type\":\"uint256\"}],\"name\":\"MarketUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxFuturePools\",\"type\":\"uint256\"}],\"name\":\"MaxFuturePoolsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyRate\",\"type\":\"uint256\"}],\"name\":\"PenaltyRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Repay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"name\":\"RepayAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveFactor\",\"type\":\"uint256\"}],\"name\":\"ReserveFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController\",\"type\":\"address\"}],\"name\":\"RewardsControllerSet\",\"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\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"SpreadBadDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate\",\"type\":\"uint256\"}],\"name\":\"TreasurySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"WithdrawAtMaturity\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EMERGENCY_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"accountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fixedDeposits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fixedBorrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auditor\",\"outputs\":[{\"internalType\":\"contract Auditor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"backupFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrowAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsOwed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"clearBadDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"depositAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulatorSmoothFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedBorrowPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedDepositPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"fixedPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplied\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastAccrual\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingBackupBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"maxFuturePools_\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedUp_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedDown_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAccumulatorAccrual\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAverageUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFloatingDebtUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxFuturePools\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"previewDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"debt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewFloatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRefund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewRepay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repayAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepayAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsController\",\"outputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"}],\"name\":\"setAssetSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setBackupFeeRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"up\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"down\",\"type\":\"uint256\"}],\"name\":\"setDampSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"}],\"name\":\"setEarningsAccumulatorSmoothFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isFrozen_\",\"type\":\"bool\"}],\"name\":\"setFrozen\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"futurePools\",\"type\":\"uint8\"}],\"name\":\"setMaxFuturePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"}],\"name\":\"setReserveFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController_\",\"type\":\"address\"}],\"name\":\"setRewardsController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setTreasury\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasuryFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsDiscounted\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\"}},\"BackupFeeRateSet(uint256)\":{\"params\":{\"backupFeeRate\":\"rate charged to the fixed pools to be accrued by the floating depositors.\"}},\"Borrow(address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"receiver\":\"address that received the borrowed assets.\",\"shares\":\"amount of borrow shares assigned to the account.\"}},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"fee\":\"extra amount that will need to be paid at maturity.\",\"maturity\":\"maturity in which the account will have to repay the loan.\",\"receiver\":\"address that received the borrowed assets.\"}},\"DampSpeedSet(uint256,uint256)\":{\"params\":{\"dampSpeedDown\":\"represented with 18 decimals.\",\"dampSpeedUp\":\"represented with 18 decimals.\"}},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were deposited.\",\"caller\":\"address which deposited the assets.\",\"fee\":\"is the extra amount that it will be collected at maturity.\",\"maturity\":\"maturity at which the account will be able to collect his deposit + his fee.\",\"owner\":\"address that will be able to withdraw the deposited assets.\"}},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"params\":{\"earningsAccumulatorSmoothFactor\":\"factor represented with 18 decimals.\"}},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"params\":{\"maturity\":\"maturity date where the earnings were updated.\",\"timestamp\":\"current timestamp.\",\"unassignedEarnings\":\"pending unassigned earnings.\"}},\"FloatingDebtUpdate(uint256,uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\",\"utilization\":\"new floating utilization.\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InterestRateModelSet(address)\":{\"params\":{\"interestRateModel\":\"new interest rate model to be used to calculate rates.\"}},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were repaid.\",\"borrower\":\"address which had the original debt.\",\"lendersAssets\":\"incentive paid to lenders.\",\"receiver\":\"address which repaid the previously borrowed amount.\",\"seizeMarket\":\"address of the asset that were seized by the liquidator.\",\"seizedAssets\":\"amount seized of the collateral.\"}},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"earningsAccumulator\":\"earnings accumulator.\",\"floatingAssets\":\"total floating supply assets.\",\"floatingBorrowShares\":\"total floating borrow shares.\",\"floatingDebt\":\"total floating borrow assets.\",\"floatingDepositShares\":\"total floating supply shares.\",\"timestamp\":\"current timestamp.\"}},\"MaxFuturePoolsSet(uint256)\":{\"params\":{\"maxFuturePools\":\"represented with 0 decimals.\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PenaltyRateSet(uint256)\":{\"params\":{\"penaltyRate\":\"penaltyRate percentage per second represented with 18 decimals.\"}},\"Repay(address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"shares\":\"amount of borrow shares that were subtracted from the account's accountability.\"}},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"maturity\":\"maturity where the account repaid its borrowed amounts.\",\"positionAssets\":\"amount of the debt that was covered in this repayment (penalties could have been repaid).\"}},\"ReserveFactorSet(uint256)\":{\"params\":{\"reserveFactor\":\"reserveFactor percentage.\"}},\"RewardsControllerSet(address)\":{\"params\":{\"rewardsController\":\"new rewards controller to update account rewards when operating with the Market.\"}},\"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`)\"},\"Seize(address,address,uint256)\":{\"params\":{\"assets\":\"amount seized of the collateral.\",\"borrower\":\"address which had the original debt.\",\"liquidator\":\"address which seized this collateral.\"}},\"SpreadBadDebt(address,uint256)\":{\"params\":{\"assets\":\"amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\",\"borrower\":\"address which was cleared from bad debt.\"}},\"TreasurySet(address,uint256)\":{\"params\":{\"treasury\":\"address of the treasury that will receive the minted eTokens.\",\"treasuryFeeRate\":\"represented with 18 decimals.\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets withdrawn (can include a discount for early withdraw).\",\"caller\":\"address which withdraw the asset.\",\"maturity\":\"maturity where the account withdraw its deposits.\",\"owner\":\"address which had the assets withdrawn.\",\"positionAssets\":\"position size reduced.\",\"receiver\":\"address which will be collecting the assets.\"}}},\"kind\":\"dev\",\"methods\":{\"accountSnapshot(address)\":{\"params\":{\"account\":\"account to return status snapshot in the specified maturity date.\"},\"returns\":{\"_0\":\"the amount deposited to the floating pool and the amount owed to floating and fixed pools.\"}},\"borrow(uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"borrowShares\":\"shares corresponding to the borrowed assets.\"}},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"maturity\":\"maturity date for repayment.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"assetsOwed\":\"total amount of assets (principal + fee) to be repaid at maturity.\"}},\"clearBadDebt(address)\":{\"details\":\"Can only be called from the auditor.\",\"params\":{\"borrower\":\"account with insufficient collateral to be cleared the debt.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"assets\":\"amount to receive from the msg.sender.\",\"maturity\":\"maturity date where the assets will be deposited.\",\"minAssetsRequired\":\"minimum amount of assets required by the depositor for the transaction to be accepted.\",\"receiver\":\"address that will be able to withdraw the deposited assets.\"},\"returns\":{\"positionAssets\":\"total amount of assets (principal + fee) to be withdrawn at maturity.\"}},\"fixedPoolBalance(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed and supplied amount of the fixed pool.\"}},\"fixedPoolBorrowed(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed amount of the fixed pool.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"details\":\"can only be called once.\"},\"liquidate(address,uint256,address)\":{\"details\":\"Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.\",\"params\":{\"borrower\":\"account that has an outstanding debt across floating or fixed pools.\",\"maxAssets\":\"maximum amount of debt that the liquidator is willing to accept. (it can be less)\",\"seizeMarket\":\"market from which the collateral will be seized to give to the liquidator.\"},\"returns\":{\"repaidAssets\":\"actual amount repaid.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"previewBorrow(uint256)\":{\"params\":{\"assets\":\"amount of assets to borrow.\"},\"returns\":{\"_0\":\"amount of shares that will be asigned to the account after the borrow.\"}},\"previewDebt(address)\":{\"params\":{\"borrower\":\"account to return status snapshot for fixed and floating borrows.\"},\"returns\":{\"debt\":\"the total debt, denominated in number of assets.\"}},\"previewFloatingAssetsAverage()\":{\"returns\":{\"_0\":\"projected `floatingAssetsAverage`.\"}},\"previewRefund(uint256)\":{\"params\":{\"shares\":\"amount of shares to subtract from caller's accountability.\"},\"returns\":{\"_0\":\"amount of assets that will be repaid.\"}},\"previewRepay(uint256)\":{\"params\":{\"assets\":\"amount of assets to repay.\"},\"returns\":{\"_0\":\"amount of shares that will be subtracted from the account after the repay.\"}},\"redeem(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\",\"shares\":\"amount of shares to be redeemed for underlying asset.\"},\"returns\":{\"assets\":\"amount of underlying asset that was withdrawn.\"}},\"refund(uint256,address)\":{\"params\":{\"borrowShares\":\"shares to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualShares\":\"actual subtracted shares from the borrower's accountability.\",\"assets\":\"subtracted assets from the borrower's accountability.\"}},\"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.\"},\"repay(uint256,address)\":{\"params\":{\"assets\":\"assets to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualRepay\":\"the actual amount that should be transferred into the protocol.\",\"borrowShares\":\"subtracted shares from the borrower's accountability.\"}},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"borrower\":\"address of the account that has the debt.\",\"maturity\":\"maturity date where the assets will be repaid.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept to be repaid.\",\"positionAssets\":\"amount to be paid for the borrower's debt.\"},\"returns\":{\"actualRepayAssets\":\"the actual amount that was transferred into the protocol.\"}},\"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.\"},\"seize(address,address,uint256)\":{\"details\":\"Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\",\"params\":{\"assets\":\"amount to be removed from borrower's possession.\",\"borrower\":\"address from which the assets will be seized.\",\"liquidator\":\"address which will receive the seized assets.\"}},\"setAssetSymbol(string)\":{\"params\":{\"assetSymbol\":\"the symbol for the underlying asset.\"}},\"setBackupFeeRate(uint256)\":{\"params\":{\"backupFeeRate_\":\"percentage amount represented with 18 decimals.\"}},\"setDampSpeed(uint256,uint256)\":{\"params\":{\"down\":\"damp speed down, represented with 18 decimals.\",\"up\":\"damp speed up, represented with 18 decimals.\"}},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"params\":{\"earningsAccumulatorSmoothFactor_\":\"represented with 18 decimals.\"}},\"setInterestRateModel(address)\":{\"params\":{\"interestRateModel_\":\"new interest rate model.\"}},\"setMaxFuturePools(uint8)\":{\"details\":\"If value is decreased, VALID maturities will become NOT_READY.\",\"params\":{\"futurePools\":\"number of pools to be active at the same time.\"}},\"setPenaltyRate(uint256)\":{\"params\":{\"penaltyRate_\":\"percentage represented with 18 decimals.\"}},\"setReserveFactor(uint128)\":{\"params\":{\"reserveFactor_\":\"parameter represented with 18 decimals.\"}},\"setRewardsController(address)\":{\"params\":{\"rewardsController_\":\"new rewards controller.\"}},\"setTreasury(address,uint256)\":{\"params\":{\"treasuryFeeRate_\":\"represented with 18 decimals.\",\"treasury_\":\"address of the treasury that will receive the minted eTokens.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalAssets()\":{\"returns\":{\"_0\":\"actual floatingAssets plus earnings to be accrued at current timestamp.\"}},\"totalFloatingBorrowAssets()\":{\"returns\":{\"_0\":\"actual floating debt plus projected interest.\"}},\"transfer(address,uint256)\":{\"details\":\"Makes sure that the caller doesn't have shortfall after transferring.\",\"params\":{\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Makes sure that `from` address doesn't have shortfall after transferring.\",\"params\":{\"from\":\"address from which the assets will be transferred.\",\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"withdraw(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"assets\":\"amount of underlying to be withdrawn.\",\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\"},\"returns\":{\"shares\":\"amount of shares redeemed for underlying asset.\"}},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"maturity\":\"maturity date where the assets will be withdrawn.\",\"minAssetsRequired\":\"minimum amount required by the account (if discount included for early withdrawal).\",\"owner\":\"address that previously deposited the assets.\",\"positionAssets\":\"position size to be reduced.\",\"receiver\":\"address that will receive the withdrawn assets.\"},\"returns\":{\"assetsDiscounted\":\"amount of assets withdrawn (can include a discount for early withdraw).\"}}},\"stateVariables\":{\"__gap\":{\"custom:oz-renamed-from\":\"floatingUtilization\",\"details\":\"gap from deprecated state.\"},\"auditor\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"notice\":\"Emitted when accumulator distributes earnings.\"},\"BackupFeeRateSet(uint256)\":{\"notice\":\"Emitted when the backupFeeRate parameter is changed by admin.\"},\"Borrow(address,address,address,uint256,uint256)\":{\"notice\":\"Event emitted when an account borrows amount of assets from a floating pool.\"},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account borrows amount of an asset from a certain maturity date.\"},\"DampSpeedSet(uint256,uint256)\":{\"notice\":\"Emitted when the damp speeds are changed by admin.\"},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period.\"},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"notice\":\"Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\"},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"notice\":\"Emitted when the earnings of a maturity are updated.\"},\"FloatingDebtUpdate(uint256,uint256)\":{\"notice\":\"Emitted when the floating debt is updated.\"},\"Frozen(address,bool)\":{\"notice\":\"Emitted when `account` sets the `isFrozen` flag.\"},\"InterestRateModelSet(address)\":{\"notice\":\"Emitted when the interestRateModel is changed by admin.\"},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"notice\":\"Emitted when an account's position had a liquidation.\"},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when market state is updated.\"},\"MaxFuturePoolsSet(uint256)\":{\"notice\":\"Emitted when the maxFuturePools is changed by admin.\"},\"PenaltyRateSet(uint256)\":{\"notice\":\"Emitted when the penaltyRate is changed by admin.\"},\"Repay(address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays amount of assets to a floating pool.\"},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays its borrows after maturity.\"},\"ReserveFactorSet(uint256)\":{\"notice\":\"Emitted when the reserveFactor is changed by admin.\"},\"RewardsControllerSet(address)\":{\"notice\":\"Emitted when the rewardsController is changed by admin.\"},\"Seize(address,address,uint256)\":{\"notice\":\"Emitted when an account's collateral has been seized.\"},\"SpreadBadDebt(address,uint256)\":{\"notice\":\"Emitted when an account is cleared from bad debt.\"},\"TreasurySet(address,uint256)\":{\"notice\":\"Emitted when the treasury variables are changed by admin.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account withdraws from a fixed rate pool.\"}},\"kind\":\"user\",\"methods\":{\"accountSnapshot(address)\":{\"notice\":\"Gets current snapshot for an account across all maturities.\"},\"accounts(address)\":{\"notice\":\"Tracks fixed deposit and borrow map and floating borrow shares of an account.\"},\"backupFeeRate()\":{\"notice\":\"Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\"},\"borrow(uint256,address,address)\":{\"notice\":\"Borrows a certain amount from the floating pool.\"},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Borrows a certain amount from a maturity.\"},\"clearBadDebt(address)\":{\"notice\":\"Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\"},\"dampSpeedDown()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\"},\"dampSpeedUp()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Deposits a certain amount to a maturity.\"},\"earningsAccumulator()\":{\"notice\":\"Accumulated earnings from extraordinary sources to be gradually distributed.\"},\"earningsAccumulatorSmoothFactor()\":{\"notice\":\"Factor used for gradual accrual of earnings to the floating pool.\"},\"fixedBorrowPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed borrow positions by maturity, account and position.\"},\"fixedDepositPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed deposit positions by maturity, account and position.\"},\"fixedPoolBalance(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed and supplied amount.\"},\"fixedPoolBorrowed(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed amount.\"},\"fixedPools(uint256)\":{\"notice\":\"Tracks fixed pools state by maturity.\"},\"floatingAssets()\":{\"notice\":\"Amount of floating assets deposited to the pool.\"},\"floatingAssetsAverage()\":{\"notice\":\"Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\"},\"floatingBackupBorrowed()\":{\"notice\":\"Amount of assets lent by the floating pool to the fixed pools.\"},\"floatingDebt()\":{\"notice\":\"Amount of assets lent by the floating pool to accounts.\"},\"initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"notice\":\"Initializes the contract.\"},\"interestRateModel()\":{\"notice\":\"Interest rate model contract used to get the borrow rates.\"},\"isFrozen()\":{\"notice\":\"Flag to prevent new borrows and deposits.\"},\"lastAccumulatorAccrual()\":{\"notice\":\"Last time the accumulator distributed earnings.\"},\"lastAverageUpdate()\":{\"notice\":\"Last time the floating assets average was updated.\"},\"lastFloatingDebtUpdate()\":{\"notice\":\"Last time the floating debt was updated.\"},\"liquidate(address,uint256,address)\":{\"notice\":\"Liquidates undercollateralized fixed/floating (or both) position(s).\"},\"maxFuturePools()\":{\"notice\":\"Number of fixed pools to be active at the same time.\"},\"pause()\":{\"notice\":\"Sets the pause state to true in case of emergency, triggered by an authorized account.\"},\"penaltyRate()\":{\"notice\":\"Rate per second to be charged to delayed fixed pools borrowers after maturity.\"},\"previewBorrow(uint256)\":{\"notice\":\"Simulates the effects of a borrow at the current time, given current contract conditions.\"},\"previewDebt(address)\":{\"notice\":\"Gets all borrows and penalties for an account.\"},\"previewFloatingAssetsAverage()\":{\"notice\":\"Returns the current `floatingAssetsAverage` without updating the storage variable.\"},\"previewRefund(uint256)\":{\"notice\":\"Simulates the effects of a refund at the current time, given current contract conditions.\"},\"previewRepay(uint256)\":{\"notice\":\"Simulates the effects of a repay at the current time, given current contract conditions.\"},\"redeem(uint256,address,address)\":{\"notice\":\"Redeems the owner's floating pool assets to the receiver address.\"},\"refund(uint256,address)\":{\"notice\":\"Repays a certain amount of shares to the floating pool.\"},\"repay(uint256,address)\":{\"notice\":\"Repays a certain amount of assets to the floating pool.\"},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Repays a certain amount to a maturity.\"},\"reserveFactor()\":{\"notice\":\"Percentage factor that represents the liquidity reserves that can't be borrowed.\"},\"rewardsController()\":{\"notice\":\"Address of the rewards controller that will accrue rewards for accounts operating with the Market.\"},\"seize(address,address,uint256)\":{\"notice\":\"Public function to seize a certain amount of assets.\"},\"setAssetSymbol(string)\":{\"notice\":\"Sets name and symbol for the Market.\"},\"setBackupFeeRate(uint256)\":{\"notice\":\"Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity.\"},\"setDampSpeed(uint256,uint256)\":{\"notice\":\"Sets the damp speed used to update the floatingAssetsAverage.\"},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"notice\":\"Sets the factor used when smoothly accruing earnings to the floating pool.\"},\"setFrozen(bool)\":{\"notice\":\"Sets `isFrozen` state, triggered by an authorized account.\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model to be used to calculate rates.\"},\"setMaxFuturePools(uint8)\":{\"notice\":\"Sets the protocol's max future pools for fixed borrowing and lending.\"},\"setPenaltyRate(uint256)\":{\"notice\":\"Sets the penalty rate per second.\"},\"setReserveFactor(uint128)\":{\"notice\":\"Sets the percentage that represents the liquidity reserves that can't be borrowed.\"},\"setRewardsController(address)\":{\"notice\":\"Sets the rewards controller to update account rewards when operating with the Market.\"},\"setTreasury(address,uint256)\":{\"notice\":\"Sets the treasury variables.\"},\"totalAssets()\":{\"notice\":\"Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator.\"},\"totalFloatingBorrowAssets()\":{\"notice\":\"Calculates the total floating debt, considering elapsed time since last update and current interest rate.\"},\"totalFloatingBorrowShares()\":{\"notice\":\"Total amount of floating borrow shares assigned to floating borrow accounts.\"},\"transfer(address,uint256)\":{\"notice\":\"Moves amount of shares from the caller's account to `to`.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Moves amount of shares from `from` to `to` using the allowance mechanism.\"},\"treasury()\":{\"notice\":\"Address of the treasury that will receive the allocated earnings.\"},\"treasuryFeeRate()\":{\"notice\":\"Rate to be charged by the treasury to floating and fixed borrows.\"},\"unpause()\":{\"notice\":\"Sets the pause state to false when threat is gone, triggered by an authorized account.\"},\"withdraw(uint256,address,address)\":{\"notice\":\"Withdraws the owner's floating pool assets to the receiver address.\"},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Withdraws a certain amount from a maturity.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Market.sol\":\"Market\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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 {Initializable} from \\\"../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 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 function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_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(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\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"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/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\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\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"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 (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport {Initializable} from \\\"../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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\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\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"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 {Initializable} from \\\"../../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\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"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/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\"},\"contracts/Auditor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract Auditor is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n\\n /// @notice Address that a market should have as price feed to consider as base price and avoid external price call.\\n address public constant BASE_FEED = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n /// @notice Target health factor that the account should have after it's liquidated to prevent cascade liquidations.\\n uint256 public constant TARGET_HEALTH = 1.25e18;\\n /// @notice Maximum value the liquidator can send and still have granular control of max assets.\\n /// Above this threshold, they should send `type(uint256).max`.\\n uint256 public constant ASSETS_THRESHOLD = type(uint256).max / 1e18;\\n\\n /// @notice Decimals that the answer of all price feeds should have.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 public immutable priceDecimals;\\n /// @notice Base factor to scale the price returned by the feed to 18 decimals.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable baseFactor;\\n /// @notice Base price used if the feed to fetch the price from is `BASE_FEED`.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable basePrice;\\n\\n /// @notice Tracks the markets' indexes that an account has entered as collateral.\\n mapping(address => uint256) public accountMarkets;\\n /// @notice Stores market parameters per each enabled market.\\n mapping(Market => MarketData) public markets;\\n /// @notice Array of all enabled markets.\\n Market[] public marketList;\\n\\n /// @notice Liquidation incentive factors for the liquidator and the lenders of the market where the debt is repaid.\\n LiquidationIncentive public liquidationIncentive;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(uint256 priceDecimals_) {\\n priceDecimals = priceDecimals_;\\n baseFactor = 10 ** (18 - priceDecimals_);\\n basePrice = 10 ** priceDecimals_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(LiquidationIncentive memory liquidationIncentive_) external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setLiquidationIncentive(liquidationIncentive_);\\n }\\n\\n /// @notice Allows assets of a certain market to be used as collateral for borrowing other assets.\\n /// @param market market to enabled as collateral.\\n function enterMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) != 0) return;\\n accountMarkets[msg.sender] = marketMap | marketMask;\\n\\n emit MarketEntered(market, msg.sender);\\n }\\n\\n /// @notice Removes market from sender's account liquidity calculation.\\n /// @dev Sender must not have an outstanding borrow balance in the asset, or be providing necessary collateral\\n /// for an outstanding borrow.\\n /// @param market market to be disabled as collateral.\\n function exitMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n (uint256 assets, uint256 debt) = market.accountSnapshot(msg.sender);\\n\\n // fail if the sender has a borrow balance\\n if (debt != 0) revert RemainingDebt();\\n\\n // fail if the sender is not permitted to redeem all of their assets\\n checkShortfall(market, msg.sender, assets);\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) == 0) return;\\n accountMarkets[msg.sender] = marketMap & ~marketMask;\\n\\n emit MarketExited(market, msg.sender);\\n }\\n\\n /// @notice Returns account's liquidity calculation.\\n /// @param account account in which the liquidity will be calculated.\\n /// @param marketToSimulate market in which to simulate withdraw operation.\\n /// @param withdrawAmount amount to simulate as withdraw.\\n /// @return sumCollateral sum of all collateral, already multiplied by each adjust factor (denominated in base).\\n /// @return sumDebtPlusEffects sum of all debt divided by adjust factor considering withdrawal (denominated in base).\\n function accountLiquidity(\\n address account,\\n Market marketToSimulate,\\n uint256 withdrawAmount\\n ) public view returns (uint256 sumCollateral, uint256 sumDebtPlusEffects) {\\n AccountLiquidity memory vars; // holds all our calculation results\\n\\n // for each asset the account is in\\n uint256 marketMap = accountMarkets[account];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 baseUnit = 10 ** m.decimals;\\n uint256 adjustFactor = m.adjustFactor;\\n\\n // read the balances\\n (vars.balance, vars.borrowBalance) = market.accountSnapshot(account);\\n\\n // get the normalized price of the asset (18 decimals)\\n vars.price = assetPrice(m.priceFeed);\\n\\n // sum all the collateral prices\\n sumCollateral += vars.balance.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n\\n // sum all the debt\\n sumDebtPlusEffects += vars.borrowBalance.mulDivUp(vars.price, baseUnit).divWadUp(adjustFactor);\\n\\n // simulate the effects of withdrawing from a pool\\n if (market == marketToSimulate) {\\n // calculate the effects of redeeming markets\\n // (having less collateral is the same as having more debt for this calculation)\\n if (withdrawAmount != 0) {\\n sumDebtPlusEffects += withdrawAmount.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n }\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Validates that the current state of the position and system are valid.\\n /// @dev To be called after adding the borrowed debt to the account position.\\n /// @param market address of the market where the borrow is made.\\n /// @param borrower address of the account that will repay the debt.\\n function checkBorrow(Market market, address borrower) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[borrower];\\n uint256 marketMask = 1 << m.index;\\n\\n // validate borrow state\\n if ((marketMap & marketMask) == 0) {\\n // only markets may call checkBorrow if borrower not in market\\n if (msg.sender != address(market)) revert NotMarket();\\n\\n accountMarkets[borrower] = marketMap | marketMask;\\n emit MarketEntered(market, borrower);\\n }\\n\\n // verify that current liquidity is not short\\n (uint256 collateral, uint256 debt) = accountLiquidity(borrower, Market(address(0)), 0);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Checks if the account has liquidity shortfall.\\n /// @param market address of the market where the operation will happen.\\n /// @param account address of the account to check for possible shortfall.\\n /// @param amount amount that the account wants to withdraw or transfer.\\n function checkShortfall(Market market, address account, uint256 amount) public view {\\n // if the account is not 'in' the market, bypass the liquidity check\\n if ((accountMarkets[account] & (1 << markets[market].index)) == 0) return;\\n\\n // otherwise, perform a hypothetical liquidity check to guard against shortfall\\n (uint256 collateral, uint256 debt) = accountLiquidity(account, market, amount);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Allows/rejects liquidation of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt is being repaid.\\n /// @param seizeMarket market from where the liquidator will seize assets.\\n /// @param borrower address in which the assets are being liquidated.\\n /// @param maxLiquidatorAssets maximum amount of debt the liquidator is willing to accept.\\n /// @return maxRepayAssets capped amount of debt the liquidator is allowed to repay.\\n function checkLiquidation(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 maxLiquidatorAssets\\n ) external view returns (uint256 maxRepayAssets) {\\n // if markets are listed, they have the same auditor\\n if (!markets[repayMarket].isListed || !markets[seizeMarket].isListed) revert MarketNotListed();\\n\\n MarketVars memory repay;\\n LiquidityVars memory base;\\n uint256 marketMap = accountMarkets[borrower];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage marketData = markets[market];\\n MarketVars memory m = MarketVars({\\n price: assetPrice(marketData.priceFeed),\\n adjustFactor: marketData.adjustFactor,\\n baseUnit: 10 ** marketData.decimals\\n });\\n\\n if (market == repayMarket) repay = m;\\n\\n (uint256 collateral, uint256 debt) = market.accountSnapshot(borrower);\\n\\n uint256 value = debt.mulDivUp(m.price, m.baseUnit);\\n base.totalDebt += value;\\n base.adjustedDebt += value.divWadUp(m.adjustFactor);\\n\\n value = collateral.mulDivDown(m.price, m.baseUnit);\\n base.totalCollateral += value;\\n base.adjustedCollateral += value.mulWadDown(m.adjustFactor);\\n if (market == seizeMarket) base.seizeAvailable = value;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (base.adjustedCollateral >= base.adjustedDebt) revert InsufficientShortfall();\\n\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n uint256 adjustFactor = base.adjustedCollateral.mulWadDown(base.totalDebt).divWadUp(\\n base.adjustedDebt.mulWadUp(base.totalCollateral)\\n );\\n uint256 closeFactor = (TARGET_HEALTH - base.adjustedCollateral.divWadUp(base.adjustedDebt)).divWadUp(\\n TARGET_HEALTH - adjustFactor.mulWadDown(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n );\\n maxRepayAssets = Math.min(\\n Math\\n .min(\\n base.totalDebt.mulWadUp(Math.min(1e18, closeFactor)),\\n base.seizeAvailable.divWadUp(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n )\\n .mulDivUp(repay.baseUnit, repay.price),\\n maxLiquidatorAssets < ASSETS_THRESHOLD\\n ? maxLiquidatorAssets.divWadDown(1e18 + memIncentive.lenders)\\n : maxLiquidatorAssets\\n );\\n }\\n\\n /// @notice Allow/rejects seizing of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market where the assets will be seized.\\n function checkSeize(Market repayMarket, Market seizeMarket) external view {\\n // if markets are listed, they also point to the same Auditor\\n if (!markets[seizeMarket].isListed || !markets[repayMarket].isListed) revert MarketNotListed();\\n }\\n\\n /// @notice Calculates the amount of collateral to be seized when a position is undercollateralized.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market from where the assets will be seized by the liquidator.\\n /// @param borrower account in which assets are being seized.\\n /// @param actualRepayAssets amount being repaid.\\n /// @return lendersAssets amount to be added for other lenders as a compensation of bad debt clearing.\\n /// @return seizeAssets amount that can be seized by the liquidator.\\n function calculateSeize(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 actualRepayAssets\\n ) external view returns (uint256 lendersAssets, uint256 seizeAssets) {\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n lendersAssets = actualRepayAssets.mulWadDown(memIncentive.lenders);\\n\\n // read prices for borrowed and collateral markets\\n uint256 priceBorrowed = assetPrice(markets[repayMarket].priceFeed);\\n uint256 priceCollateral = assetPrice(markets[seizeMarket].priceFeed);\\n uint256 baseAmount = actualRepayAssets.mulDivUp(priceBorrowed, 10 ** markets[repayMarket].decimals);\\n\\n seizeAssets = Math.min(\\n baseAmount.mulDivUp(10 ** markets[seizeMarket].decimals, priceCollateral).mulWadUp(\\n 1e18 + memIncentive.liquidator + memIncentive.lenders\\n ),\\n seizeMarket.maxWithdraw(borrower)\\n );\\n }\\n\\n /// @notice Checks if account has debt with no collateral, if so then call `clearBadDebt` from each market.\\n /// @dev Collateral is multiplied by price and adjust factor to be accurately evaluated as positive collateral asset.\\n /// @param account account in which debt is being checked.\\n function handleBadDebt(address account) external {\\n uint256 memMarketMap = accountMarkets[account];\\n uint256 marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 assets = market.maxWithdraw(account);\\n if (assets.mulDivDown(assetPrice(m.priceFeed), 10 ** m.decimals).mulWadDown(m.adjustFactor) > 0) return;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) marketList[i].clearBadDebt(account);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the asset price of a price feed.\\n /// @dev If Chainlink's asset price is <= 0 the call is reverted.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price.\\n /// @return The price of the asset scaled to 18-digit decimals.\\n function assetPrice(IPriceFeed priceFeed) public view returns (uint256) {\\n if (address(priceFeed) == BASE_FEED) return basePrice;\\n\\n int256 price = priceFeed.latestAnswer();\\n if (price <= 0) revert InvalidPrice();\\n return uint256(price) * baseFactor;\\n }\\n\\n /// @notice Retrieves all markets.\\n function allMarkets() external view returns (Market[] memory) {\\n return marketList;\\n }\\n\\n /// @notice Enables a certain market.\\n /// @dev Enabling more than 256 markets will cause an overflow when casting market index to uint8.\\n /// @param market market to add to the protocol.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n /// @param adjustFactor market's adjust factor for the underlying asset.\\n function enableMarket(\\n Market market,\\n IPriceFeed priceFeed,\\n uint128 adjustFactor\\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (market.auditor() != this) revert AuditorMismatch();\\n if (markets[market].isListed) revert MarketAlreadyListed();\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n\\n uint8 decimals = market.decimals();\\n markets[market] = MarketData({\\n isListed: true,\\n adjustFactor: adjustFactor,\\n decimals: decimals,\\n index: uint8(marketList.length),\\n priceFeed: priceFeed\\n });\\n\\n marketList.push(market);\\n\\n emit MarketListed(market, decimals);\\n emit PriceFeedSet(market, priceFeed);\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the adjust factor for a certain market.\\n /// @param market address of the market to change adjust factor for.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n function setAdjustFactor(Market market, uint128 adjustFactor) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (!markets[market].isListed) revert MarketNotListed();\\n\\n markets[market].adjustFactor = adjustFactor;\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the Chainlink Price Feed Aggregator source for a market.\\n /// @param market market address of the asset.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n function setPriceFeed(Market market, IPriceFeed priceFeed) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n markets[market].priceFeed = priceFeed;\\n emit PriceFeedSet(market, priceFeed);\\n }\\n\\n /// @notice Sets liquidation incentive (liquidator and lenders) for the whole ecosystem.\\n /// @param liquidationIncentive_ new liquidation incentive.\\n function setLiquidationIncentive(\\n LiquidationIncentive memory liquidationIncentive_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n liquidationIncentive = liquidationIncentive_;\\n emit LiquidationIncentiveSet(liquidationIncentive_);\\n }\\n\\n /// @notice Emitted when a new market is listed for borrow/lending.\\n /// @param market address of the market that was listed.\\n /// @param decimals decimals of the market's underlying asset.\\n event MarketListed(Market indexed market, uint8 decimals);\\n\\n /// @notice Emitted when an account enters a market to use his deposit as collateral for a loan.\\n /// @param market address of the market that the account entered.\\n /// @param account address of the account that just entered a market.\\n event MarketEntered(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when an account leaves a market.\\n /// Means that they would stop using their deposit as collateral and won't ask for any loans in this market.\\n /// @param market address of the market that the account just left.\\n /// @param account address of the account that just left a market.\\n event MarketExited(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when a adjust factor is changed by admin.\\n /// @param market address of the market that has a new adjust factor.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n event AdjustFactorSet(Market indexed market, uint256 adjustFactor);\\n\\n /// @notice Emitted when a new liquidationIncentive has been set.\\n /// @param liquidationIncentive represented with 18 decimals.\\n event LiquidationIncentiveSet(LiquidationIncentive liquidationIncentive);\\n\\n /// @notice Emitted when a market and prie feed is changed by admin.\\n /// @param market address of the asset used to get the price.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n event PriceFeedSet(Market indexed market, IPriceFeed indexed priceFeed);\\n\\n /// @notice Stores the market parameters used for liquidity calculations.\\n /// @param adjustFactor used to asses the lending power of the market's underlying asset.\\n /// @param decimals number of decimals of the market's underlying asset.\\n /// @param index index of the market in the `marketList`.\\n /// @param isListed true if the market is enabled.\\n /// @param priceFeed address of the price feed used to query the asset's price.\\n struct MarketData {\\n uint128 adjustFactor;\\n uint8 decimals;\\n uint8 index;\\n bool isListed;\\n IPriceFeed priceFeed;\\n }\\n\\n /// @notice Stores the liquidator and lenders factors used in liquidations to calculate the amount to seize.\\n /// @param liquidator factor used to calculate the extra bonus a liquidator can seize.\\n /// @param lenders factor used to calculate the bonus that the pool lenders receive.\\n struct LiquidationIncentive {\\n uint128 liquidator;\\n uint128 lenders;\\n }\\n\\n /// @notice Used as memory access to temporary store account liquidity data.\\n /// @param balance collateral balance of the account.\\n /// @param borrowBalance borrow balance of the account.\\n /// @param price asset price returned by the price feed with 18 decimals.\\n struct AccountLiquidity {\\n uint256 balance;\\n uint256 borrowBalance;\\n uint256 price;\\n }\\n}\\n\\nerror AuditorMismatch();\\nerror InsufficientAccountLiquidity();\\nerror InsufficientShortfall();\\nerror InvalidPrice();\\nerror InvalidPriceFeed();\\nerror MarketAlreadyListed();\\nerror MarketNotListed();\\nerror NotMarket();\\nerror RemainingDebt();\\n\\nstruct MarketVars {\\n uint256 price;\\n uint256 baseUnit;\\n uint128 adjustFactor;\\n}\\n\\nstruct LiquidityVars {\\n uint256 totalDebt;\\n uint256 totalCollateral;\\n uint256 adjustedDebt;\\n uint256 adjustedCollateral;\\n uint256 seizeAvailable;\\n}\\n\",\"keccak256\":\"0xa5facf0b53ee0f3a07843361add23000e569743c9b5a3cdf7817dc51a833040b\",\"license\":\"BUSL-1.1\"},\"contracts/InterestRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract InterestRateModel {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for int256;\\n using SafeCast for uint256;\\n using SafeCast for int256;\\n\\n /// @notice Scale factor of the floating curve.\\n uint256 public immutable floatingCurveA;\\n /// @notice Origin intercept of the floating curve.\\n int256 public immutable floatingCurveB;\\n /// @notice Asymptote of the floating curve.\\n uint256 public immutable floatingMaxUtilization;\\n\\n /// @notice natural level of utilization, represented with 18 decimals.\\n uint256 public immutable naturalUtilization;\\n /// @notice speed of growth for the base rate, represented with 18 decimals.\\n int256 public immutable growthSpeed;\\n /// @notice speed of the sigmoid curve, represented with 18 decimals.\\n int256 public immutable sigmoidSpeed;\\n /// @notice spread factor for the fixed rate, represented with 18 decimals.\\n int256 public immutable spreadFactor;\\n /// @notice speed of maturity for the fixed rate, represented with 18 decimals.\\n int256 public immutable maturitySpeed;\\n /// @notice time preference for the fixed rate, represented with 18 decimals.\\n int256 public immutable timePreference;\\n /// @notice liquidity naturally designated to fixed pools, represented with 18 decimals.\\n uint256 public immutable fixedAllocation;\\n /// @notice maximum interest rate, represented with 18 decimals.\\n uint256 public immutable maxRate;\\n\\n /// @dev maximum input value for expWad, ~ln((2^255 - 1) / 1e18), represented with 18 decimals.\\n int256 internal constant EXP_THRESHOLD = 135305999368893231588;\\n /// @dev auxiliary variable to save an extra operation.\\n int256 internal immutable auxSigmoid;\\n\\n /// @notice set of parameters used to initialize the interest rate model.\\n Parameters internal _parameters;\\n\\n constructor(Parameters memory p, Market market_) {\\n assert(\\n p.minRate > 0 &&\\n p.naturalRate > 0 &&\\n p.maxUtilization > 1e18 &&\\n p.naturalUtilization > 0 &&\\n p.naturalUtilization < 1e18 &&\\n p.growthSpeed > 0 &&\\n p.sigmoidSpeed > 0 &&\\n p.spreadFactor > 0 &&\\n p.maturitySpeed > 0 &&\\n p.maxRate > 0 &&\\n p.maxRate <= 15_000e16\\n );\\n\\n _parameters = p;\\n growthSpeed = p.growthSpeed.toInt256();\\n sigmoidSpeed = p.sigmoidSpeed.toInt256();\\n spreadFactor = p.spreadFactor.toInt256();\\n maturitySpeed = p.maturitySpeed.toInt256();\\n floatingMaxUtilization = p.maxUtilization;\\n naturalUtilization = p.naturalUtilization;\\n\\n floatingCurveA =\\n ((p.naturalRate.mulWadUp(\\n uint256(((growthSpeed * (1e18 - int256(p.naturalUtilization / 2)).lnWad()) / 1e18).expWad())\\n ) - p.minRate) *\\n (p.maxUtilization - p.naturalUtilization) *\\n (p.maxUtilization)) /\\n (p.naturalUtilization * 1e18);\\n floatingCurveB = int256(p.minRate) - int256(floatingCurveA.divWadDown(p.maxUtilization));\\n\\n market = market_;\\n fixedCurveA = address(market_) != address(0) ? floatingCurveA : 0;\\n fixedCurveB = address(market_) != address(0) ? floatingCurveB : int256(0);\\n fixedMaxUtilization = address(market_) != address(0) ? p.maxUtilization : 0;\\n\\n timePreference = p.timePreference;\\n fixedAllocation = p.fixedAllocation;\\n maxRate = p.maxRate;\\n\\n auxSigmoid = int256(naturalUtilization.divWadDown(1e18 - naturalUtilization)).lnWad();\\n\\n // reverts if it's an invalid curve (such as one yielding a negative interest rate).\\n fixedRate(block.timestamp + FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL), 2, 1, 1, 2);\\n baseRate(1e18 - 1, 1e18 - 1);\\n }\\n\\n /// @notice fixed rate with given conditions, represented with 18 decimals.\\n /// @param maturity maturity of the pool.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param uFixed fixed utilization of the pool.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `base * spread` and `maxRate` with given conditions.\\n function fixedRate(\\n uint256 maturity,\\n uint256 maxPools,\\n uint256 uFixed,\\n uint256 uFloating,\\n uint256 uGlobal\\n ) public view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n if (uFixed > uGlobal) revert UtilizationExceeded();\\n if (uGlobal == 0) return baseRate(uFloating, 0);\\n\\n FixedVars memory v;\\n v.sqFNatPools = (maxPools * 1e18).divWadDown(fixedAllocation);\\n v.fNatPools = (v.sqFNatPools * 1e18).sqrt();\\n v.fixedFactor = (maxPools * uFixed).mulDivDown(1e36, uGlobal * fixedAllocation);\\n v.natPools =\\n ((2e18 - v.sqFNatPools.toInt256()) * 1e36) /\\n (v.fNatPools.toInt256() * (1e18 - v.fNatPools.toInt256()));\\n v.maturityFactor = (maturity - block.timestamp).divWadDown(\\n block.timestamp + maxPools * FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL)\\n );\\n\\n uint256 spread = (1e18 +\\n (((maturitySpeed * (v.maturityFactor).toInt256().lnWad()) / 1e18).expWad() *\\n (timePreference +\\n (spreadFactor *\\n ((v.natPools * (v.fixedFactor * 1e18).sqrt().toInt256()) /\\n 1e18 +\\n ((1e18 - v.natPools) * v.fixedFactor.toInt256()) /\\n 1e18 -\\n 1e18)) /\\n 1e18)) /\\n 1e18).toUint256();\\n uint256 base = baseRate(uFloating, uGlobal);\\n\\n if (base >= maxRate.divWadDown(spread)) return maxRate;\\n return base.mulWadUp(spread);\\n }\\n\\n /// @notice base rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the base rate, without capping.\\n function baseRate(uint256 uFloating, uint256 uGlobal) internal view returns (uint256) {\\n if (uFloating > uGlobal) revert UtilizationExceeded();\\n if (uGlobal >= 1e18) return type(uint256).max;\\n\\n uint256 r = ((floatingCurveA.divWadDown(floatingMaxUtilization - uFloating)).toInt256() + floatingCurveB)\\n .toUint256();\\n\\n if (uGlobal == 0) return r;\\n\\n int256 x = -((sigmoidSpeed * (int256(uGlobal.divWadDown(1e18 - uGlobal)).lnWad() - auxSigmoid)) / 1e18);\\n uint256 sigmoid = x > EXP_THRESHOLD ? 0 : uint256(1e18).divWadDown(1e18 + x.expWad().toUint256());\\n x = (-growthSpeed * (1e18 - sigmoid.mulWadDown(uGlobal)).toInt256().lnWad()) / 1e18;\\n uint256 globalFactor = ((x > EXP_THRESHOLD ? EXP_THRESHOLD : x).expWad()).toUint256();\\n\\n if (globalFactor > type(uint256).max / r) return type(uint256).max;\\n\\n return r.mulWadUp(globalFactor);\\n }\\n\\n /// @notice floating rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `baseRate` and `maxRate` with given conditions.\\n function floatingRate(uint256 uFloating, uint256 uGlobal) public view returns (uint256) {\\n return Math.min(baseRate(uFloating, uGlobal), maxRate);\\n }\\n\\n function parameters() external view returns (Parameters memory) {\\n return _parameters;\\n }\\n\\n // Legacy interface, kept for compatibility.\\n\\n /// @notice Market where the interest rate model is used. Keeps compatibility with legacy interest rate model.\\n Market public immutable market;\\n uint256 public immutable fixedCurveA;\\n int256 public immutable fixedCurveB;\\n uint256 public immutable fixedMaxUtilization;\\n\\n /// @dev Deprecated in favor of `floatingRate(uFloating, uGlobal)`.\\n function floatingRate(uint256) public view returns (uint256) {\\n uint256 floatingAssets = market.floatingAssets();\\n uint256 floatingDebt = market.floatingDebt();\\n return\\n floatingRate(\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed())\\n );\\n }\\n\\n /// @dev Deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function fixedBorrowRate(\\n uint256 maturity,\\n uint256 amount,\\n uint256 borrowed,\\n uint256 supplied,\\n uint256\\n ) external view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n uint256 floatingAssets = previewFloatingAssetsAverage(maturity);\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n uint256 newBorrowed = borrowed + amount;\\n uint256 backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, supplied), newBorrowed);\\n\\n return\\n fixedRate(\\n maturity,\\n market.maxFuturePools(),\\n fixedUtilization(supplied, newBorrowed, floatingAssets),\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed() + backupDebtAddition)\\n ).mulDivDown(maturity - block.timestamp, 365 days);\\n }\\n\\n /// @dev deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function minFixedRate(uint256, uint256, uint256) external view returns (uint256 rate, uint256 utilization) {\\n uint256 floatingAssets = market.floatingAssetsAverage();\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n utilization = globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed());\\n rate = baseRate(floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0, utilization);\\n }\\n\\n function previewFloatingAssetsAverage(uint256 maturity) internal view returns (uint256) {\\n FixedLib.Pool memory pool;\\n (pool.borrowed, pool.supplied, pool.unassignedEarnings, pool.lastAccrual) = market.fixedPools(maturity);\\n uint256 memFloatingAssets = market.floatingAssets() +\\n pool.unassignedEarnings.mulDivDown(block.timestamp - pool.lastAccrual, maturity - pool.lastAccrual);\\n uint256 memFloatingAssetsAverage = market.floatingAssetsAverage();\\n uint256 averageFactor = (1e18 -\\n (\\n -int256(\\n memFloatingAssets < memFloatingAssetsAverage\\n ? market.dampSpeedDown()\\n : market.dampSpeedUp() * (block.timestamp - market.lastAverageUpdate())\\n )\\n ).expWad()).toUint256();\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n function globalUtilization(\\n uint256 floatingAssets,\\n uint256 floatingDebt,\\n uint256 backupBorrowed\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 ? (floatingDebt + backupBorrowed).divWadUp(floatingAssets) : 0;\\n }\\n\\n function fixedUtilization(\\n uint256 supplied,\\n uint256 borrowed,\\n uint256 floatingAssets\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(floatingAssets) : 0;\\n }\\n}\\n\\nerror AlreadyMatured();\\nerror UtilizationExceeded();\\n\\nstruct Parameters {\\n uint256 minRate;\\n uint256 naturalRate;\\n uint256 maxUtilization;\\n uint256 naturalUtilization;\\n uint256 growthSpeed;\\n uint256 sigmoidSpeed;\\n uint256 spreadFactor;\\n uint256 maturitySpeed;\\n int256 timePreference;\\n uint256 fixedAllocation;\\n uint256 maxRate;\\n}\\n\\nstruct FixedVars {\\n uint256 sqFNatPools;\\n uint256 fNatPools;\\n uint256 fixedFactor;\\n int256 natPools;\\n uint256 maturityFactor;\\n}\\n\",\"keccak256\":\"0x9df5219d8182a14f123a725c73a586aed83c3d39c17b45a0a59e3923e4fe6532\",\"license\":\"BUSL-1.1\"},\"contracts/Market.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { PausableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { ERC4626, ERC20, SafeTransferLib } from \\\"solmate/src/mixins/ERC4626.sol\\\";\\nimport { InterestRateModel } from \\\"./InterestRateModel.sol\\\";\\nimport { RewardsController } from \\\"./RewardsController.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Auditor } from \\\"./Auditor.sol\\\";\\n\\ncontract Market is Initializable, AccessControlUpgradeable, PausableUpgradeable, ERC4626 {\\n using FixedPointMathLib for int256;\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint128;\\n using SafeTransferLib for ERC20;\\n using FixedLib for FixedLib.Pool;\\n using FixedLib for FixedLib.Position;\\n using FixedLib for uint256;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant EMERGENCY_ADMIN_ROLE = keccak256(\\\"EMERGENCY_ADMIN_ROLE\\\");\\n\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n Auditor public immutable auditor;\\n\\n /// @notice Tracks account's fixed deposit positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedDepositPositions;\\n /// @notice Tracks account's fixed borrow positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedBorrowPositions;\\n /// @notice Tracks fixed pools state by maturity.\\n mapping(uint256 => FixedLib.Pool) public fixedPools;\\n\\n /// @notice Tracks fixed deposit and borrow map and floating borrow shares of an account.\\n mapping(address => Account) public accounts;\\n\\n /// @notice Amount of assets lent by the floating pool to the fixed pools.\\n uint256 public floatingBackupBorrowed;\\n /// @notice Amount of assets lent by the floating pool to accounts.\\n uint256 public floatingDebt;\\n\\n /// @notice Accumulated earnings from extraordinary sources to be gradually distributed.\\n uint256 public earningsAccumulator;\\n /// @notice Rate per second to be charged to delayed fixed pools borrowers after maturity.\\n uint256 public penaltyRate;\\n /// @notice Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\\n uint256 public backupFeeRate;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\\n uint256 public dampSpeedUp;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\\n uint256 public dampSpeedDown;\\n\\n /// @notice Number of fixed pools to be active at the same time.\\n uint8 public maxFuturePools;\\n /// @notice Last time the accumulator distributed earnings.\\n uint32 public lastAccumulatorAccrual;\\n /// @notice Last time the floating debt was updated.\\n uint32 public lastFloatingDebtUpdate;\\n /// @notice Last time the floating assets average was updated.\\n uint32 public lastAverageUpdate;\\n\\n /// @notice Interest rate model contract used to get the borrow rates.\\n InterestRateModel public interestRateModel;\\n\\n /// @notice Factor used for gradual accrual of earnings to the floating pool.\\n uint128 public earningsAccumulatorSmoothFactor;\\n /// @notice Percentage factor that represents the liquidity reserves that can't be borrowed.\\n uint128 public reserveFactor;\\n\\n /// @notice Amount of floating assets deposited to the pool.\\n uint256 public floatingAssets;\\n /// @notice Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\\n uint256 public floatingAssetsAverage;\\n\\n /// @notice Total amount of floating borrow shares assigned to floating borrow accounts.\\n uint256 public totalFloatingBorrowShares;\\n\\n /// @dev gap from deprecated state.\\n /// @custom:oz-renamed-from floatingUtilization\\n uint256 private __gap;\\n\\n /// @notice Address of the treasury that will receive the allocated earnings.\\n address public treasury;\\n /// @notice Rate to be charged by the treasury to floating and fixed borrows.\\n uint256 public treasuryFeeRate;\\n\\n /// @notice Address of the rewards controller that will accrue rewards for accounts operating with the Market.\\n RewardsController public rewardsController;\\n\\n /// @notice Flag to prevent new borrows and deposits.\\n bool public isFrozen;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(ERC20 asset_, Auditor auditor_) ERC4626(asset_, \\\"\\\", \\\"\\\") {\\n auditor = auditor_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(\\n string calldata assetSymbol,\\n uint8 maxFuturePools_,\\n uint128 earningsAccumulatorSmoothFactor_,\\n InterestRateModel interestRateModel_,\\n uint256 penaltyRate_,\\n uint256 backupFeeRate_,\\n uint128 reserveFactor_,\\n uint256 dampSpeedUp_,\\n uint256 dampSpeedDown_\\n ) external initializer {\\n __AccessControl_init();\\n __Pausable_init();\\n\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n lastAverageUpdate = uint32(block.timestamp);\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setAssetSymbol(assetSymbol);\\n setMaxFuturePools(maxFuturePools_);\\n setEarningsAccumulatorSmoothFactor(earningsAccumulatorSmoothFactor_);\\n setInterestRateModel(interestRateModel_);\\n setPenaltyRate(penaltyRate_);\\n setBackupFeeRate(backupFeeRate_);\\n setReserveFactor(reserveFactor_);\\n setDampSpeed(dampSpeedUp_, dampSpeedDown_);\\n }\\n\\n /// @notice Borrows a certain amount from the floating pool.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return borrowShares shares corresponding to the borrowed assets.\\n function borrow(\\n uint256 assets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 borrowShares) {\\n spendAllowance(borrower, assets);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n\\n borrowShares = previewBorrow(assets);\\n\\n uint256 newFloatingDebt = floatingDebt + assets;\\n floatingDebt = newFloatingDebt;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed, also considering the reserves\\n if (floatingBackupBorrowed + newFloatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n\\n totalFloatingBorrowShares += borrowShares;\\n accounts[borrower].floatingBorrowShares += borrowShares;\\n\\n emit Borrow(msg.sender, receiver, borrower, assets, borrowShares);\\n emitMarketUpdate();\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Repays a certain amount of assets to the floating pool.\\n /// @param assets assets to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepay the actual amount that should be transferred into the protocol.\\n /// @return borrowShares subtracted shares from the borrower's accountability.\\n function repay(\\n uint256 assets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepay, uint256 borrowShares) {\\n (actualRepay, borrowShares) = noTransferRefund(previewRepay(assets), borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), actualRepay);\\n }\\n\\n /// @notice Repays a certain amount of shares to the floating pool.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return assets subtracted assets from the borrower's accountability.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function refund(\\n uint256 borrowShares,\\n address borrower\\n ) external whenNotPaused returns (uint256 assets, uint256 actualShares) {\\n (assets, actualShares) = noTransferRefund(borrowShares, borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Allows to (partially) repay a floating borrow. It does not transfer assets.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower the address of the account that has the debt.\\n /// @return assets the actual amount that should be transferred into the protocol.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function noTransferRefund(\\n uint256 borrowShares,\\n address borrower\\n ) internal returns (uint256 assets, uint256 actualShares) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n Account storage account = accounts[borrower];\\n uint256 accountBorrowShares = account.floatingBorrowShares;\\n actualShares = Math.min(borrowShares, accountBorrowShares);\\n assets = previewRefund(actualShares);\\n\\n if (assets == 0) revert ZeroRepay();\\n\\n floatingDebt -= assets;\\n account.floatingBorrowShares = accountBorrowShares - actualShares;\\n totalFloatingBorrowShares -= actualShares;\\n\\n emit Repay(msg.sender, borrower, assets, actualShares);\\n }\\n\\n /// @notice Deposits a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be deposited.\\n /// @param assets amount to receive from the msg.sender.\\n /// @param minAssetsRequired minimum amount of assets required by the depositor for the transaction to be accepted.\\n /// @param receiver address that will be able to withdraw the deposited assets.\\n /// @return positionAssets total amount of assets (principal + fee) to be withdrawn at maturity.\\n function depositAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 minAssetsRequired,\\n address receiver\\n ) external whenNotPaused whenNotFrozen returns (uint256 positionAssets) {\\n if (assets == 0) revert ZeroDeposit();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n floatingAssets += backupEarnings;\\n\\n (uint256 fee, uint256 backupFee) = pool.calculateDeposit(assets, backupFeeRate);\\n positionAssets = assets + fee;\\n if (positionAssets < minAssetsRequired) revert Disagreement();\\n\\n floatingBackupBorrowed -= pool.deposit(assets);\\n pool.unassignedEarnings -= fee + backupFee;\\n earningsAccumulator += backupFee;\\n\\n // update account's position\\n FixedLib.Position storage position = fixedDepositPositions[maturity][receiver];\\n\\n // if account doesn't have a current position, add it to the list\\n if (position.principal == 0) {\\n Account storage account = accounts[receiver];\\n account.fixedDeposits = account.fixedDeposits.setMaturity(maturity);\\n }\\n\\n position.principal += assets;\\n position.fee += fee;\\n\\n emit DepositAtMaturity(maturity, msg.sender, receiver, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Borrows a certain amount from a maturity.\\n /// @param maturity maturity date for repayment.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return assetsOwed total amount of assets (principal + fee) to be repaid at maturity.\\n function borrowAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 maxAssets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 assetsOwed) {\\n if (assets == 0) revert ZeroBorrow();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n {\\n uint256 backupDebtAddition = pool.borrow(assets);\\n if (backupDebtAddition != 0) {\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed + backupDebtAddition;\\n depositToTreasury(updateFloatingDebt());\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n }\\n uint256 fee;\\n {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, floatingBackupBorrowed)\\n );\\n fee = assets.mulWadDown(fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n }\\n assetsOwed = assets + fee;\\n\\n // validate that the account is not taking arbitrary fees\\n if (assetsOwed > maxAssets) revert Disagreement();\\n\\n spendAllowance(borrower, assetsOwed);\\n\\n {\\n // if account doesn't have a current position, add it to the list\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n if (position.principal == 0) {\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.setMaturity(maturity);\\n }\\n\\n // calculate what portion of the fees are to be accrued and what portion goes to earnings accumulator\\n (uint256 newUnassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(fee),\\n assets\\n );\\n if (newUnassignedEarnings != 0) pool.unassignedEarnings += newUnassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n fixedBorrowPositions[maturity][borrower] = FixedLib.Position(position.principal + assets, position.fee + fee);\\n }\\n\\n emit BorrowAtMaturity(maturity, msg.sender, receiver, borrower, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Withdraws a certain amount from a maturity.\\n /// @param maturity maturity date where the assets will be withdrawn.\\n /// @param positionAssets position size to be reduced.\\n /// @param minAssetsRequired minimum amount required by the account (if discount included for early withdrawal).\\n /// @param receiver address that will receive the withdrawn assets.\\n /// @param owner address that previously deposited the assets.\\n /// @return assetsDiscounted amount of assets withdrawn (can include a discount for early withdraw).\\n function withdrawAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 minAssetsRequired,\\n address receiver,\\n address owner\\n ) external whenNotPaused returns (uint256 assetsDiscounted) {\\n if (positionAssets == 0) revert ZeroWithdraw();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n FixedLib.Position memory position = fixedDepositPositions[maturity][owner];\\n\\n if (positionAssets > position.principal + position.fee) positionAssets = position.principal + position.fee;\\n\\n {\\n // remove the supply from the fixed rate pool\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed +\\n pool.withdraw(\\n FixedLib.Position(position.principal, position.fee).scaleProportionally(positionAssets).principal\\n );\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets) revert InsufficientProtocolLiquidity();\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n\\n // verify if there are any penalties/fee for the account because of early withdrawal, if so discount\\n if (block.timestamp < maturity) {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingBackupBorrowed = floatingBackupBorrowed;\\n\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, memFloatingBackupBorrowed)\\n );\\n assetsDiscounted = positionAssets.divWadDown(1e18 + fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n } else {\\n assetsDiscounted = positionAssets;\\n }\\n\\n if (assetsDiscounted < minAssetsRequired) revert Disagreement();\\n\\n spendAllowance(owner, assetsDiscounted);\\n\\n // all the fees go to unassigned or to the floating pool\\n (uint256 unassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(positionAssets - assetsDiscounted),\\n assetsDiscounted\\n );\\n pool.unassignedEarnings += unassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n // the account gets discounted the full amount\\n position.reduceProportionally(positionAssets);\\n if (position.principal | position.fee == 0) {\\n delete fixedDepositPositions[maturity][owner];\\n Account storage account = accounts[owner];\\n account.fixedDeposits = account.fixedDeposits.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedDepositPositions[maturity][owner] = position;\\n }\\n\\n emit WithdrawAtMaturity(maturity, msg.sender, receiver, owner, positionAssets, assetsDiscounted);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransfer(receiver, assetsDiscounted);\\n }\\n\\n /// @notice Repays a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be repaid.\\n /// @param positionAssets amount to be paid for the borrower's debt.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepayAssets the actual amount that was transferred into the protocol.\\n function repayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepayAssets) {\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n actualRepayAssets = noTransferRepayAtMaturity(maturity, positionAssets, maxAssets, borrower, true);\\n emitMarketUpdate();\\n\\n asset.safeTransferFrom(msg.sender, address(this), actualRepayAssets);\\n }\\n\\n /// @notice Allows to (partially) repay a fixed rate position. It does not transfer assets.\\n /// @param maturity the maturity to access the pool.\\n /// @param positionAssets the amount of debt of the pool that should be paid.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower the address of the account that has the debt.\\n /// @param canDiscount should early repay discounts be applied.\\n /// @return actualRepayAssets the actual amount that should be transferred into the protocol.\\n function noTransferRepayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower,\\n bool canDiscount\\n ) internal returns (uint256 actualRepayAssets) {\\n if (positionAssets == 0) revert ZeroRepay();\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n floatingAssets += backupEarnings;\\n\\n FixedLib.Position memory position = fixedBorrowPositions[maturity][borrower];\\n\\n uint256 debtCovered = Math.min(positionAssets, position.principal + position.fee);\\n\\n uint256 principalCovered = FixedLib\\n .Position(position.principal, position.fee)\\n .scaleProportionally(debtCovered)\\n .principal;\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n // early repayment allows a discount from the unassigned earnings\\n if (block.timestamp < maturity) {\\n if (canDiscount) {\\n // calculate the deposit fee considering the amount of debt the account'll pay\\n (uint256 discountFee, uint256 backupFee) = pool.calculateDeposit(principalCovered, backupFeeRate);\\n\\n // remove the fee from unassigned earnings\\n pool.unassignedEarnings -= discountFee + backupFee;\\n\\n // the fee charged to the fixed pool supplier goes to the earnings accumulator\\n earningsAccumulator += backupFee;\\n\\n // the fee gets discounted from the account through `actualRepayAssets`\\n actualRepayAssets = debtCovered - discountFee;\\n } else {\\n actualRepayAssets = debtCovered;\\n }\\n } else {\\n actualRepayAssets = debtCovered + debtCovered.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n\\n // all penalties go to the earnings accumulator\\n earningsAccumulator += actualRepayAssets - debtCovered;\\n }\\n\\n // verify that the account agrees to this discount or penalty\\n if (actualRepayAssets > maxAssets) revert Disagreement();\\n\\n // reduce the borrowed from the pool and might decrease the floating backup borrowed\\n floatingBackupBorrowed -= pool.repay(principalCovered);\\n\\n // update the account position\\n position.reduceProportionally(debtCovered);\\n if (position.principal | position.fee == 0) {\\n delete fixedBorrowPositions[maturity][borrower];\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedBorrowPositions[maturity][borrower] = position;\\n }\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, actualRepayAssets, debtCovered);\\n emitFixedEarningsUpdate(maturity);\\n }\\n\\n /// @notice Liquidates undercollateralized fixed/floating (or both) position(s).\\n /// @dev Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool,\\n /// or/and for multiple fixed pools, seizing a portion of borrower's collateral.\\n /// @param borrower account that has an outstanding debt across floating or fixed pools.\\n /// @param maxAssets maximum amount of debt that the liquidator is willing to accept. (it can be less)\\n /// @param seizeMarket market from which the collateral will be seized to give to the liquidator.\\n /// @return repaidAssets actual amount repaid.\\n function liquidate(\\n address borrower,\\n uint256 maxAssets,\\n Market seizeMarket\\n ) external whenNotPaused returns (uint256 repaidAssets) {\\n if (msg.sender == borrower) revert SelfLiquidation();\\n\\n maxAssets = auditor.checkLiquidation(this, seizeMarket, borrower, maxAssets);\\n if (maxAssets == 0) revert ZeroRepay();\\n\\n Account storage account = accounts[borrower];\\n\\n {\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0 && maxAssets != 0) {\\n if (packedMaturities & 1 != 0) {\\n uint256 actualRepay;\\n if (block.timestamp < maturity) {\\n actualRepay = noTransferRepayAtMaturity(maturity, maxAssets, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n } else {\\n uint256 position;\\n {\\n FixedLib.Position storage p = fixedBorrowPositions[maturity][borrower];\\n position = p.principal + p.fee;\\n }\\n uint256 debt = position + position.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n actualRepay = debt > maxAssets ? maxAssets.mulDivDown(position, debt) : maxAssets;\\n\\n if (actualRepay == 0) maxAssets = 0;\\n else {\\n actualRepay = noTransferRepayAtMaturity(maturity, actualRepay, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n }\\n }\\n repaidAssets += actualRepay;\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n\\n if (maxAssets != 0 && account.floatingBorrowShares != 0) {\\n uint256 borrowShares = previewRepay(maxAssets);\\n if (borrowShares != 0) {\\n (uint256 actualRepayAssets, ) = noTransferRefund(borrowShares, borrower);\\n repaidAssets += actualRepayAssets;\\n }\\n }\\n\\n // reverts on failure\\n (uint256 lendersAssets, uint256 seizeAssets) = auditor.calculateSeize(this, seizeMarket, borrower, repaidAssets);\\n earningsAccumulator += lendersAssets;\\n\\n if (address(seizeMarket) == address(this)) {\\n internalSeize(this, msg.sender, borrower, seizeAssets);\\n } else {\\n seizeMarket.seize(msg.sender, borrower, seizeAssets);\\n\\n emitMarketUpdate();\\n }\\n\\n emit Liquidate(msg.sender, borrower, repaidAssets, lendersAssets, seizeMarket, seizeAssets);\\n\\n auditor.handleBadDebt(borrower);\\n\\n asset.safeTransferFrom(msg.sender, address(this), repaidAssets + lendersAssets);\\n }\\n\\n /// @notice Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\\n /// @dev Can only be called from the auditor.\\n /// @param borrower account with insufficient collateral to be cleared the debt.\\n function clearBadDebt(address borrower) external {\\n if (msg.sender != address(auditor)) revert NotAuditor();\\n\\n floatingAssets += accrueAccumulatedEarnings();\\n Account storage account = accounts[borrower];\\n uint256 accumulator = earningsAccumulator;\\n uint256 totalBadDebt = 0;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 badDebt = position.principal + position.fee;\\n if (accumulator >= badDebt) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n accumulator -= badDebt;\\n totalBadDebt += badDebt;\\n floatingBackupBorrowed -= fixedPools[maturity].repay(position.principal);\\n delete fixedBorrowPositions[maturity][borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, badDebt, badDebt);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n if (account.floatingBorrowShares != 0 && (accumulator = previewRepay(accumulator)) != 0) {\\n (uint256 badDebt, ) = noTransferRefund(accumulator, borrower);\\n totalBadDebt += badDebt;\\n }\\n if (totalBadDebt != 0) {\\n earningsAccumulator -= totalBadDebt;\\n emit SpreadBadDebt(borrower, totalBadDebt);\\n }\\n emitMarketUpdate();\\n }\\n\\n /// @notice Public function to seize a certain amount of assets.\\n /// @dev Public function for liquidator to seize borrowers assets in the floating pool.\\n /// This function will only be called from another Market, on `liquidation` calls.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function seize(address liquidator, address borrower, uint256 assets) external whenNotPaused {\\n internalSeize(Market(msg.sender), liquidator, borrower, assets);\\n }\\n\\n /// @notice Internal function to seize a certain amount of assets.\\n /// @dev Internal function for liquidator to seize borrowers assets in the floating pool.\\n /// Will only be called from this Market on `liquidation` or through `seize` calls from another Market.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param seizeMarket address which is calling the seize function (see `seize` public function).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function internalSeize(Market seizeMarket, address liquidator, address borrower, uint256 assets) internal {\\n if (assets == 0) revert ZeroWithdraw();\\n\\n // reverts on failure\\n auditor.checkSeize(seizeMarket, this);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(borrower);\\n uint256 shares = previewWithdraw(assets);\\n beforeWithdraw(assets, shares);\\n _burn(borrower, shares);\\n emit Withdraw(msg.sender, liquidator, borrower, assets, shares);\\n emit Seize(liquidator, borrower, assets);\\n emitMarketUpdate();\\n\\n asset.safeTransfer(liquidator, assets);\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be withdrawn from the floating pool.\\n function beforeWithdraw(uint256 assets, uint256) internal override whenNotPaused {\\n updateFloatingAssetsAverage();\\n depositToTreasury(updateFloatingDebt());\\n uint256 earnings = accrueAccumulatedEarnings();\\n uint256 newFloatingAssets = floatingAssets + earnings - assets;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed\\n if (floatingBackupBorrowed + floatingDebt > newFloatingAssets) revert InsufficientProtocolLiquidity();\\n floatingAssets = newFloatingAssets;\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be deposited to the floating pool.\\n function afterDeposit(uint256 assets, uint256) internal override whenNotPaused whenNotFrozen {\\n updateFloatingAssetsAverage();\\n uint256 treasuryFee = updateFloatingDebt();\\n uint256 earnings = accrueAccumulatedEarnings();\\n floatingAssets += earnings + assets;\\n depositToTreasury(treasuryFee);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Withdraws the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param assets amount of underlying to be withdrawn.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return shares amount of shares redeemed for underlying asset.\\n function withdraw(uint256 assets, address receiver, address owner) public override returns (uint256 shares) {\\n auditor.checkShortfall(this, owner, assets);\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n shares = super.withdraw(assets, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Redeems the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param shares amount of shares to be redeemed for underlying asset.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return assets amount of underlying asset that was withdrawn.\\n function redeem(uint256 shares, address receiver, address owner) public override returns (uint256 assets) {\\n auditor.checkShortfall(this, owner, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n assets = super.redeem(shares, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n function _mint(address to, uint256 amount) internal override {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(to);\\n super._mint(to, amount);\\n }\\n\\n /// @notice Moves amount of shares from the caller's account to `to`.\\n /// @dev Makes sure that the caller doesn't have shortfall after transferring.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transfer(address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, msg.sender, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(msg.sender);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transfer(to, shares);\\n }\\n\\n /// @notice Moves amount of shares from `from` to `to` using the allowance mechanism.\\n /// @dev Makes sure that `from` address doesn't have shortfall after transferring.\\n /// @param from address from which the assets will be transferred.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transferFrom(address from, address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, from, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(from);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transferFrom(from, to, shares);\\n }\\n\\n /// @notice Gets current snapshot for an account across all maturities.\\n /// @param account account to return status snapshot in the specified maturity date.\\n /// @return the amount deposited to the floating pool and the amount owed to floating and fixed pools.\\n function accountSnapshot(address account) external view returns (uint256, uint256) {\\n return (convertToAssets(balanceOf[account]), previewDebt(account));\\n }\\n\\n /// @notice Gets all borrows and penalties for an account.\\n /// @param borrower account to return status snapshot for fixed and floating borrows.\\n /// @return debt the total debt, denominated in number of assets.\\n function previewDebt(address borrower) public view returns (uint256 debt) {\\n Account storage account = accounts[borrower];\\n uint256 memPenaltyRate = penaltyRate;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n // calculate all maturities using the base maturity and the following bits representing the following intervals\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 positionAssets = position.principal + position.fee;\\n\\n debt += positionAssets;\\n\\n if (block.timestamp > maturity) {\\n debt += positionAssets.mulWadDown((block.timestamp - maturity) * memPenaltyRate);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n // calculate floating borrowed debt\\n uint256 shares = account.floatingBorrowShares;\\n if (shares != 0) debt += previewRefund(shares);\\n }\\n\\n /// @notice Charges treasury fee to certain amount of earnings.\\n /// @param earnings amount of earnings.\\n /// @return earnings minus the fees charged by the treasury.\\n function chargeTreasuryFee(uint256 earnings) internal returns (uint256) {\\n uint256 fee = earnings.mulWadDown(treasuryFeeRate);\\n depositToTreasury(fee);\\n return earnings - fee;\\n }\\n\\n /// @notice Collects all earnings that are charged to borrowers that make use of fixed pool deposits' assets.\\n /// @param earnings amount of earnings.\\n function collectFreeLunch(uint256 earnings) internal {\\n if (earnings == 0) return;\\n\\n if (treasuryFeeRate != 0) {\\n depositToTreasury(earnings);\\n } else {\\n earningsAccumulator += earnings;\\n }\\n }\\n\\n /// @notice Deposits amount of assets on behalf of the treasury address.\\n /// @param fee amount of assets to be deposited.\\n function depositToTreasury(uint256 fee) internal {\\n if (fee != 0) {\\n _mint(treasury, previewDeposit(fee));\\n floatingAssets += fee;\\n }\\n }\\n\\n /// @notice Calculates the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings to be distributed from the accumulator.\\n function accumulatedEarnings() internal view returns (uint256 earnings) {\\n uint256 elapsed = block.timestamp - lastAccumulatorAccrual;\\n if (elapsed == 0) return 0;\\n return\\n earningsAccumulator.mulDivDown(\\n elapsed,\\n elapsed + earningsAccumulatorSmoothFactor.mulWadDown(maxFuturePools * FixedLib.INTERVAL)\\n );\\n }\\n\\n /// @notice Accrues the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings distributed from the accumulator.\\n function accrueAccumulatedEarnings() internal returns (uint256 earnings) {\\n earnings = accumulatedEarnings();\\n\\n earningsAccumulator -= earnings;\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n emit AccumulatorAccrual(block.timestamp);\\n }\\n\\n /// @notice Updates the `floatingAssetsAverage`.\\n function updateFloatingAssetsAverage() internal {\\n floatingAssetsAverage = previewFloatingAssetsAverage();\\n lastAverageUpdate = uint32(block.timestamp);\\n }\\n\\n /// @notice Returns the current `floatingAssetsAverage` without updating the storage variable.\\n /// @return projected `floatingAssetsAverage`.\\n function previewFloatingAssetsAverage() public view returns (uint256) {\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 memFloatingAssetsAverage = floatingAssetsAverage;\\n uint256 dampSpeedFactor = memFloatingAssets < memFloatingAssetsAverage ? dampSpeedDown : dampSpeedUp;\\n uint256 averageFactor = uint256(1e18 - (-int256(dampSpeedFactor * (block.timestamp - lastAverageUpdate))).expWad());\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n /// @notice Updates the floating pool borrows' variables.\\n /// @return treasuryFee amount of fees charged by the treasury to the new calculated floating debt.\\n function updateFloatingDebt() internal returns (uint256 treasuryFee) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 utilization = floatingUtilization(memFloatingAssets, memFloatingDebt);\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(utilization, globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed))\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n\\n memFloatingDebt += newDebt;\\n treasuryFee = newDebt.mulWadDown(treasuryFeeRate);\\n floatingAssets = memFloatingAssets + newDebt - treasuryFee;\\n floatingDebt = memFloatingDebt;\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n emit FloatingDebtUpdate(block.timestamp, utilization);\\n }\\n\\n /// @notice Calculates the total floating debt, considering elapsed time since last update and current interest rate.\\n /// @return actual floating debt plus projected interest.\\n function totalFloatingBorrowAssets() public view returns (uint256) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(\\n floatingUtilization(memFloatingAssets, memFloatingDebt),\\n globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed)\\n )\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n return memFloatingDebt + newDebt;\\n }\\n\\n /// @notice Calculates the floating pool balance plus earnings to be accrued at current timestamp\\n /// from maturities and accumulator.\\n /// @return actual floatingAssets plus earnings to be accrued at current timestamp.\\n function totalAssets() public view override returns (uint256) {\\n unchecked {\\n uint256 backupEarnings = 0;\\n\\n uint256 latestMaturity = block.timestamp - (block.timestamp % FixedLib.INTERVAL);\\n uint256 maxMaturity = latestMaturity + maxFuturePools * FixedLib.INTERVAL;\\n\\n for (uint256 maturity = latestMaturity; maturity <= maxMaturity; maturity += FixedLib.INTERVAL) {\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (maturity > lastAccrual) {\\n backupEarnings += block.timestamp < maturity\\n ? pool.unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual)\\n : pool.unassignedEarnings;\\n }\\n }\\n\\n return\\n floatingAssets +\\n backupEarnings +\\n accumulatedEarnings() +\\n (totalFloatingBorrowAssets() - floatingDebt).mulWadDown(1e18 - treasuryFeeRate);\\n }\\n }\\n\\n /// @notice Simulates the effects of a borrow at the current time, given current contract conditions.\\n /// @param assets amount of assets to borrow.\\n /// @return amount of shares that will be asigned to the account after the borrow.\\n function previewBorrow(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a repay at the current time, given current contract conditions.\\n /// @param assets amount of assets to repay.\\n /// @return amount of shares that will be subtracted from the account after the repay.\\n function previewRepay(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a refund at the current time, given current contract conditions.\\n /// @param shares amount of shares to subtract from caller's accountability.\\n /// @return amount of assets that will be repaid.\\n function previewRefund(uint256 shares) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalFloatingBorrowAssets(), supply);\\n }\\n\\n /// @notice Checks msg.sender's allowance over account's assets.\\n /// @param account account in which the allowance will be checked.\\n /// @param assets assets from account that msg.sender wants to operate on.\\n function spendAllowance(address account, uint256 assets) internal {\\n if (msg.sender != account) {\\n uint256 allowed = allowance[account][msg.sender]; // saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[account][msg.sender] = allowed - previewWithdraw(assets);\\n }\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed amount of the fixed pool.\\n function fixedPoolBorrowed(uint256 maturity) external view returns (uint256) {\\n return fixedPools[maturity].borrowed;\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed and supplied amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed and supplied amount of the fixed pool.\\n function fixedPoolBalance(uint256 maturity) external view returns (uint256, uint256) {\\n return (fixedPools[maturity].borrowed, fixedPools[maturity].supplied);\\n }\\n\\n /// @notice Retrieves fixed utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function fixedUtilization(uint256 supplied, uint256 borrowed, uint256 assets) internal pure returns (uint256) {\\n return assets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves global utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function globalUtilization(uint256 assets, uint256 debt, uint256 backupBorrowed) internal pure returns (uint256) {\\n return assets != 0 ? (debt + backupBorrowed).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves floating utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function floatingUtilization(uint256 assets, uint256 debt) internal pure returns (uint256) {\\n return assets != 0 ? debt.divWadUp(assets) : 0;\\n }\\n\\n /// @notice Emits MarketUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitMarketUpdate() internal {\\n emit MarketUpdate(\\n block.timestamp,\\n totalSupply,\\n floatingAssets,\\n totalFloatingBorrowShares,\\n floatingDebt,\\n earningsAccumulator\\n );\\n }\\n\\n /// @notice Emits FixedEarningsUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitFixedEarningsUpdate(uint256 maturity) internal {\\n emit FixedEarningsUpdate(block.timestamp, maturity, fixedPools[maturity].unassignedEarnings);\\n }\\n\\n /// @notice Sets name and symbol for the Market.\\n /// @param assetSymbol the symbol for the underlying asset.\\n function setAssetSymbol(string calldata assetSymbol) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n name = string.concat(\\\"exactly \\\", assetSymbol);\\n symbol = string.concat(\\\"exa\\\", assetSymbol);\\n }\\n\\n /// @notice Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially\\n /// providing liquidity.\\n /// @param backupFeeRate_ percentage amount represented with 18 decimals.\\n function setBackupFeeRate(uint256 backupFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n backupFeeRate = backupFeeRate_;\\n emit BackupFeeRateSet(backupFeeRate_);\\n }\\n\\n /// @notice Sets the damp speed used to update the floatingAssetsAverage.\\n /// @param up damp speed up, represented with 18 decimals.\\n /// @param down damp speed down, represented with 18 decimals.\\n function setDampSpeed(uint256 up, uint256 down) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n updateFloatingAssetsAverage();\\n dampSpeedUp = up;\\n dampSpeedDown = down;\\n emit DampSpeedSet(up, down);\\n }\\n\\n /// @notice Sets the factor used when smoothly accruing earnings to the floating pool.\\n /// @param earningsAccumulatorSmoothFactor_ represented with 18 decimals.\\n function setEarningsAccumulatorSmoothFactor(\\n uint128 earningsAccumulatorSmoothFactor_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n floatingAssets += accrueAccumulatedEarnings();\\n emitMarketUpdate();\\n earningsAccumulatorSmoothFactor = earningsAccumulatorSmoothFactor_;\\n emit EarningsAccumulatorSmoothFactorSet(earningsAccumulatorSmoothFactor_);\\n }\\n\\n /// @notice Sets the interest rate model to be used to calculate rates.\\n /// @param interestRateModel_ new interest rate model.\\n function setInterestRateModel(InterestRateModel interestRateModel_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(interestRateModel) != address(0)) depositToTreasury(updateFloatingDebt());\\n\\n interestRateModel = interestRateModel_;\\n emitMarketUpdate();\\n emit InterestRateModelSet(interestRateModel_);\\n }\\n\\n /// @notice Sets the rewards controller to update account rewards when operating with the Market.\\n /// @param rewardsController_ new rewards controller.\\n function setRewardsController(RewardsController rewardsController_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n rewardsController = rewardsController_;\\n emit RewardsControllerSet(rewardsController_);\\n }\\n\\n /// @notice Sets the protocol's max future pools for fixed borrowing and lending.\\n /// @dev If value is decreased, VALID maturities will become NOT_READY.\\n /// @param futurePools number of pools to be active at the same time.\\n function setMaxFuturePools(uint8 futurePools) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n maxFuturePools = futurePools;\\n emit MaxFuturePoolsSet(futurePools);\\n }\\n\\n /// @notice Sets the penalty rate per second.\\n /// @param penaltyRate_ percentage represented with 18 decimals.\\n function setPenaltyRate(uint256 penaltyRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n penaltyRate = penaltyRate_;\\n emit PenaltyRateSet(penaltyRate_);\\n }\\n\\n /// @notice Sets the percentage that represents the liquidity reserves that can't be borrowed.\\n /// @param reserveFactor_ parameter represented with 18 decimals.\\n function setReserveFactor(uint128 reserveFactor_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n reserveFactor = reserveFactor_;\\n emit ReserveFactorSet(reserveFactor_);\\n }\\n\\n /// @notice Sets the treasury variables.\\n /// @param treasury_ address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate_ represented with 18 decimals.\\n function setTreasury(address treasury_, uint256 treasuryFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n depositToTreasury(updateFloatingDebt());\\n treasury = treasury_;\\n treasuryFeeRate = treasuryFeeRate_;\\n emit TreasurySet(treasury_, treasuryFeeRate_);\\n }\\n\\n /// @notice Sets the pause state to true in case of emergency, triggered by an authorized account.\\n function pause() external onlyPausingRoles {\\n _pause();\\n }\\n\\n /// @notice Sets the pause state to false when threat is gone, triggered by an authorized account.\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @notice Sets `isFrozen` state, triggered by an authorized account.\\n function setFrozen(bool isFrozen_) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (isFrozen == isFrozen_) return;\\n isFrozen = isFrozen_;\\n emit Frozen(msg.sender, isFrozen_);\\n }\\n\\n /// @dev Throws if the market is frozen.\\n function requireNotFrozen() internal view {\\n if (isFrozen) revert MarketFrozen();\\n }\\n\\n /// @dev Modifier to make a function callable only when the market is not frozen.\\n modifier whenNotFrozen() {\\n requireNotFrozen();\\n _;\\n }\\n\\n /// @dev Throws if the caller is not an `EMERGENCY_ADMIN_ROLE` or `PAUSER_ROLE`.\\n function requirePausingRoles() internal view {\\n if (!hasRole(EMERGENCY_ADMIN_ROLE, msg.sender) && !hasRole(PAUSER_ROLE, msg.sender)) {\\n revert NotPausingRole();\\n }\\n }\\n\\n /// @dev Modifier to make a function callable only by pausing roles.\\n modifier onlyPausingRoles() {\\n requirePausingRoles();\\n _;\\n }\\n\\n /// @notice Event emitted when an account borrows amount of assets from a floating pool.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of assets that were borrowed.\\n /// @param shares amount of borrow shares assigned to the account.\\n event Borrow(\\n address indexed caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /// @notice Emitted when an account repays amount of assets to a floating pool.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of assets that was repaid.\\n /// @param shares amount of borrow shares that were subtracted from the account's accountability.\\n event Repay(address indexed caller, address indexed borrower, uint256 assets, uint256 shares);\\n\\n /// @notice Emitted when an account deposits an amount of an asset to a certain fixed rate pool,\\n /// collecting fees at the end of the period.\\n /// @param maturity maturity at which the account will be able to collect his deposit + his fee.\\n /// @param caller address which deposited the assets.\\n /// @param owner address that will be able to withdraw the deposited assets.\\n /// @param assets amount of the asset that were deposited.\\n /// @param fee is the extra amount that it will be collected at maturity.\\n event DepositAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed owner,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account withdraws from a fixed rate pool.\\n /// @param maturity maturity where the account withdraw its deposits.\\n /// @param caller address which withdraw the asset.\\n /// @param receiver address which will be collecting the assets.\\n /// @param owner address which had the assets withdrawn.\\n /// @param positionAssets position size reduced.\\n /// @param assets amount of assets withdrawn (can include a discount for early withdraw).\\n event WithdrawAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 positionAssets,\\n uint256 assets\\n );\\n\\n /// @notice Emitted when an account borrows amount of an asset from a certain maturity date.\\n /// @param maturity maturity in which the account will have to repay the loan.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of the asset that were borrowed.\\n /// @param fee extra amount that will need to be paid at maturity.\\n event BorrowAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account repays its borrows after maturity.\\n /// @param maturity maturity where the account repaid its borrowed amounts.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount that was repaid.\\n /// @param positionAssets amount of the debt that was covered in this repayment (penalties could have been repaid).\\n event RepayAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed borrower,\\n uint256 assets,\\n uint256 positionAssets\\n );\\n\\n /// @notice Emitted when an account's position had a liquidation.\\n /// @param receiver address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of the asset that were repaid.\\n /// @param lendersAssets incentive paid to lenders.\\n /// @param seizeMarket address of the asset that were seized by the liquidator.\\n /// @param seizedAssets amount seized of the collateral.\\n event Liquidate(\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 lendersAssets,\\n Market indexed seizeMarket,\\n uint256 seizedAssets\\n );\\n\\n /// @notice Emitted when an account's collateral has been seized.\\n /// @param liquidator address which seized this collateral.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount seized of the collateral.\\n event Seize(address indexed liquidator, address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when an account is cleared from bad debt.\\n /// @param borrower address which was cleared from bad debt.\\n /// @param assets amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\\n event SpreadBadDebt(address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when the backupFeeRate parameter is changed by admin.\\n /// @param backupFeeRate rate charged to the fixed pools to be accrued by the floating depositors.\\n event BackupFeeRateSet(uint256 backupFeeRate);\\n\\n /// @notice Emitted when the damp speeds are changed by admin.\\n /// @param dampSpeedUp represented with 18 decimals.\\n /// @param dampSpeedDown represented with 18 decimals.\\n event DampSpeedSet(uint256 dampSpeedUp, uint256 dampSpeedDown);\\n\\n /// @notice Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\\n /// @param earningsAccumulatorSmoothFactor factor represented with 18 decimals.\\n event EarningsAccumulatorSmoothFactorSet(uint256 earningsAccumulatorSmoothFactor);\\n\\n /// @notice Emitted when the interestRateModel is changed by admin.\\n /// @param interestRateModel new interest rate model to be used to calculate rates.\\n event InterestRateModelSet(InterestRateModel indexed interestRateModel);\\n\\n /// @notice Emitted when the maxFuturePools is changed by admin.\\n /// @param maxFuturePools represented with 0 decimals.\\n event MaxFuturePoolsSet(uint256 maxFuturePools);\\n\\n /// @notice Emitted when the penaltyRate is changed by admin.\\n /// @param penaltyRate penaltyRate percentage per second represented with 18 decimals.\\n event PenaltyRateSet(uint256 penaltyRate);\\n\\n /// @notice Emitted when the reserveFactor is changed by admin.\\n /// @param reserveFactor reserveFactor percentage.\\n event ReserveFactorSet(uint256 reserveFactor);\\n\\n /// @notice Emitted when the treasury variables are changed by admin.\\n /// @param treasury address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate represented with 18 decimals.\\n event TreasurySet(address indexed treasury, uint256 treasuryFeeRate);\\n\\n /// @notice Emitted when the rewardsController is changed by admin.\\n /// @param rewardsController new rewards controller to update account rewards when operating with the Market.\\n event RewardsControllerSet(RewardsController indexed rewardsController);\\n\\n /// @notice Emitted when market state is updated.\\n /// @param timestamp current timestamp.\\n /// @param floatingDepositShares total floating supply shares.\\n /// @param floatingAssets total floating supply assets.\\n /// @param floatingBorrowShares total floating borrow shares.\\n /// @param floatingDebt total floating borrow assets.\\n /// @param earningsAccumulator earnings accumulator.\\n event MarketUpdate(\\n uint256 timestamp,\\n uint256 floatingDepositShares,\\n uint256 floatingAssets,\\n uint256 floatingBorrowShares,\\n uint256 floatingDebt,\\n uint256 earningsAccumulator\\n );\\n\\n /// @notice Emitted when the earnings of a maturity are updated.\\n /// @param timestamp current timestamp.\\n /// @param maturity maturity date where the earnings were updated.\\n /// @param unassignedEarnings pending unassigned earnings.\\n event FixedEarningsUpdate(uint256 timestamp, uint256 indexed maturity, uint256 unassignedEarnings);\\n\\n /// @notice Emitted when accumulator distributes earnings.\\n /// @param timestamp current timestamp.\\n event AccumulatorAccrual(uint256 timestamp);\\n\\n /// @notice Emitted when the floating debt is updated.\\n /// @param timestamp current timestamp.\\n /// @param utilization new floating utilization.\\n event FloatingDebtUpdate(uint256 timestamp, uint256 utilization);\\n\\n /// @notice Emitted when `account` sets the `isFrozen` flag.\\n event Frozen(address indexed account, bool isFrozen);\\n\\n /// @notice Stores fixed deposits and fixed borrows map and floating borrow shares of an account.\\n /// @param fixedDeposits encoded map maturity dates where the account supplied to.\\n /// @param fixedBorrows encoded map maturity dates where the account borrowed from.\\n /// @param floatingBorrowShares number of floating borrow shares assigned to the account.\\n struct Account {\\n uint256 fixedDeposits;\\n uint256 fixedBorrows;\\n uint256 floatingBorrowShares;\\n }\\n}\\n\\nerror Disagreement();\\nerror InsufficientProtocolLiquidity();\\nerror MarketFrozen();\\nerror NotAuditor();\\nerror NotPausingRole();\\nerror SelfLiquidation();\\nerror ZeroBorrow();\\nerror ZeroDeposit();\\nerror ZeroRepay();\\nerror ZeroWithdraw();\\n\",\"keccak256\":\"0xdf09a69098df74396067954be63e073deb5d0b9222cae1a1a3b9c2bf69678429\",\"license\":\"BUSL-1.1\"},\"contracts/RewardsController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { SafeTransferLib } from \\\"solmate/src/utils/SafeTransferLib.sol\\\";\\nimport { ERC20 } from \\\"solmate/src/tokens/ERC20.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract RewardsController is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint64;\\n using FixedPointMathLib for int256;\\n using SafeTransferLib for ERC20;\\n\\n /// @notice Max utilization supported by the sigmoid function not to cause a division by zero (1e18 = WAD).\\n uint256 public constant UTILIZATION_CAP = 1e18 - 1;\\n /// @notice Tracks the reward distribution data for a given market.\\n mapping(Market => Distribution) public distribution;\\n /// @notice Tracks enabled asset rewards.\\n mapping(ERC20 => bool) public rewardEnabled;\\n /// @notice Stores registered asset rewards.\\n ERC20[] public rewardList;\\n /// @notice Stores Markets with distributions set.\\n Market[] public marketList;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev Can only be called once.\\n function initialize() external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded deposit.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleDeposit(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n ops[0] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n update(account, market, dist.availableRewards[r], ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded borrow.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleBorrow(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n (, , uint256 accountFloatingBorrowShares) = market.accounts(account);\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n ERC20 reward = dist.availableRewards[r];\\n ops[0] = AccountOperation({\\n operation: true,\\n balance: accountFloatingBorrowShares + accountFixedBorrowShares(market, account, dist.rewards[reward].start)\\n });\\n update(account, Market(msg.sender), reward, ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Claims all `msg.sender` rewards to the given account.\\n /// @param to The address to send the rewards to.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claimAll(address to) external returns (ERC20[] memory rewardsList, uint256[] memory claimedAmounts) {\\n return claim(allMarketsOperations(), to, rewardList);\\n }\\n\\n /// @notice Claims `msg.sender` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param to The address to send the rewards to.\\n /// @param rewardsList The list of rewards assets to claim.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n address to,\\n ERC20[] memory rewardsList\\n ) public claimSender returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n uint256 rewardsCount = rewardsList.length;\\n claimedAmounts = new uint256[](rewardsCount);\\n address sender = _claimSender;\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n uint256 availableRewards = dist.availableRewardsCount;\\n for (uint128 r = 0; r < availableRewards; ) {\\n update(\\n sender,\\n marketOperation.market,\\n dist.availableRewards[r],\\n accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n sender,\\n dist.rewards[dist.availableRewards[r]].start\\n )\\n );\\n unchecked {\\n ++r;\\n }\\n }\\n for (uint256 r = 0; r < rewardsCount; ) {\\n RewardData storage rewardData = dist.rewards[rewardsList[r]];\\n for (uint256 o = 0; o < marketOperation.operations.length; ) {\\n uint256 rewardAmount = rewardData.accounts[sender][marketOperation.operations[o]].accrued;\\n if (rewardAmount != 0) {\\n claimedAmounts[r] += rewardAmount;\\n rewardData.accounts[sender][marketOperation.operations[o]].accrued = 0;\\n }\\n unchecked {\\n ++o;\\n }\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 r = 0; r < rewardsList.length; ) {\\n uint256 claimedAmount = claimedAmounts[r];\\n if (claimedAmount > 0) {\\n rewardsList[r].safeTransfer(to, claimedAmount);\\n emit Claim(sender, rewardsList[r], to, claimedAmount);\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n return (rewardsList, claimedAmounts);\\n }\\n\\n /// @notice Claims `permit.owner` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param permit Arguments and signature from `permit.owner`.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n ClaimPermit calldata permit\\n ) external permitSender(permit) returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n return claim(marketOps, msg.sender, permit.assets);\\n }\\n\\n /// @notice Gets the configuration of a given distribution.\\n /// @param market The market to get the distribution configuration for.\\n /// @param reward The reward asset.\\n /// @return The distribution configuration.\\n function rewardConfig(Market market, ERC20 reward) external view returns (Config memory) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return\\n Config({\\n market: market,\\n reward: reward,\\n priceFeed: rewardData.priceFeed,\\n start: rewardData.start,\\n distributionPeriod: rewardData.end - rewardData.start,\\n targetDebt: rewardData.targetDebt,\\n totalDistribution: rewardData.totalDistribution,\\n undistributedFactor: rewardData.undistributedFactor,\\n flipSpeed: rewardData.flipSpeed,\\n compensationFactor: rewardData.compensationFactor,\\n transitionFactor: rewardData.transitionFactor,\\n borrowAllocationWeightFactor: rewardData.borrowAllocationWeightFactor,\\n depositAllocationWeightAddend: rewardData.depositAllocationWeightAddend,\\n depositAllocationWeightFactor: rewardData.depositAllocationWeightFactor\\n });\\n }\\n\\n /// @notice Gets the amount of reward assets that are being distributed for a Market.\\n /// @param market Market to get the number of available rewards to distribute.\\n /// @return The amount reward assets set to a Market.\\n function availableRewardsCount(Market market) external view returns (uint256) {\\n return distribution[market].availableRewardsCount;\\n }\\n\\n /// @notice Gets the account data of a given account, Market, operation and reward asset.\\n /// @param account The account to get the operation data from.\\n /// @param market The market in which the operation was made.\\n /// @param operation True if the operation was a borrow, false if it was a deposit.\\n /// @param reward The reward asset.\\n /// @return accrued The accrued amount.\\n /// @return index The account index.\\n function accountOperation(\\n address account,\\n Market market,\\n bool operation,\\n ERC20 reward\\n ) external view returns (uint256, uint256) {\\n Account storage operationAccount = distribution[market].rewards[reward].accounts[account][operation];\\n return (operationAccount.accrued, operationAccount.index);\\n }\\n\\n /// @notice Gets the distribution `start`, `end` and `lastUpdate` value of a given market and reward.\\n /// @param market The market to get the distribution times.\\n /// @param reward The reward asset.\\n /// @return The distribution `start`, `end` and `lastUpdate` time.\\n function distributionTime(Market market, ERC20 reward) external view returns (uint32, uint32, uint32) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.start, rewardData.end, rewardData.lastUpdate);\\n }\\n\\n /// @notice Retrieves all rewards addresses.\\n function allRewards() external view returns (ERC20[] memory) {\\n return rewardList;\\n }\\n\\n /// @notice Gets all market and operations.\\n /// @return marketOps The list of market operations.\\n function allMarketsOperations() public view returns (MarketOperation[] memory marketOps) {\\n Market[] memory markets = marketList;\\n marketOps = new MarketOperation[](markets.length);\\n for (uint256 m = 0; m < markets.length; ) {\\n bool[] memory ops = new bool[](2);\\n ops[0] = true;\\n ops[1] = false;\\n marketOps[m] = MarketOperation({ market: markets[m], operations: ops });\\n unchecked {\\n ++m;\\n }\\n }\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account and reward asset.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function allClaimable(address account, ERC20 reward) external view returns (uint256 unclaimedRewards) {\\n return claimable(allMarketsOperations(), account, reward);\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account, Market operations and reward asset.\\n /// @param marketOps The list of Market operations to get the accrued and pending rewards from.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function claimable(\\n MarketOperation[] memory marketOps,\\n address account,\\n ERC20 reward\\n ) public view returns (uint256 unclaimedRewards) {\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n RewardData storage rewardData = dist.rewards[reward];\\n if (dist.availableRewardsCount == 0) {\\n unchecked {\\n ++i;\\n }\\n continue;\\n }\\n\\n AccountOperation[] memory ops = accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n account,\\n rewardData.start\\n );\\n uint256 balance;\\n for (uint256 o = 0; o < ops.length; ) {\\n unclaimedRewards += rewardData.accounts[account][ops[o].operation].accrued;\\n balance += ops[o].balance;\\n unchecked {\\n ++o;\\n }\\n }\\n if (balance > 0) {\\n unclaimedRewards += pendingRewards(\\n account,\\n reward,\\n AccountMarketOperation({ market: marketOperation.market, accountOperations: ops })\\n );\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Iterates and accrues all rewards for the operations of the given account in the given market.\\n /// @param account The account to accrue the rewards for.\\n /// @param market The Market in which the operations where made.\\n /// @param reward The reward asset.\\n /// @param ops The operations to accrue the rewards for.\\n function update(address account, Market market, ERC20 reward, AccountOperation[] memory ops) internal {\\n uint256 baseUnit = distribution[market].baseUnit;\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n {\\n uint256 lastUpdate = rewardData.lastUpdate;\\n // `lastUpdate` can be greater than `block.timestamp` if distribution is set to start on a future date\\n if (block.timestamp > lastUpdate) {\\n (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) = previewAllocation(\\n rewardData,\\n market,\\n block.timestamp - lastUpdate\\n );\\n if (borrowIndex > type(uint128).max || depositIndex > type(uint128).max) revert IndexOverflow();\\n rewardData.borrowIndex = uint128(borrowIndex);\\n rewardData.depositIndex = uint128(depositIndex);\\n rewardData.lastUpdate = uint32(block.timestamp);\\n rewardData.lastUndistributed = newUndistributed;\\n emit IndexUpdate(market, reward, borrowIndex, depositIndex, newUndistributed, block.timestamp);\\n }\\n }\\n\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 i = 0; i < ops.length; ) {\\n AccountOperation memory op = ops[i];\\n Account storage accountData = operationAccount[op.operation];\\n uint256 accountIndex = accountData.index;\\n uint256 newAccountIndex;\\n if (op.operation) {\\n newAccountIndex = rewardData.borrowIndex;\\n } else {\\n newAccountIndex = rewardData.depositIndex;\\n }\\n if (accountIndex != newAccountIndex) {\\n accountData.index = uint128(newAccountIndex);\\n if (op.balance != 0) {\\n uint256 rewardsAccrued = accountRewards(op.balance, newAccountIndex, accountIndex, baseUnit);\\n accountData.accrued += uint128(rewardsAccrued);\\n emit Accrue(market, reward, account, op.operation, accountIndex, newAccountIndex, rewardsAccrued);\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the equivalent of borrow shares from fixed pool principal borrows of an account.\\n /// @param market The Market to get the fixed borrows from.\\n /// @param account The account that borrowed from fixed pools.\\n /// @return fixedDebt The fixed borrow shares.\\n function accountFixedBorrowShares(\\n Market market,\\n address account,\\n uint32 start\\n ) internal view returns (uint256 fixedDebt) {\\n uint256 firstMaturity = start - (start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 principal, ) = market.fixedBorrowPositions(maturity, account);\\n fixedDebt += principal;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n fixedDebt = market.previewRepay(fixedDebt);\\n }\\n\\n /// @notice Gets the reward indexes and last amount of undistributed rewards for a given market and reward asset.\\n /// @param market The market to get the reward indexes for.\\n /// @param reward The reward asset to get the reward indexes for.\\n /// @return borrowIndex The index for the floating and fixed borrow operation.\\n /// @return depositIndex The index for the floating deposit operation.\\n /// @return lastUndistributed The last amount of undistributed rewards.\\n function rewardIndexes(Market market, ERC20 reward) external view returns (uint256, uint256, uint256) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.borrowIndex, rewardData.depositIndex, rewardData.lastUndistributed);\\n }\\n\\n /// @notice Calculates the rewards not accrued yet for the given operations of a given account and reward asset.\\n /// @param account The account to get the pending rewards for.\\n /// @param reward The reward asset to get the pending rewards for.\\n /// @param ops The operations to get the pending rewards for.\\n /// @return rewards The pending rewards for the given operations.\\n function pendingRewards(\\n address account,\\n ERC20 reward,\\n AccountMarketOperation memory ops\\n ) internal view returns (uint256 rewards) {\\n RewardData storage rewardData = distribution[ops.market].rewards[reward];\\n uint256 baseUnit = distribution[ops.market].baseUnit;\\n uint256 lastUpdate = rewardData.lastUpdate;\\n (uint256 borrowIndex, uint256 depositIndex, ) = previewAllocation(\\n rewardData,\\n ops.market,\\n block.timestamp > lastUpdate ? block.timestamp - lastUpdate : 0\\n );\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 o = 0; o < ops.accountOperations.length; ) {\\n uint256 nextIndex;\\n if (ops.accountOperations[o].operation) {\\n nextIndex = borrowIndex;\\n } else {\\n nextIndex = depositIndex;\\n }\\n\\n rewards += accountRewards(\\n ops.accountOperations[o].balance,\\n nextIndex,\\n operationAccount[ops.accountOperations[o].operation].index,\\n baseUnit\\n );\\n unchecked {\\n ++o;\\n }\\n }\\n }\\n\\n /// @notice Calculates and returns the new amount of rewards given by the difference between the `accountIndex` and\\n /// the `globalIndex`.\\n /// @param balance The account's balance in the operation's pool.\\n /// @param globalIndex Current index of the distribution.\\n /// @param accountIndex Last index stored for the account.\\n /// @param baseUnit One unit of the Market's asset (10**decimals).\\n /// @return The amount of new rewards to be accrued by the account.\\n function accountRewards(\\n uint256 balance,\\n uint256 globalIndex,\\n uint256 accountIndex,\\n uint256 baseUnit\\n ) internal pure returns (uint256) {\\n return balance.mulDivDown(globalIndex - accountIndex, baseUnit);\\n }\\n\\n /// @notice Retrieves projected distribution indexes and new undistributed amount for a given `deltaTime`.\\n /// @param market The market to calculate the indexes for.\\n /// @param reward The reward asset to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n Market market,\\n ERC20 reward,\\n uint256 deltaTime\\n ) external view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n return previewAllocation(distribution[market].rewards[reward], market, deltaTime);\\n }\\n\\n /// @notice Calculates and returns the distribution indexes and new undistributed tokens for a given `rewardData`.\\n /// @param rewardData The distribution's data.\\n /// @param market The market to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n RewardData storage rewardData,\\n Market market,\\n uint256 deltaTime\\n ) internal view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n TotalMarketBalance memory m;\\n m.floatingDebt = market.floatingDebt();\\n m.floatingAssets = market.floatingAssets();\\n TimeVars memory t;\\n t.start = rewardData.start;\\n t.end = rewardData.end;\\n {\\n uint256 firstMaturity = t.start - (t.start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n uint256 fixedDebt;\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 borrowed, ) = market.fixedPoolBalance(maturity);\\n fixedDebt += borrowed;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n m.debt = m.floatingDebt + fixedDebt;\\n m.fixedBorrowShares = market.previewRepay(fixedDebt);\\n }\\n uint256 target;\\n {\\n uint256 targetDebt = rewardData.targetDebt;\\n target = m.debt < targetDebt ? m.debt.divWadDown(targetDebt) : 1e18;\\n }\\n uint256 rewards;\\n {\\n uint256 releaseRate = rewardData.releaseRate;\\n uint256 lastUndistributed = rewardData.lastUndistributed;\\n t.period = t.end - t.start;\\n uint256 distributionFactor = t.period > 0\\n ? rewardData.undistributedFactor.mulDivDown(target, t.period * 1e18)\\n : 0;\\n if (block.timestamp <= t.end) {\\n if (distributionFactor > 0) {\\n uint256 exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n } else if (rewardData.lastUpdate > t.end) {\\n newUndistributed =\\n lastUndistributed -\\n lastUndistributed.mulWadUp(1e18 - uint256((-int256(distributionFactor * deltaTime)).expWad()));\\n rewards = uint256(-(int256(newUndistributed) - int256(lastUndistributed)));\\n } else {\\n uint256 exponential;\\n deltaTime = t.end - rewardData.lastUpdate;\\n if (distributionFactor > 0) {\\n exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n exponential = uint256((-int256(distributionFactor * (block.timestamp - t.end))).expWad());\\n newUndistributed = newUndistributed - newUndistributed.mulWadUp(1e18 - exponential);\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n }\\n if (rewards == 0) return (rewardData.borrowIndex, rewardData.depositIndex, newUndistributed);\\n }\\n {\\n AllocationVars memory v;\\n v.globalUtilization = Math.min(\\n m.floatingAssets != 0\\n ? 1e18 - (m.floatingAssets - m.floatingDebt - market.floatingBackupBorrowed()).divWadDown(m.floatingAssets)\\n : 0,\\n UTILIZATION_CAP\\n );\\n v.transitionFactor = rewardData.transitionFactor;\\n v.flipSpeed = rewardData.flipSpeed;\\n v.borrowAllocationWeightFactor = rewardData.borrowAllocationWeightFactor;\\n v.sigmoid = v.globalUtilization > 0\\n ? uint256(1e18).divWadDown(\\n 1e18 +\\n uint256(\\n (-(v.flipSpeed *\\n (int256(v.globalUtilization.divWadDown(1e18 - v.globalUtilization)).lnWad() -\\n int256(v.transitionFactor.divWadDown(1e18 - v.transitionFactor)).lnWad())) / 1e18).expWad()\\n )\\n )\\n : 0;\\n v.borrowRewardRule = rewardData\\n .compensationFactor\\n .mulWadDown(\\n market\\n .interestRateModel()\\n .floatingRate(m.floatingAssets != 0 ? m.floatingDebt.divWadDown(m.floatingAssets) : 0, v.globalUtilization)\\n .mulWadDown(1e18 - v.globalUtilization.mulWadUp(1e18 - market.treasuryFeeRate())) +\\n v.borrowAllocationWeightFactor\\n )\\n .mulWadDown(1e18 - v.sigmoid);\\n v.depositRewardRule =\\n rewardData.depositAllocationWeightAddend.mulWadDown(1e18 - v.sigmoid) +\\n rewardData.depositAllocationWeightFactor.mulWadDown(v.sigmoid);\\n v.borrowAllocation = v.borrowRewardRule.divWadDown(v.borrowRewardRule + v.depositRewardRule);\\n v.depositAllocation = 1e18 - v.borrowAllocation;\\n {\\n uint256 totalDepositSupply = market.totalSupply();\\n uint256 totalBorrowSupply = market.totalFloatingBorrowShares() + m.fixedBorrowShares;\\n uint256 baseUnit = distribution[market].baseUnit;\\n borrowIndex =\\n rewardData.borrowIndex +\\n (totalBorrowSupply > 0 ? rewards.mulWadDown(v.borrowAllocation).mulDivDown(baseUnit, totalBorrowSupply) : 0);\\n depositIndex =\\n rewardData.depositIndex +\\n (\\n totalDepositSupply > 0\\n ? rewards.mulWadDown(v.depositAllocation).mulDivDown(baseUnit, totalDepositSupply)\\n : 0\\n );\\n }\\n }\\n }\\n\\n /// @notice Get account balances of the given Market operations.\\n /// @param market The address of the Market.\\n /// @param ops List of operations to retrieve account balance.\\n /// @param account Account to get the balance from.\\n /// @param distributionStart Timestamp of the start of the distribution to correctly get the rewarded fixed pools.\\n /// @return accountBalanceOps contains a list with account balance per each operation.\\n function accountBalanceOperations(\\n Market market,\\n bool[] memory ops,\\n address account,\\n uint32 distributionStart\\n ) internal view returns (AccountOperation[] memory accountBalanceOps) {\\n accountBalanceOps = new AccountOperation[](ops.length);\\n for (uint256 i = 0; i < ops.length; ) {\\n if (ops[i]) {\\n (, , uint256 floatingBorrowShares) = market.accounts(account);\\n accountBalanceOps[i] = AccountOperation({\\n operation: true,\\n balance: floatingBorrowShares + accountFixedBorrowShares(market, account, distributionStart)\\n });\\n } else {\\n accountBalanceOps[i] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Withdraws the contract's balance of the given asset to the given address.\\n /// @param asset The asset to withdraw.\\n /// @param to The address to withdraw the asset to.\\n function withdraw(ERC20 asset, address to) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n asset.safeTransfer(to, asset.balanceOf(address(this)));\\n }\\n\\n /// @notice Enables or updates the reward distribution for the given markets and rewards.\\n /// @param configs The configurations to update each RewardData with.\\n function config(Config[] memory configs) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n for (uint256 i = 0; i < configs.length; ) {\\n // transitionFactor cannot be eq or higher than 1e18 to avoid division by zero or underflow\\n if (configs[i].transitionFactor >= 1e18) revert InvalidConfig();\\n // depositAllocationWeightFactor cannot be zero to avoid division by zero when sigmoid equals 1e18\\n if (configs[i].depositAllocationWeightFactor == 0) revert InvalidConfig();\\n\\n Distribution storage dist = distribution[configs[i].market];\\n RewardData storage rewardData = dist.rewards[configs[i].reward];\\n\\n if (dist.baseUnit == 0) {\\n // never initialized before, adding to the list of markets\\n marketList.push(configs[i].market);\\n }\\n if (!rewardEnabled[configs[i].reward]) {\\n // add reward address to global rewards list if still not enabled\\n rewardEnabled[configs[i].reward] = true;\\n rewardList.push(configs[i].reward);\\n }\\n if (rewardData.lastUpdate == 0) {\\n // add reward address to distribution data's available rewards if distribution is new\\n dist.availableRewards[dist.availableRewardsCount++] = configs[i].reward;\\n dist.baseUnit = 10 ** configs[i].market.decimals();\\n // set initial parameters if distribution is new\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n } else {\\n uint32 start = rewardData.start;\\n uint32 end = rewardData.end;\\n // update global indexes before updating distribution values\\n bool[] memory ops = new bool[](1);\\n ops[0] = true;\\n update(\\n address(0),\\n configs[i].market,\\n configs[i].reward,\\n accountBalanceOperations(configs[i].market, ops, address(0), start)\\n );\\n // properly update release rate\\n if (block.timestamp < end) {\\n uint256 released = 0;\\n uint256 elapsed = 0;\\n if (block.timestamp > start) {\\n released =\\n rewardData.lastConfigReleased +\\n rewardData.releaseRate *\\n (block.timestamp - rewardData.lastConfig);\\n elapsed = block.timestamp - start;\\n if (configs[i].totalDistribution <= released || configs[i].distributionPeriod <= elapsed) {\\n revert InvalidConfig();\\n }\\n rewardData.lastConfigReleased = released;\\n }\\n\\n rewardData.releaseRate =\\n (configs[i].totalDistribution - released) /\\n (configs[i].distributionPeriod - elapsed);\\n } else if (rewardData.start != configs[i].start) {\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n rewardData.lastConfigReleased = 0;\\n }\\n }\\n rewardData.lastConfig = uint32(block.timestamp);\\n rewardData.end = rewardData.start + uint32(configs[i].distributionPeriod);\\n rewardData.priceFeed = configs[i].priceFeed;\\n // set emission and distribution parameters\\n rewardData.totalDistribution = configs[i].totalDistribution;\\n rewardData.targetDebt = configs[i].targetDebt;\\n rewardData.undistributedFactor = configs[i].undistributedFactor;\\n rewardData.flipSpeed = configs[i].flipSpeed;\\n rewardData.compensationFactor = configs[i].compensationFactor;\\n rewardData.borrowAllocationWeightFactor = configs[i].borrowAllocationWeightFactor;\\n rewardData.depositAllocationWeightAddend = configs[i].depositAllocationWeightAddend;\\n rewardData.transitionFactor = configs[i].transitionFactor;\\n rewardData.depositAllocationWeightFactor = configs[i].depositAllocationWeightFactor;\\n\\n emit DistributionSet(configs[i].market, configs[i].reward, configs[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n mapping(address => uint256) public nonces;\\n\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(\\\"RewardsController\\\"),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n address private _claimSender;\\n modifier claimSender() {\\n if (_claimSender == address(0)) _claimSender = msg.sender;\\n _;\\n delete _claimSender;\\n }\\n\\n modifier permitSender(ClaimPermit calldata permit) {\\n assert(_claimSender == address(0));\\n assert(permit.deadline >= block.timestamp);\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\\"ClaimPermit(address owner,address spender,address[] assets,uint256 deadline)\\\"),\\n permit.owner,\\n msg.sender,\\n permit.assets,\\n nonces[permit.owner]++,\\n permit.deadline\\n )\\n )\\n )\\n ),\\n permit.v,\\n permit.r,\\n permit.s\\n );\\n assert(recoveredAddress != address(0) && recoveredAddress == permit.owner);\\n _claimSender = permit.owner;\\n }\\n _;\\n assert(_claimSender == address(0));\\n }\\n\\n struct TotalMarketBalance {\\n uint256 debt;\\n uint256 fixedBorrowShares;\\n uint256 floatingDebt;\\n uint256 floatingAssets;\\n }\\n\\n struct TimeVars {\\n uint256 start;\\n uint256 end;\\n uint256 period;\\n }\\n\\n struct AllocationVars {\\n uint256 globalUtilization;\\n uint256 sigmoid;\\n uint256 borrowRewardRule;\\n uint256 depositRewardRule;\\n uint256 borrowAllocation;\\n uint256 depositAllocation;\\n uint256 transitionFactor;\\n int256 flipSpeed;\\n uint256 borrowAllocationWeightFactor;\\n }\\n\\n struct AccountOperation {\\n bool operation;\\n uint256 balance;\\n }\\n\\n struct MarketOperation {\\n Market market;\\n bool[] operations;\\n }\\n\\n struct AccountMarketOperation {\\n Market market;\\n AccountOperation[] accountOperations;\\n }\\n\\n struct Account {\\n // liquidity index of the reward distribution for the account\\n uint128 index;\\n // amount of accrued rewards for the account since last account index update\\n uint128 accrued;\\n }\\n\\n struct Config {\\n Market market;\\n ERC20 reward;\\n IPriceFeed priceFeed;\\n uint32 start;\\n uint256 distributionPeriod;\\n uint256 targetDebt;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n }\\n\\n struct RewardData {\\n // distribution model\\n uint256 targetDebt;\\n uint256 releaseRate;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n uint256 lastUndistributed;\\n // allocation model\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n // liquidity indexes of the reward distribution\\n uint128 borrowIndex;\\n uint128 depositIndex;\\n // distribution timestamps\\n uint32 start;\\n uint32 end;\\n uint32 lastUpdate;\\n // config helpers\\n uint32 lastConfig;\\n uint256 lastConfigReleased;\\n // price feed\\n IPriceFeed priceFeed;\\n // account addresses and their rewards data (index & accrued)\\n mapping(address => mapping(bool => Account)) accounts;\\n }\\n\\n struct Distribution {\\n // reward assets and their data\\n mapping(ERC20 => RewardData) rewards;\\n // list of reward asset addresses for the market\\n mapping(uint128 => ERC20) availableRewards;\\n // count of reward tokens for the market\\n uint8 availableRewardsCount;\\n // base unit of the market\\n uint256 baseUnit;\\n }\\n\\n /// @notice Emitted when rewards are accrued by an account.\\n /// @param market Market where the operation was made.\\n /// @param reward reward asset.\\n /// @param account account that accrued the rewards.\\n /// @param operation true if the operation was a borrow, false if it was a deposit.\\n /// @param accountIndex previous account index.\\n /// @param operationIndex new operation index that is assigned to the `accountIndex`.\\n /// @param rewardsAccrued amount of rewards accrued.\\n event Accrue(\\n Market indexed market,\\n ERC20 indexed reward,\\n address indexed account,\\n bool operation,\\n uint256 accountIndex,\\n uint256 operationIndex,\\n uint256 rewardsAccrued\\n );\\n\\n /// @notice Emitted when rewards are claimed by an account.\\n /// @param account account that claimed the rewards.\\n /// @param reward reward asset.\\n /// @param to account that received the rewards.\\n /// @param amount amount of rewards claimed.\\n event Claim(address indexed account, ERC20 indexed reward, address indexed to, uint256 amount);\\n\\n /// @notice Emitted when a distribution is set.\\n /// @param market Market whose distribution was set.\\n /// @param reward reward asset to be distributed when operating with the Market.\\n /// @param config configuration struct containing the distribution parameters.\\n event DistributionSet(Market indexed market, ERC20 indexed reward, Config config);\\n\\n /// @notice Emitted when the distribution indexes are updated.\\n /// @param market Market of the distribution.\\n /// @param reward reward asset.\\n /// @param borrowIndex index of the borrow operations of a distribution.\\n /// @param depositIndex index of the deposit operations of a distribution.\\n /// @param newUndistributed amount of undistributed rewards.\\n /// @param lastUpdate current timestamp.\\n event IndexUpdate(\\n Market indexed market,\\n ERC20 indexed reward,\\n uint256 borrowIndex,\\n uint256 depositIndex,\\n uint256 newUndistributed,\\n uint256 lastUpdate\\n );\\n}\\n\\nerror IndexOverflow();\\nerror InvalidConfig();\\n\\nstruct ClaimPermit {\\n address owner;\\n ERC20[] assets;\\n uint256 deadline;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n}\\n\",\"keccak256\":\"0xb49f89a25450c5d31384afa51595c7e2cf0b32ea73d6e8fd2b2c937cc60c7b5f\",\"license\":\"BUSL-1.1\"},\"contracts/utils/FixedLib.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\nlibrary FixedLib {\\n using FixedPointMathLib for uint256;\\n\\n uint256 internal constant INTERVAL = 4 weeks;\\n\\n /// @notice Gets the amount of revenue sharing between the backup supplier and the new fixed pool supplier.\\n /// @param pool fixed rate pool.\\n /// @param amount amount being provided by the fixed pool supplier.\\n /// @param backupFeeRate rate charged to the fixed pool supplier to be accrued by the backup supplier.\\n /// @return yield amount to be offered to the fixed pool supplier.\\n /// @return backupFee yield to be accrued by the backup supplier for initially providing the liquidity.\\n function calculateDeposit(\\n Pool memory pool,\\n uint256 amount,\\n uint256 backupFeeRate\\n ) internal pure returns (uint256 yield, uint256 backupFee) {\\n uint256 memBackupSupplied = backupSupplied(pool);\\n if (memBackupSupplied != 0) {\\n yield = pool.unassignedEarnings.mulDivDown(Math.min(amount, memBackupSupplied), memBackupSupplied);\\n backupFee = yield.mulWadDown(backupFeeRate);\\n yield -= backupFee;\\n }\\n }\\n\\n /// @notice Registers an operation to add supply to a fixed rate pool and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be added to the supply.\\n /// @param amount amount to be added to the supply.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function deposit(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.supplied = supplied + amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to reduce borrowed amount from a fixed rate pool\\n /// and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be repaid.\\n /// @param amount amount to be added to the fixed rate pool.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function repay(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.borrowed = borrowed - amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to increase borrowed amount of a fixed rate pool\\n /// and potentially increase backup debt.\\n /// @param pool fixed rate pool where an amount will be borrowed.\\n /// @param amount amount to be borrowed from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function borrow(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 newBorrowed = borrowed + amount;\\n\\n backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, pool.supplied), newBorrowed);\\n pool.borrowed = newBorrowed;\\n }\\n\\n /// @notice Registers an operation to reduce supply from a fixed rate pool and potentially increase backup debt.\\n /// @param pool fixed rate pool where amount will be withdrawn.\\n /// @param amountToDiscount amount to be withdrawn from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function withdraw(Pool storage pool, uint256 amountToDiscount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n uint256 newSupply = supplied - amountToDiscount;\\n\\n backupDebtAddition = Math.min(supplied, borrowed) - Math.min(newSupply, borrowed);\\n pool.supplied = newSupply;\\n }\\n\\n /// @notice Accrues backup earnings from `unassignedEarnings` based on the `lastAccrual` time.\\n /// @param pool fixed rate pool where earnings will be accrued.\\n /// @param maturity maturity date of the pool.\\n /// @return backupEarnings amount of earnings to be distributed to the backup supplier.\\n function accrueEarnings(Pool storage pool, uint256 maturity) internal returns (uint256 backupEarnings) {\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (block.timestamp < maturity) {\\n uint256 unassignedEarnings = pool.unassignedEarnings;\\n pool.lastAccrual = block.timestamp;\\n backupEarnings = unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual);\\n pool.unassignedEarnings = unassignedEarnings - backupEarnings;\\n } else if (lastAccrual == maturity) {\\n backupEarnings = 0;\\n } else {\\n pool.lastAccrual = maturity;\\n backupEarnings = pool.unassignedEarnings;\\n pool.unassignedEarnings = 0;\\n }\\n }\\n\\n /// @notice Calculates the amount that a fixed rate pool borrowed from the backup supplier.\\n /// @param pool fixed rate pool.\\n /// @return amount borrowed from the fixed rate pool.\\n function backupSupplied(Pool memory pool) internal pure returns (uint256) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n return borrowed - Math.min(borrowed, supplied);\\n }\\n\\n /// @notice Modify positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it. Needs for the amount to be less than the principal and the fee\\n /// @param position original position to be scaled.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return scaled position.\\n function scaleProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 principal = amount.mulDivDown(position.principal, position.principal + position.fee);\\n position.principal = principal;\\n position.fee = amount - principal;\\n return position;\\n }\\n\\n /// @notice Reduce positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it.\\n /// @param position original position to be reduced.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return reduced position.\\n function reduceProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 positionAssets = position.principal + position.fee;\\n uint256 newPositionAssets = positionAssets - amount;\\n position.principal = newPositionAssets.mulDivDown(position.principal, positionAssets);\\n position.fee = newPositionAssets - position.principal;\\n return position;\\n }\\n\\n /// @notice Calculates what proportion of earnings would `borrowAmount` represent considering `backupSupplied`.\\n /// @param earnings amount to be distributed.\\n /// @param borrowAmount amount that will be checked if came from the backup supplier or fixed rate pool.\\n /// @return unassignedEarnings earnings to be added to `unassignedEarnings`.\\n /// @return backupEarnings earnings to be distributed to the backup supplier.\\n function distributeEarnings(\\n Pool memory pool,\\n uint256 earnings,\\n uint256 borrowAmount\\n ) internal pure returns (uint256 unassignedEarnings, uint256 backupEarnings) {\\n backupEarnings = borrowAmount == 0\\n ? 0\\n : earnings.mulDivDown(borrowAmount - Math.min(backupSupplied(pool), borrowAmount), borrowAmount);\\n unassignedEarnings = earnings - backupEarnings;\\n }\\n\\n /// @notice Adds a maturity date to the borrow or supply positions of the account.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity the new maturity where the account will borrow or supply to.\\n /// @return updated encoded maturity dates.\\n function setMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n // initialize the maturity with also the 1st bit on the 33th position set\\n if (encoded == 0) return maturity | (1 << 32);\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n if (maturity < baseMaturity) {\\n // if the new maturity is lower than the base, set it as the new base\\n // wipe clean the last 32 bits, shift the amount of `INTERVAL` and set the new value with the 33rd bit set\\n uint256 range = (baseMaturity - maturity) / INTERVAL;\\n if (encoded >> (256 - range) != 0) revert MaturityOverflow();\\n encoded = ((encoded >> 32) << (32 + range));\\n return maturity | encoded | (1 << 32);\\n } else {\\n uint256 range = (maturity - baseMaturity) / INTERVAL;\\n if (range > 223) revert MaturityOverflow();\\n return encoded | (1 << (32 + range));\\n }\\n }\\n\\n /// @notice Remove maturity from account's borrow or supplied positions.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity maturity date to be removed.\\n /// @return updated encoded maturity dates.\\n function clearMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n if (encoded == 0 || encoded == maturity | (1 << 32)) return 0;\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n // if the baseMaturity is the one being cleaned\\n if (maturity == baseMaturity) {\\n // wipe 32 bytes + 1 for the old base flag\\n uint256 packed = encoded >> 33;\\n uint256 range = 1;\\n while ((packed & 1) == 0 && packed != 0) {\\n unchecked {\\n ++range;\\n }\\n packed >>= 1;\\n }\\n encoded = ((encoded >> (32 + range)) << 32);\\n return (maturity + (range * INTERVAL)) | encoded;\\n } else {\\n // otherwise just clear the bit\\n return encoded & ~(1 << (32 + ((maturity - baseMaturity) / INTERVAL)));\\n }\\n }\\n\\n /// @notice Verifies that a maturity is `VALID`, `MATURED`, `NOT_READY` or `INVALID`.\\n /// @dev if expected state doesn't match the calculated one, it reverts with a custom error `UnmatchedPoolState`.\\n /// @param maturity timestamp of the maturity date to be verified.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param requiredState state required by the caller to be verified (see `State` for description).\\n /// @param alternativeState state required by the caller to be verified (see `State` for description).\\n function checkPoolState(uint256 maturity, uint8 maxPools, State requiredState, State alternativeState) internal view {\\n State state;\\n if (maturity % INTERVAL != 0) {\\n state = State.INVALID;\\n } else if (maturity <= block.timestamp) {\\n state = State.MATURED;\\n } else if (maturity > block.timestamp - (block.timestamp % INTERVAL) + (INTERVAL * maxPools)) {\\n state = State.NOT_READY;\\n } else {\\n state = State.VALID;\\n }\\n\\n if (state != requiredState && state != alternativeState) {\\n if (alternativeState == State.NONE) revert UnmatchedPoolState(uint8(state), uint8(requiredState));\\n\\n revert UnmatchedPoolStates(uint8(state), uint8(requiredState), uint8(alternativeState));\\n }\\n }\\n\\n /// @notice Stores the accountability of a fixed interest rate pool.\\n /// @param borrowed total amount borrowed from the pool.\\n /// @param supplied total amount supplied to the pool.\\n /// @param unassignedEarnings total amount of earnings not yet distributed and accrued.\\n /// @param lastAccrual timestamp for the last time that some earnings have been distributed to the backup supplier.\\n struct Pool {\\n uint256 borrowed;\\n uint256 supplied;\\n uint256 unassignedEarnings;\\n uint256 lastAccrual;\\n }\\n\\n /// @notice Stores principal and fee of a borrow or a supply position of a account in a fixed rate pool.\\n /// @param principal amount borrowed or supplied to the fixed rate pool.\\n /// @param fee amount of fees to be repaid or earned at the maturity of the fixed rate pool.\\n struct Position {\\n uint256 principal;\\n uint256 fee;\\n }\\n\\n enum State {\\n NONE,\\n INVALID,\\n MATURED,\\n VALID,\\n NOT_READY\\n }\\n}\\n\\nerror MaturityOverflow();\\nerror UnmatchedPoolState(uint8 state, uint8 requiredState);\\nerror UnmatchedPoolStates(uint8 state, uint8 requiredState, uint8 alternativeState);\\n\",\"keccak256\":\"0xb959d7d8c709c18ad668f58ab3d622b942ef36d72e6268e925e632b56a80ddc1\",\"license\":\"BUSL-1.1\"},\"contracts/utils/IPriceFeed.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\ninterface IPriceFeed {\\n function decimals() external view returns (uint8);\\n\\n function latestAnswer() external view returns (int256);\\n}\\n\",\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\"},\"solmate/src/mixins/ERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\nimport {SafeTransferLib} from \\\"../utils/SafeTransferLib.sol\\\";\\nimport {FixedPointMathLib} from \\\"../utils/FixedPointMathLib.sol\\\";\\n\\n/// @notice Minimal ERC4626 tokenized Vault implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)\\nabstract contract ERC4626 is ERC20 {\\n using SafeTransferLib for ERC20;\\n using FixedPointMathLib for uint256;\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /*//////////////////////////////////////////////////////////////\\n IMMUTABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n ERC20 public immutable asset;\\n\\n constructor(\\n ERC20 _asset,\\n string memory _name,\\n string memory _symbol\\n ) ERC20(_name, _symbol, _asset.decimals()) {\\n asset = _asset;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {\\n // Check for rounding error since we round down in previewDeposit.\\n require((shares = previewDeposit(assets)) != 0, \\\"ZERO_SHARES\\\");\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {\\n assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up.\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 shares) {\\n shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up.\\n\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 assets) {\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n // Check for rounding error since we round down in previewRedeem.\\n require((assets = previewRedeem(shares)) != 0, \\\"ZERO_ASSETS\\\");\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ACCOUNTING LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function totalAssets() public view virtual returns (uint256);\\n\\n function convertToShares(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets());\\n }\\n\\n function convertToAssets(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply);\\n }\\n\\n function previewDeposit(uint256 assets) public view virtual returns (uint256) {\\n return convertToShares(assets);\\n }\\n\\n function previewMint(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply);\\n }\\n\\n function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\\n }\\n\\n function previewRedeem(uint256 shares) public view virtual returns (uint256) {\\n return convertToAssets(shares);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LIMIT LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function maxDeposit(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxMint(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxWithdraw(address owner) public view virtual returns (uint256) {\\n return convertToAssets(balanceOf[owner]);\\n }\\n\\n function maxRedeem(address owner) public view virtual returns (uint256) {\\n return balanceOf[owner];\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL HOOKS LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {}\\n\\n function afterDeposit(uint256 assets, uint256 shares) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\"},\"solmate/src/tokens/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\\nabstract contract ERC20 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n uint8 public immutable decimals;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) public balanceOf;\\n\\n mapping(address => mapping(address => uint256)) public allowance;\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal immutable INITIAL_CHAIN_ID;\\n\\n bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\\n\\n mapping(address => uint256) public nonces;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint8 _decimals\\n ) {\\n name = _name;\\n symbol = _symbol;\\n decimals = _decimals;\\n\\n INITIAL_CHAIN_ID = block.chainid;\\n INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 amount) public virtual returns (bool) {\\n allowance[msg.sender][spender] = amount;\\n\\n emit Approval(msg.sender, spender, amount);\\n\\n return true;\\n }\\n\\n function transfer(address to, uint256 amount) public virtual returns (bool) {\\n balanceOf[msg.sender] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(msg.sender, to, amount);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual returns (bool) {\\n uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\\n\\n balanceOf[from] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n return true;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 LOGIC\\n //////////////////////////////////////////////////////////////*/\\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 ) public virtual {\\n require(deadline >= block.timestamp, \\\"PERMIT_DEADLINE_EXPIRED\\\");\\n\\n // Unchecked because the only math done is incrementing\\n // the owner's nonce which cannot realistically overflow.\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\n \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n ),\\n owner,\\n spender,\\n value,\\n nonces[owner]++,\\n deadline\\n )\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"INVALID_SIGNER\\\");\\n\\n allowance[recoveredAddress][spender] = value;\\n }\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\\n return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\\n }\\n\\n function computeDomainSeparator() internal view virtual returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 amount) internal virtual {\\n totalSupply += amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(address(0), to, amount);\\n }\\n\\n function _burn(address from, uint256 amount) internal virtual {\\n balanceOf[from] -= amount;\\n\\n // Cannot underflow because a user's balance\\n // will never be larger than the total supply.\\n unchecked {\\n totalSupply -= amount;\\n }\\n\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\"},\"solmate/src/utils/FixedPointMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Arithmetic library with operations for fixed-point numbers.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)\\nlibrary FixedPointMathLib {\\n /*//////////////////////////////////////////////////////////////\\n SIMPLIFIED FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.\\n\\n function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.\\n }\\n\\n function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.\\n }\\n\\n function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.\\n }\\n\\n function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.\\n }\\n\\n function powWad(int256 x, int256 y) internal pure returns (int256) {\\n // Equivalent to x to the power of y because x ** y = (e ** ln(x)) ** y = e ** (ln(x) * y)\\n return expWad((lnWad(x) * y) / int256(WAD)); // Using ln(x) means x must be greater than 0.\\n }\\n\\n function expWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n // When the result is < 0.5 we return zero. This happens when\\n // x <= floor(log(0.5e18) * 1e18) ~ -42e18\\n if (x <= -42139678854452767551) return 0;\\n\\n // When the result is > (2**255 - 1) / 1e18 we can not represent it as an\\n // int. This happens when x >= floor(log((2**255 - 1) / 1e18) * 1e18) ~ 135.\\n if (x >= 135305999368893231589) revert(\\\"EXP_OVERFLOW\\\");\\n\\n // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96\\n // for more intermediate precision and a binary basis. This base conversion\\n // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.\\n x = (x << 78) / 5**18;\\n\\n // Reduce range of x to (-\\u00bd ln 2, \\u00bd ln 2) * 2**96 by factoring out powers\\n // of two such that exp(x) = exp(x') * 2**k, where k is an integer.\\n // Solving this gives k = round(x / log(2)) and x' = x - k * log(2).\\n int256 k = ((x << 96) / 54916777467707473351141471128 + 2**95) >> 96;\\n x = x - k * 54916777467707473351141471128;\\n\\n // k is in the range [-61, 195].\\n\\n // Evaluate using a (6, 7)-term rational approximation.\\n // p is made monic, we'll multiply by a scale factor later.\\n int256 y = x + 1346386616545796478920950773328;\\n y = ((y * x) >> 96) + 57155421227552351082224309758442;\\n int256 p = y + x - 94201549194550492254356042504812;\\n p = ((p * y) >> 96) + 28719021644029726153956944680412240;\\n p = p * x + (4385272521454847904659076985693276 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n int256 q = x - 2855989394907223263936484059900;\\n q = ((q * x) >> 96) + 50020603652535783019961831881945;\\n q = ((q * x) >> 96) - 533845033583426703283633433725380;\\n q = ((q * x) >> 96) + 3604857256930695427073651918091429;\\n q = ((q * x) >> 96) - 14423608567350463180887372962807573;\\n q = ((q * x) >> 96) + 26449188498355588339934803723976023;\\n\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial won't have zeros in the domain as all its roots are complex.\\n // No scaling is necessary because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r should be in the range (0.09, 0.25) * 2**96.\\n\\n // We now need to multiply r by:\\n // * the scale factor s = ~6.031367120.\\n // * the 2**k factor from the range reduction.\\n // * the 1e18 / 2**96 factor for base conversion.\\n // We do this all at once, with an intermediate result in 2**213\\n // basis, so the final right shift is always by a positive amount.\\n r = int256((uint256(r) * 3822833074963236453042738258902158003155416615667) >> uint256(195 - k));\\n }\\n }\\n\\n function lnWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n // We want to convert x from 10**18 fixed point to 2**96 fixed point.\\n // We do this by multiplying by 2**96 / 10**18. But since\\n // ln(x * C) = ln(x) + ln(C), we can simply do nothing here\\n // and add ln(2**96 / 10**18) at the end.\\n\\n // Reduce range of x to (1, 2) * 2**96\\n // ln(2^k * x) = k * ln(2) + ln(x)\\n int256 k = int256(log2(uint256(x))) - 96;\\n x <<= uint256(159 - k);\\n x = int256(uint256(x) >> 159);\\n\\n // Evaluate using a (8, 8)-term rational approximation.\\n // p is made monic, we will multiply by a scale factor later.\\n int256 p = x + 3273285459638523848632254066296;\\n p = ((p * x) >> 96) + 24828157081833163892658089445524;\\n p = ((p * x) >> 96) + 43456485725739037958740375743393;\\n p = ((p * x) >> 96) - 11111509109440967052023855526967;\\n p = ((p * x) >> 96) - 45023709667254063763336534515857;\\n p = ((p * x) >> 96) - 14706773417378608786704636184526;\\n p = p * x - (795164235651350426258249787498 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n // q is monic by convention.\\n int256 q = x + 5573035233440673466300451813936;\\n q = ((q * x) >> 96) + 71694874799317883764090561454958;\\n q = ((q * x) >> 96) + 283447036172924575727196451306956;\\n q = ((q * x) >> 96) + 401686690394027663651624208769553;\\n q = ((q * x) >> 96) + 204048457590392012362485061816622;\\n q = ((q * x) >> 96) + 31853899698501571402653359427138;\\n q = ((q * x) >> 96) + 909429971244387300277376558375;\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial is known not to have zeros in the domain.\\n // No scaling required because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r is in the range (0, 0.125) * 2**96\\n\\n // Finalization, we need to:\\n // * multiply by the scale factor s = 5.549\\u2026\\n // * add ln(2**96 / 10**18)\\n // * add k * ln(2)\\n // * multiply by 10**18 / 2**96 = 5**18 >> 78\\n\\n // mul s * 5e18 * 2**96, base is now 5**18 * 2**192\\n r *= 1677202110996718588342820967067443963516166;\\n // add ln(2) * k * 5e18 * 2**192\\n r += 16597577552685614221487285958193947469193820559219878177908093499208371 * k;\\n // add ln(2**96 / 10**18) * 5e18 * 2**192\\n r += 600920179829731861736702779321621459595472258049074101567377883020018308;\\n // base conversion: mul 2**18 / 2**192\\n r >>= 174;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n LOW LEVEL FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function mulDivDown(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // Divide z by the denominator.\\n z := div(z, denominator)\\n }\\n }\\n\\n function mulDivUp(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // First, divide z - 1 by the denominator and add 1.\\n // We allow z - 1 to underflow if z is 0, because we multiply the\\n // end result by 0 if z is zero, ensuring we return 0 if z is zero.\\n z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1))\\n }\\n }\\n\\n function rpow(\\n uint256 x,\\n uint256 n,\\n uint256 scalar\\n ) internal pure returns (uint256 z) {\\n assembly {\\n switch x\\n case 0 {\\n switch n\\n case 0 {\\n // 0 ** 0 = 1\\n z := scalar\\n }\\n default {\\n // 0 ** n = 0\\n z := 0\\n }\\n }\\n default {\\n switch mod(n, 2)\\n case 0 {\\n // If n is even, store scalar in z for now.\\n z := scalar\\n }\\n default {\\n // If n is odd, store x in z for now.\\n z := x\\n }\\n\\n // Shifting right by 1 is like dividing by 2.\\n let half := shr(1, scalar)\\n\\n for {\\n // Shift n right by 1 before looping to halve it.\\n n := shr(1, n)\\n } n {\\n // Shift n right by 1 each iteration to halve it.\\n n := shr(1, n)\\n } {\\n // Revert immediately if x ** 2 would overflow.\\n // Equivalent to iszero(eq(div(xx, x), x)) here.\\n if shr(128, x) {\\n revert(0, 0)\\n }\\n\\n // Store x squared.\\n let xx := mul(x, x)\\n\\n // Round to the nearest number.\\n let xxRound := add(xx, half)\\n\\n // Revert if xx + half overflowed.\\n if lt(xxRound, xx) {\\n revert(0, 0)\\n }\\n\\n // Set x to scaled xxRound.\\n x := div(xxRound, scalar)\\n\\n // If n is even:\\n if mod(n, 2) {\\n // Compute z * x.\\n let zx := mul(z, x)\\n\\n // If z * x overflowed:\\n if iszero(eq(div(zx, x), z)) {\\n // Revert if x is non-zero.\\n if iszero(iszero(x)) {\\n revert(0, 0)\\n }\\n }\\n\\n // Round to the nearest number.\\n let zxRound := add(zx, half)\\n\\n // Revert if zx + half overflowed.\\n if lt(zxRound, zx) {\\n revert(0, 0)\\n }\\n\\n // Return properly scaled zxRound.\\n z := div(zxRound, scalar)\\n }\\n }\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n GENERAL NUMBER UTILITIES\\n //////////////////////////////////////////////////////////////*/\\n\\n function sqrt(uint256 x) internal pure returns (uint256 z) {\\n assembly {\\n let y := x // We start y at x, which will help us make our initial estimate.\\n\\n z := 181 // The \\\"correct\\\" value is 1, but this saves a multiplication later.\\n\\n // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad\\n // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.\\n\\n // We check y >= 2^(k + 8) but shift right by k bits\\n // each branch to ensure that if x >= 256, then y >= 256.\\n if iszero(lt(y, 0x10000000000000000000000000000000000)) {\\n y := shr(128, y)\\n z := shl(64, z)\\n }\\n if iszero(lt(y, 0x1000000000000000000)) {\\n y := shr(64, y)\\n z := shl(32, z)\\n }\\n if iszero(lt(y, 0x10000000000)) {\\n y := shr(32, y)\\n z := shl(16, z)\\n }\\n if iszero(lt(y, 0x1000000)) {\\n y := shr(16, y)\\n z := shl(8, z)\\n }\\n\\n // Goal was to get z*z*y within a small factor of x. More iterations could\\n // get y in a tighter range. Currently, we will have y in [256, 256*2^16).\\n // We ensured y >= 256 so that the relative difference between y and y+1 is small.\\n // That's not possible if x < 256 but we can just verify those cases exhaustively.\\n\\n // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.\\n // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.\\n // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.\\n\\n // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range\\n // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.\\n\\n // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate\\n // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.\\n\\n // There is no overflow risk here since y < 2^136 after the first branch above.\\n z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.\\n\\n // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n\\n // If x+1 is a perfect square, the Babylonian method cycles between\\n // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.\\n // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\\n // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.\\n // If you don't care whether the floor or ceil square root is returned, you can remove this statement.\\n z := sub(z, lt(div(x, z), z))\\n }\\n }\\n\\n function log2(uint256 x) internal pure returns (uint256 r) {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n assembly {\\n r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))\\n r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))\\n r := or(r, shl(5, lt(0xffffffff, shr(r, x))))\\n r := or(r, shl(4, lt(0xffff, shr(r, x))))\\n r := or(r, shl(3, lt(0xff, shr(r, x))))\\n r := or(r, shl(2, lt(0xf, shr(r, x))))\\n r := or(r, shl(1, lt(0x3, shr(r, x))))\\n r := or(r, lt(0x1, shr(r, x)))\\n }\\n }\\n\\n function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := mod(x, y)\\n }\\n }\\n\\n function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := div(x, y)\\n }\\n }\\n\\n /// @dev Will return 0 instead of reverting if y is zero.\\n function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // Add 1 to x * y if x % y > 0.\\n z := add(gt(mod(x, y), 0), div(x, y))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\"},\"solmate/src/utils/SafeTransferLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\n\\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)\\n/// @dev Caution! This library won't check that a token has code, responsibility is delegated to the caller.\\nlibrary SafeTransferLib {\\n /*//////////////////////////////////////////////////////////////\\n ETH OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n bool success;\\n\\n assembly {\\n // Transfer the ETH and store if it succeeded or not.\\n success := call(gas(), to, amount, 0, 0, 0, 0)\\n }\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferFrom(\\n ERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\\n mstore(4, from) // Append the \\\"from\\\" argument.\\n mstore(36, to) // Append the \\\"to\\\" argument.\\n mstore(68, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 100 because that's the total length of our calldata (4 + 32 * 3)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 100, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x095ea7b300000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"APPROVE_FAILED\\\");\\n }\\n}\\n\",\"keccak256\":\"0x5f2e1158c68c1f3d15b80e8a7dd92b6849f873066969562ad33c0abb80e536ff\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x610120604052348015610010575f80fd5b5060405161644938038061644983398101604081905261002f9161021c565b8160405180602001604052805f81525060405180602001604052805f8152508181846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100b09190610254565b60c96100bc8482610313565b5060ca6100c98382610313565b5060ff81166080524660a0526100dd610108565b60c0525050506001600160a01b0392831660e05250508116610100526101016101a1565b5050610444565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c960405161013991906103d2565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f54610100900460ff16156101b4575f80fd5b5f5460ff90811614610203575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610219575f80fd5b50565b5f806040838503121561022d575f80fd5b825161023881610205565b602084015190925061024981610205565b809150509250929050565b5f60208284031215610264575f80fd5b815160ff81168114610274575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102a357607f821691505b6020821081036102c157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561030e57805f5260205f20601f840160051c810160208510156102ec5750805b601f840160051c820191505b8181101561030b575f81556001016102f8565b50505b505050565b81516001600160401b0381111561032c5761032c61027b565b6103408161033a845461028f565b846102c7565b602080601f831160018114610373575f841561035c5750858301515b5f19600386901b1c1916600185901b1785556103ca565b5f85815260208120601f198616915b828110156103a157888601518255948401946001909101908401610382565b50858210156103be57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f8083546103df8161028f565b600182811680156103f7576001811461040c57610438565b60ff1984168752821515830287019450610438565b875f526020805f205f5b8581101561042f5781548a820152908401908201610416565b50505082870194505b50929695505050505050565b60805160a05160c05160e05161010051615f276105225f395f81816108070152818161161c015281816117c001528181611e3e015281816120910152818161220b0152818161257101528181612ed7015281816130800152818161316f015281816136990152614b0501525f81816107ac0152818161168001528181611c2201528181611d160152818161227d01528181612337015281816123fe0152818161286501528181612e59015281816136fd01528181614c92015281816151c001526152d501525f611c8f01525f611c5a01525f6107430152615f275ff3fe608060405234801561000f575f80fd5b5060043610610539575f3560e01c80636e76fc8f116102bf578063b2a02ff111610186578063d5164184116100ef578063e63ab1e9116100a9578063ef8b30f711610084578063ef8b30f714610d5e578063f3fdb15a14610d71578063fb0fc4c314610d84578063fea45d9414610d9b575f80fd5b8063e63ab1e914610d26578063e94b3c2114610d4d578063eee8c9e014610d56575f80fd5b8063d516418414610c92578063d547741f14610ca5578063d6b7494f14610cb8578063d905777e14610cc1578063dd62ed3e14610ce9578063e00b262514610d13575f80fd5b8063c63d75b611610140578063c63d75b614610831578063c6e6f59214610bf7578063ccfd8b1114610c0a578063ce96cb7714610c3b578063d2681a0b14610c4e578063d505accf14610c7f575f80fd5b8063b2a02ff114610b85578063b3d7f6b914610b98578063b460af9414610bab578063ba08765214610bbe578063bee36bb314610bd1578063bf722ca214610be4575f80fd5b806391d1485411610228578063a16a8850116101e2578063a16a885014610b27578063a1bab44714610b3c578063a1e8f02b14610b4f578063a217fddf14610b58578063a9059cbb14610b5f578063acb7081514610b72575f80fd5b806391d1485414610ac0578063926bb63314610ad357806394bf804d14610ae657806395d89b4114610af957806397bce8d014610b01578063a05a091a14610b14575f80fd5b80637ecebe00116102795780637ecebe0014610a6b5780638456cb5914610a8a5780638a1baa4614610a925780638bcd401614610a9b5780638c3cba5a14610aae5780638d0e5f0214610ab7575f80fd5b80636e76fc8f146109c05780636eb9ffeb146109e757806370a0823114610a1357806378007e2314610a325780637ad226dc14610a455780637e932d3214610a58575f80fd5b8063313ce567116104035780634322b7141161036c5780635cc2ef83116103265780635cc2ef83146109225780635e5c06e21461093557806361d027b31461097e57806366601032146109915780636bb65f531461099a5780636e553f65146109ad575f80fd5b80634322b7141461085857806347dffde01461088a5780634914c0081461089d5780634cdad506146108b05780634e7c5059146108c35780635c975abb14610917575f80fd5b80633aa18d6f116103bd5780633aa18d6f146107e65780633c6f317f146107ef5780633ec045a6146108025780633f4ba83a14610829578063402d267d1461083157806342da42bf14610845575f80fd5b8063313ce5671461073e57806333eeb1471461076557806334f7d1f2146107795780633644e5151461078c57806336568abe1461079457806338d52e0f146107a7575f80fd5b806313700101116104a5578063248a9ca31161045f578063248a9ca3146106bb57806325fc07a9146106dd57806328acf2cf146106fc5780632c5dcc771461070f5780632e0af008146107225780632f2ff15d1461072b575f80fd5b8063137001011461065d57806318160ddd146106705780631a5b9e62146106795780631a90f1861461068c5780631d43b30b1461069557806323b872dd146106a8575f80fd5b806307a2d13a116104f657806307a2d13a146105d6578063095ea7b3146105e95780630a28a477146105fc5780630ab69be81461060f5780630e52dbec146106365780630f2b75aa14610655575f80fd5b8063014a296f1461053d57806301e1d1141461056a57806301ffc9a714610580578063022d8af5146105a35780630539fa8c146105b857806306fdde03146105c1575b5f80fd5b61055061054b36600461566a565b610dae565b604080519283526020830191909152015b60405180910390f35b610572610de3565b604051908152602001610561565b61059361058e366004615685565b610e8f565b6040519015158152602001610561565b6105b66105b13660046156c7565b610ec5565b005b61057260d85481565b6105c9610f54565b60405161056191906156e0565b6105726105e4366004615715565b610fe0565b6105936105f736600461572c565b61100c565b61057261060a366004615715565b611077565b61055061061d366004615715565b5f90815260d16020526040902080546001909101549091565b60da546106439060ff1681565b60405160ff9091168152602001610561565b610572611096565b6105b661066b366004615794565b61113b565b61057260cb5481565b6105726106873660046157d3565b6111ac565b61057260d45481565b6105726106a336600461566a565b6116b5565b6105936106b6366004615825565b6117b5565b6105726106c9366004615715565b5f9081526065602052604090206001015490565b6105726106eb366004615715565b5f90815260d1602052604090205490565b6105b661070a366004615873565b611916565b6105b661071d36600461572c565b611962565b61057260dd5481565b6105b661073936600461588c565b6119d2565b6106437f000000000000000000000000000000000000000000000000000000000000000081565b60e35461059390600160a01b900460ff1681565b6105726107873660046158ba565b6119fb565b610572611c57565b6105b66107a236600461588c565b611cb1565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610561565b61057260d95481565b6105726107fd3660046158ba565b611cd3565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6105b6611d46565b61057261083f36600461566a565b505f1990565b6105b6610853366004615715565b611d7b565b60dc5461087290600160801b90046001600160801b031681565b6040516001600160801b039091168152602001610561565b610572610898366004615715565b611dba565b6105726108ab3660046158f8565b611dd8565b6105726108be366004615715565b6122af565b6108f76108d1366004615715565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610561565b60975460ff16610593565b6105b6610930366004615937565b6122b9565b61096361094336600461566a565b60d26020525f908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610561565b60e1546107ce906001600160a01b031681565b61057260e25481565b60e3546107ce906001600160a01b031681565b6105726109bb36600461588c565b612313565b6105727f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da546109fe90600160281b900463ffffffff1681565b60405163ffffffff9091168152602001610561565b610572610a2136600461566a565b60cc6020525f908152604090205481565b610572610a40366004615715565b6123b9565b610550610a5336600461588c565b6123d0565b6105b6610a66366004615957565b61242d565b610572610a7936600461566a565b60ce6020525f908152604090205481565b6105b66124aa565b61057260d55481565b6105b6610aa936600461566a565b6124bc565b61057260d35481565b61057260df5481565b610593610ace36600461588c565b61253c565b6105b6610ae136600461566a565b612566565b610572610af436600461588c565b61284c565b6105c96128e7565b6105b6610b0f366004615976565b6128f4565b610572610b223660046157d3565b612a55565b60da546109fe90610100900463ffffffff1681565b6105b6610b4a366004615715565b612e8d565b61057260d75481565b6105725f81565b610593610b6d36600461572c565b612ecc565b610550610b8036600461588c565b613021565b6105b6610b93366004615825565b61303d565b610572610ba6366004615715565b613051565b610572610bb9366004615a1f565b613067565b610572610bcc366004615a1f565b61316c565b6105b6610bdf36600461566a565b613266565b610572610bf2366004615715565b6132ba565b610572610c05366004615715565b6132d9565b610550610c1836600461588c565b60cf60209081525f92835260408084209091529082529020805460019091015482565b610572610c4936600461566a565b6132f0565b610550610c5c36600461588c565b60d060209081525f92835260408084209091529082529020805460019091015482565b6105b6610c8d366004615a53565b613311565b610572610ca0366004615a1f565b6134d6565b6105b6610cb336600461588c565b61372f565b61057260d65481565b610572610ccf36600461566a565b6001600160a01b03165f90815260cc602052604090205490565b610572610cf7366004615abc565b60cd60209081525f928352604080842090915290825290205481565b6105b6610d213660046156c7565b613753565b6105727f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61057260de5481565b6105726137ab565b610572610d6c366004615715565b61388c565b60db546107ce906001600160a01b031681565b60da546109fe90600160481b900463ffffffff1681565b60dc54610872906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610dd190610fe0565b610dda846116b5565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610e55575f81815260d160205260409020600381015480831115610e4957824210610e2f578160020154610e44565b6002820154610e449042839003838603613896565b860195505b50506224ea0001610dfd565b50610e7860e254670de0b6b3a76400000360d454610e716137ab565b03906138b4565b610e806138c8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610ebf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610ecf8161393e565b610ed7613948565b60dd5f828254610ee79190615b10565b90915550610ef590506139c1565b60dc80546fffffffffffffffffffffffffffffffff19166001600160801b0384169081179091556040519081527f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e906020015b60405180910390a15050565b60c98054610f6190615b23565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8d90615b23565b8015610fd85780601f10610faf57610100808354040283529160200191610fd8565b820191905f5260205f20905b815481529060010190602001808311610fbb57829003601f168201915b505050505081565b60cb545f90801561100357610ffe610ff6610de3565b849083613896565b611005565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110669086815260200190565b60405180910390a350600192915050565b60cb545f90801561100357610ffe8161108e610de3565b859190613a27565b60dd5460de545f9190828183106110af5760d8546110b3565b60d9545b60da549091505f906110ee906110d690600160481b900463ffffffff1642615b5b565b6110e09084615b6e565b6110e990615b85565b613a54565b61110090670de0b6b3a7640000615b9f565b905061110c81856138b4565b61112861112183670de0b6b3a7640000615b5b565b85906138b4565b6111329190615b10565b94505050505090565b5f6111458161393e565b8282604051602001611158929190615bbe565b60405160208183030381529060405260c990816111759190615c39565b508282604051602001611189929190615cf5565b60405160208183030381529060405260ca90816111a69190615c39565b50505050565b5f6111b5613bc7565b6111bd613bd6565b845f036111dd5760405163774257f760e01b815260040160405180910390fd5b60da546111f190879060ff1660035f613c01565b5f86815260d1602052604090206112088188613d9b565b60dd5f8282546112189190615b10565b909155505060e3546001600160a01b0316801561128657604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b15801561126f575f80fd5b505af1158015611281573d5f803e3d5ffd5b505050505b5f6112918389613e19565b90508015611324575f8160d3546112a89190615b10565b90506112ba6112b5613e55565b613f65565b60dc546112f5906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b60dd54906001600160801b03166138b4565b60d4546113029083615b10565b111561132057604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061132f611096565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff1661137d8a600101548b5f015489613fa2565b6113878888613fcf565b611394898960d354613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa1580156113ea573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140e9190615d33565b905061143361142c611420428f615b5b565b83906301e13380613896565b8c906138b4565b935050505080886114449190615b10565b93508684111561146757604051632c1b6b4160e21b815260040160405180910390fd5b6114718585614003565b5f89815260d0602090815260408083206001600160a01b0389168452909152812080549091036114c8576001600160a01b0386165f90815260d26020526040902060018101546114c1908c614079565b6001909101555b5f8061150b6114d685614164565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614190565b91509150815f1461152f5781866002015f8282546115299190615b10565b90915550505b611538816141dc565b60405180604001604052808c855f01546115529190615b10565b81526020018585600101546115679190615b10565b90525f8d815260d0602090815260408083206001600160a01b038d811680865291845293829020855181559483015160019095019490945580513381529182018f905281018790529194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139060600160405180910390a46115ee6139c1565b6115f789614208565b604051637b9d893160e01b81523060048201526001600160a01b0386811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b15801561165d575f80fd5b505af115801561166f573d5f803e3d5ffd5b506116a99250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614256565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b811561178a57600182161561176f575f81815260d0602090815260408083206001600160a01b038a16845290915281206001810154815491929161172a9190615b10565b90506117368188615b10565b96508242111561176c5761175f8561174e8542615b5b565b6117589190615b6e565b82906138b4565b6117699088615b10565b96505b50505b60019190911c906117836224ea0082615b10565b90506116e6565b600284015480156117ab5761179e81611dba565b6117a89087615b10565b95505b5050505050919050565b5f6117be613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530866117f8866122af565b6040518463ffffffff1660e01b815260040161181693929190615d4a565b5f6040518083038186803b15801561182c575f80fd5b505afa15801561183e573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561190257604051630149e46f60e01b81526001600160a01b038681166004830152821690630149e46f906024015f604051808303815f87803b158015611895575f80fd5b505af11580156118a7573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b1580156118eb575f80fd5b505af11580156118fd573d5f803e3d5ffd5b505050505b61190d858585614298565b95945050505050565b5f6119208161393e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610f48565b5f61196c8161393e565b6119776112b5613e55565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119ec8161393e565b6119f68383614372565b505050565b5f611a04613bc7565b611a0c613bd6565b835f03611a2c576040516356316e8760e01b815260040160405180910390fd5b60da54611a4090869060ff1660035f613c01565b5f85815260d16020526040812090611a588288613d9b565b90508060dd5f828254611a6b9190615b10565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f918291611ab0918a906143f7565b9092509050611abf8289615b10565b945086851015611ae257604051632c1b6b4160e21b815260040160405180910390fd5b611aec8489614448565b60d35f828254611afc9190615b5b565b90915550611b0c90508183615b10565b846002015f828254611b1e9190615b5b565b925050819055508060d55f828254611b369190615b10565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611b8b576001600160a01b0387165f90815260d2602052604090208054611b88908c614079565b90555b88815f015f828254611b9d9190615b10565b9250508190555082816001015f828254611bb79190615b10565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611c0c6139c1565b611c158a614208565b611c4a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614478565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611c8c57611c876144be565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611cc5575f80fd5b611ccf8282614557565b5050565b5f611cdc613bc7565b60da54611cf190869060ff1660036002613c01565b611cff8585858560016145bd565b9050611d096139c1565b611d3e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611d708161393e565b611d78614919565b50565b5f611d858161393e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610f48565b60df545f90801561100357610ffe611dd06137ab565b849083613a27565b5f611de1613bc7565b6001600160a01b0384163303611e0a576040516344511af160e01b815260040160405180910390fd5b60405163042dcf6b60e31b81523060048201526001600160a01b0383811660248301528581166044830152606482018590527f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890608401602060405180830381865afa158015611e83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea79190615d33565b9250825f03611ec95760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611f0357508515155b15612010576001821615611ff5575f81421015611f3a57611f278288898b5f6145bd565b9050611f338188615b5b565b9650611fe7565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611f6c9190615b10565b9150505f611f9360d6548542611f829190615b5b565b611f8c9190615b6e565b83906138b4565b611f9d9083615b10565b9050888111611fac5788611fb7565b611fb7898383613896565b9250825f03611fc8575f9850611fe4565b611fd584848b8d5f6145bd565b9250611fe1838a615b5b565b98505b50505b611ff18186615b10565b9450505b60019190911c906120096224ea0082615b10565b9050611ef5565b505083158015906120245750600281015415155b15612059575f612033856132ba565b90508015612057575f6120468288614966565b5090506120538185615b10565b9350505b505b604051636e1b003160e01b81523060048201526001600160a01b0384811660248301528681166044830152606482018490525f9182917f00000000000000000000000000000000000000000000000000000000000000001690636e1b0031906084016040805180830381865afa1580156120d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f99190615d6e565b915091508160d55f82825461210e9190615b10565b9091555050306001600160a01b038616036121345761212f30338984614ac0565b612199565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906121649033908b908690600401615d4a565b5f604051808303815f87803b15801561217b575f80fd5b505af115801561218d573d5f803e3d5ffd5b505050506121996139c1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b0388811660048301527f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906024015f604051808303815f87803b15801561224c575f80fd5b505af115801561225e573d5f803e3d5ffd5b505050506122a5333084876122739190615b10565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614478565b5050509392505050565b5f610ebf82610fe0565b5f6122c38161393e565b6122cb614cb9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61231d8361388c565b9050805f0361232a575f80fd5b61235f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614478565b6123698282614ce4565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8382614d57565b60df545f90801561100357610ffe8161108e6137ab565b5f806123da613bc7565b6123e48484614966565b90925090506123f16139c1565b6124266001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614478565b9250929050565b5f6124378161393e565b60e35460ff600160a01b90910416151582151514611ccf5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee6989061249e90851515815260200190565b60405180910390a25050565b6124b2614db6565b6124ba614e32565b565b5f6124c68161393e565b60db546001600160a01b0316156124e2576124e26112b5613e55565b60db80546001600160a01b0319166001600160a01b0384161790556125056139c1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146125af576040516317568c8f60e21b815260040160405180910390fd5b6125b7613948565b60dd5f8282546125c79190615b10565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b81156127a3576001821615612788575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916126439190615b10565b90508086106127855760e3546001600160a01b031680156126b557604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b15801561269e575f80fd5b505af11580156126b0573d5f803e3d5ffd5b505050505b6126bf8288615b5b565b96506126cb8287615b10565b83545f86815260d1602052604090209197506126e79190614e6f565b60d35f8282546126f79190615b5b565b90915550505f84815260d0602090815260408083206001600160a01b038d16845290915281208181556001908101919091558801546127369085614e92565b600189015560408051838152602081018490526001600160a01b038b1691339187917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a4505b50505b60019190911c9061279c6224ea0082615b10565b90506125ff565b6002850154158015906127c057506127ba846132ba565b93508315155b156127e1575f6127d08588614966565b5090506127dd8185615b10565b9350505b821561283c578260d55f8282546127f89190615b5b565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b6128446139c1565b505050505050565b5f61285683613051565b905061288d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b6128978284614ce4565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8184614d57565b60ca8054610f6190615b23565b5f54610100900460ff161580801561291257505f54600160ff909116105b8061292b5750303b15801561292b57505f5460ff166001145b612933575f80fd5b5f805460ff191660011790558015612954575f805461ff0019166101001790555b61295c614f52565b612964614f64565b60da805468ffffffffffffffff0019166101004263ffffffff1690810268ffffffff0000000000191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129b95f33614372565b6129c38b8b61113b565b6129cc89611916565b6129d588610ec5565b6129de876124bc565b6129e786612e8d565b6129f085611d7b565b6129f984613753565b612a0383836122b9565b8015612a48575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a5e613bc7565b845f03612a7e5760405163b8cb621960e01b815260040160405180910390fd5b60da54612a9390879060ff1660036002613c01565b5f86815260d160205260409020612aaa8188613d9b565b60dd5f828254612aba9190615b10565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612b049190615b10565b871115612b1f5760208101518151612b1c9190615b10565b96505b6040805180820190915281518152602080830151908201525f90612b4f90612b47908a614f7e565b518490614fc4565b60d354612b5c9190615b10565b905060dd5460d45482612b6f9190615b10565b1115612b8d57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612cba575f612ba1611096565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bf58a600101548b5f01548a613fa2565b612bff8989613fcf565b612c0a8a8a8a613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa158015612c60573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c849190615d33565b9050612caf612c96611420428f615b5b565b612ca890670de0b6b3a7640000615b10565b8c90615008565b965050505050612cbe565b8692505b85831015612cdf57604051632c1b6b4160e21b815260040160405180910390fd5b612ce98484614003565b5f80612d35612d00612cfb878c615b5b565b614164565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614190565b9150915081846002015f828254612d4c9190615b10565b90915550612d5b9050816141dc565b612d65838a61501c565b5060208301518351175f03612db8575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612db1908c614e92565b9055612de8565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b60408051338152602081018b90529081018690526001600160a01b0380881691908916908c907fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c9060600160405180910390a4612e436139c1565b612e4c8a614208565b612e806001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614256565b5050505095945050505050565b5f612e978161393e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610f48565b5f612ed5613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612f0f866122af565b6040518463ffffffff1660e01b8152600401612f2d93929190615d4a565b5f6040518083038186803b158015612f43575f80fd5b505afa158015612f55573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561301757604051630149e46f60e01b81523360048201526001600160a01b03821690630149e46f906024015f604051808303815f87803b158015612faa575f80fd5b505af1158015612fbc573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b158015613000575f80fd5b505af1158015613012573d5f803e3d5ffd5b505050505b611d3e848461507a565b5f8061302b613bc7565b6123e4613037856132ba565b84614966565b613045613bc7565b6119f633848484614ac0565b60cb545f90801561100357610ffe611dd0610de3565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db5906130b990309086908990600401615d4a565b5f6040518083038186803b1580156130cf575f80fd5b505afa1580156130e1573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561314f57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613138575f80fd5b505af115801561314a573d5f803e3d5ffd5b505050505b61315a8585856150dd565b91506131646139c1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530846131a7886122af565b6040518463ffffffff1660e01b81526004016131c593929190615d4a565b5f6040518083038186803b1580156131db575f80fd5b505afa1580156131ed573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561325b57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613244575f80fd5b505af1158015613256573d5f803e3d5ffd5b505050505b61315a8585856151e7565b5f6132708161393e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f90801561100357610ffe816132d16137ab565b859190613896565b60cb545f90801561100357610ffe816132d1610de3565b6001600160a01b0381165f90815260cc6020526040812054610ebf90610fe0565b4284101561331d575f80fd5b5f6001613328611c57565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613430573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134665750876001600160a01b0316816001600160a01b0316145b61346e575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134df613bc7565b6134e7613bd6565b6134f18285614003565b60e3546001600160a01b0316801561355a57604051636c912dad60e01b81526001600160a01b038481166004830152821690636c912dad906024015f604051808303815f87803b158015613543575f80fd5b505af1158015613555573d5f803e3d5ffd5b505050505b6135656112b5613e55565b61356e856123b9565b91505f8560d45461357f9190615b10565b60d481905560dc549091506135b0906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b8160d3546135be9190615b10565b11156135dc57604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135ed9190615b10565b90915550506001600160a01b0384165f90815260d260205260408120600201805485929061361c908490615b10565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136746139c1565b604051637b9d893160e01b81523060048201526001600160a01b0385811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b1580156136da575f80fd5b505af11580156136ec573d5f803e3d5ffd5b506137269250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614256565b50509392505050565b5f828152606560205260409020600101546137498161393e565b6119f68383614557565b5f61375d8161393e565b60dc80546001600160801b03908116600160801b918516918202179091556040519081527fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90602001610f48565b60d45460dd5460da545f929190839061387890613871906137d990600160281b900463ffffffff1642615b5b565b60db546301e13380906001600160a01b0316637c21fb1d6137fa888a613fcf565b613807898b60d354613fe7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613846573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061386a9190615d33565b9190613896565b84906138b4565b90506138848184615b10565b935050505090565b5f610ebf826132d9565b8282028115158415858304851417166138ad575f80fd5b0492915050565b5f6110058383670de0b6b3a7640000613896565b60da545f9081906138e490610100900463ffffffff1642615b5b565b9050805f036138f4575f91505090565b60da5461393890829061392490613912906224ea009060ff16615b6e565b60dc546001600160801b0316906138b4565b61392e9084615b10565b60d5549190613896565b91505090565b611d7881336152fc565b5f6139516138c8565b90508060d55f8282546139649190615b5b565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a3e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a6d57505f919050565b680755bf798b4a1bf1e58212613a81575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156124ba575f80fd5b60e354600160a01b900460ff16156124ba5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613c0f6224ea0086615d90565b15613c1c57506001613c6f565b428511613c2b57506002613c6f565b613c3b60ff85166224ea00615b6e565b613c486224ea0042615d90565b613c529042615b5b565b613c5c9190615b10565b851115613c6b57506004613c6f565b5060035b826004811115613c8157613c81615da3565b816004811115613c9357613c93615da3565b14158015613cc35750816004811115613cae57613cae615da3565b816004811115613cc057613cc0615da3565b14155b15613d94575f826004811115613cdb57613cdb615da3565b03613d2f57806004811115613cf257613cf2615da3565b836004811115613d0457613d04615da3565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d4157613d41615da3565b836004811115613d5357613d53615da3565b836004811115613d6557613d65615da3565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d26565b5050505050565b60038201545f9042831115613def5760028401544260038601819055613dd890613dc6908490615b5b565b613dd08487615b5b565b839190613896565b9250613de48382615b5b565b600286015550613e12565b828103613dfe575f9150613e12565b600384018390556002840180545f90915591505b5092915050565b81545f9081613e288483615b10565b9050613e41613e3b838760010154615342565b82615357565b613e4b9082615b5b565b9455509192915050565b60d45460dd545f919082613e698284613fcf565b60da549091505f90613ebb9061112190613e9090600160281b900463ffffffff1642615b5b565b60db5460d3546301e13380916001600160a01b031690637c21fb1d908890613807908b908d90613fe7565b9050613ec78185615b10565b9350613ede60e254826138b490919063ffffffff16565b945084613eeb8285615b10565b613ef59190615b5b565b60dd5560d484905560da805468ffffffff00000000001916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611d785760e154613f89906001600160a01b0316613f848361388c565b614ce4565b8060dd5f828254613f9a9190615b10565b909155505050565b5f8115801590613fb157508383115b613fbb575f611d3e565b611d3e82613fc98686615b5b565b90615365565b5f825f03613fdd575f611005565b6110058284615365565b5f835f03613ff5575f611d3e565b611d3e84613fc98486615b10565b336001600160a01b03831614611ccf576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146119f65761404782611077565b6140519082615b5b565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f0361408f57506401000000008117610ebf565b63ffffffff83168083101561410d575f6224ea006140ad8584615b5b565b6140b79190615db7565b90506140c581610100615b5b565b85901c156140e65760405163293cc41f60e21b815260040160405180910390fd5b6140f1816020615b10565b602086901c901b94508484176401000000001792505050610ebf565b5f6224ea0061411c8386615b5b565b6141269190615db7565b905060df81111561414a5760405163293cc41f60e21b815260040160405180910390fd5b614155816020615b10565b6001901b851792505050610ebf565b5f8061417b60e254846138b490919063ffffffff16565b905061418681613f65565b6110058184615b5b565b5f8082156141c4576141bf6141ad6141a787615379565b85615357565b6141b79085615b5b565b859085613896565b6141c6565b5f5b90506141d28185615b5b565b9150935093915050565b805f036141e65750565b60e254156141f757611d7881613f65565b8060d55f828254613f9a9190615b10565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806111a6575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142f1576142cd8382615b5b565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614318908490615b5b565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615ed28339815191529061435f9087815260200190565b60405180910390a3506001949350505050565b61437c828261253c565b611ccf575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143b33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f61440386615379565b9050801561443f576144246144188683615357565b60408801519083613896565b925061443083856138b4565b915061443c8284615b5b565b92505b50935093915050565b815460018301545f919061445c8482615b10565b600186015561190d61446e8383615357565b6141a79084615b5b565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d94575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144ef9190615dca565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614561828261253c565b15611ccf575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145de5760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906145f68289613d9b565b90508060dd5f8282546146099190615b10565b90915550505f88815260d0602090815260408083206001600160a01b038916845282528083208151808301909252805480835260019091015492820183905290929161465f918b9161465a91615b10565b615357565b6040805180820190915283518152602080850151908201529091505f906146869083614f7e565b5160e3549091506001600160a01b031680156146f357604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b1580156146dc575f80fd5b505af11580156146ee573d5f803e3d5ffd5b505050505b8b42101561479b5787156147935760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147419186906143f7565b90925090506147508183615b10565b886002015f8282546147629190615b5b565b925050819055508060d55f82825461477a9190615b10565b9091555061478a90508286615b5b565b985050506147e2565b8296506147e2565b60d6546147b6906147ac8e42615b5b565b6138719190615b6e565b6147c09084615b10565b96506147cc8388615b5b565b60d55f8282546147dc9190615b10565b90915550505b8987111561480357604051632c1b6b4160e21b815260040160405180910390fd5b61480d8683614e6f565b60d35f82825461481d9190615b5b565b9091555061482d9050848461501c565b5060208401518451175f03614889575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d29092529091209081015461487e908e614e92565b6001909101556148b9565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a461490a8c614208565b50505050505095945050505050565b614921615397565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001613a1d565b60e3545f9081906001600160a01b031680156149d357604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b1580156149bc575f80fd5b505af11580156149ce573d5f803e3d5ffd5b505050505b6149de6112b5613e55565b6001600160a01b0384165f90815260d2602052604090206002810154614a048782615357565b9350614a0f84611dba565b9450845f03614a315760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a429190615b5b565b90915550614a5290508482615b5b565b82600201819055508360df5f828254614a6b9190615b5b565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614ae05760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b0385811660048301523060248301527f0000000000000000000000000000000000000000000000000000000000000000169063e16ee720906044015f6040518083038186803b158015614b45575f80fd5b505afa158015614b57573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bc557604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614bae575f80fd5b505af1158015614bc0573d5f803e3d5ffd5b505050505b5f614bcf83611077565b9050614bdb83826153a5565b614be5848261541e565b60408051848152602081018390526001600160a01b03808716929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c7591815260200190565b60405180910390a3614c856139c1565b6128446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614256565b614cc1611096565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d4d57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614d36575f80fd5b505af1158015614d48573d5f803e3d5ffd5b505050505b6119f68383615485565b614d5f613bc7565b614d67613bd6565b614d6f614cb9565b5f614d78613e55565b90505f614d83613948565b9050614d8f8482615b10565b60dd5f828254614d9f9190615b10565b90915550614dae905082613f65565b6111a66139c1565b614de07f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361253c565b158015614e145750614e127f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361253c565b155b156124ba57604051631d006fdb60e31b815260040160405180910390fd5b614e3a613bc7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861494e3390565b815460018301545f9190614e838483615b5b565b855561190d61446e8383615357565b5f821580614ea65750816401000000001783145b15614eb257505f610ebf565b63ffffffff8316808303614f2057602184901c60015b60018216158015614ed857508115155b15614ee957600191821c9101614ec8565b6020614ef58282615b10565b9690961c90951b9485614f0b6224ea0083615b6e565b614f159087615b10565b179350505050610ebf565b6224ea00614f2e8285615b5b565b614f389190615db7565b614f43906020615b10565b6001901b198416915050610ebf565b5f54610100900460ff166124ba575f80fd5b5f54610100900460ff16614f76575f80fd5b6124ba6154d4565b604080518082019091525f8082526020820152825160208401515f91614fa8916132d19082615b10565b8085529050614fb78184615b5b565b6020850152509192915050565b815460018301545f919082614fd98583615b5b565b9050614fe58184615357565b614fef8385615357565b614ff99190615b5b565b60019096015550929392505050565b5f61100583670de0b6b3a764000084613896565b604080518082019091525f8082526020820152602083015183515f9161504191615b10565b90505f61504e8483615b5b565b855190915061505f90829084613896565b80865261506c9082615b5b565b602086015250929392505050565b335f90815260cc602052604081208054839190839061509a908490615b5b565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615ed2833981519152906110669086815260200190565b5f6150e784611077565b9050336001600160a01b03831614615154576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151525761512e8282615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61515e84826153a5565b615168828261541e565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614256565b5f336001600160a01b03831614615253576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146152515761522d8582615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61525c846122af565b9050805f03615269575f80fd5b61527381856153a5565b61527d828561541e565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614256565b615306828261253c565b611ccf57615313816154f2565b61531e836020615504565b60405160200161532f929190615e53565b6040516020818303038152906040525f80fd5b5f8183116153505781611005565b5090919050565b5f8183106153505781611005565b5f61100583670de0b6b3a764000084613a27565b805160208201515f919061538d8282615357565b611d3e9083615b5b565b60975460ff166124ba575f80fd5b6153ad613bc7565b6153b5614cb9565b6153c06112b5613e55565b5f6153c9613948565b90505f838260dd546153db9190615b10565b6153e59190615b5b565b90508060d45460d3546153f89190615b10565b111561541657604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc602052604081208054839290615445908490615b5b565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615ed2833981519152906020015b60405180910390a35050565b8060cb5f8282546154969190615b10565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615ed28339815191529101615479565b5f54610100900460ff166154e6575f80fd5b6097805460ff19169055565b6060610ebf6001600160a01b03831660145b60605f615512836002615b6e565b61551d906002615b10565b67ffffffffffffffff81111561553557615535615be1565b6040519080825280601f01601f19166020018201604052801561555f576020820181803683370190505b509050600360fc1b815f8151811061557957615579615ea8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106155a7576155a7615ea8565b60200101906001600160f81b03191690815f1a9053505f6155c9846002615b6e565b6155d4906001615b10565b90505b600181111561564b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061560857615608615ea8565b1a60f81b82828151811061561e5761561e615ea8565b60200101906001600160f81b03191690815f1a90535060049490941c9361564481615ebc565b90506155d7565b508315611005575f80fd5b6001600160a01b0381168114611d78575f80fd5b5f6020828403121561567a575f80fd5b813561100581615656565b5f60208284031215615695575f80fd5b81356001600160e01b031981168114611005575f80fd5b80356001600160801b03811681146156c2575f80fd5b919050565b5f602082840312156156d7575f80fd5b611005826156ac565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615725575f80fd5b5035919050565b5f806040838503121561573d575f80fd5b823561574881615656565b946020939093013593505050565b5f8083601f840112615766575f80fd5b50813567ffffffffffffffff81111561577d575f80fd5b602083019150836020828501011115612426575f80fd5b5f80602083850312156157a5575f80fd5b823567ffffffffffffffff8111156157bb575f80fd5b6157c785828601615756565b90969095509350505050565b5f805f805f60a086880312156157e7575f80fd5b853594506020860135935060408601359250606086013561580781615656565b9150608086013561581781615656565b809150509295509295909350565b5f805f60608486031215615837575f80fd5b833561584281615656565b9250602084013561585281615656565b929592945050506040919091013590565b803560ff811681146156c2575f80fd5b5f60208284031215615883575f80fd5b61100582615863565b5f806040838503121561589d575f80fd5b8235915060208301356158af81615656565b809150509250929050565b5f805f80608085870312156158cd575f80fd5b84359350602085013592506040850135915060608501356158ed81615656565b939692955090935050565b5f805f6060848603121561590a575f80fd5b833561591581615656565b925060208401359150604084013561592c81615656565b809150509250925092565b5f8060408385031215615948575f80fd5b50508035926020909101359150565b5f60208284031215615967575f80fd5b81358015158114611005575f80fd5b5f805f805f805f805f806101208b8d031215615990575f80fd5b8a3567ffffffffffffffff8111156159a6575f80fd5b6159b28d828e01615756565b909b5099506159c5905060208c01615863565b97506159d360408c016156ac565b965060608b01356159e381615656565b955060808b0135945060a08b013593506159ff60c08c016156ac565b925060e08b013591506101008b013590509295989b9194979a5092959850565b5f805f60608486031215615a31575f80fd5b833592506020840135615a4381615656565b9150604084013561592c81615656565b5f805f805f805f60e0888a031215615a69575f80fd5b8735615a7481615656565b96506020880135615a8481615656565b95506040880135945060608801359350615aa060808901615863565b925060a0880135915060c0880135905092959891949750929550565b5f8060408385031215615acd575f80fd5b8235615ad881615656565b915060208301356158af81615656565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ebf57610ebf615afc565b600181811c90821680615b3757607f821691505b602082108103615b5557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610ebf57610ebf615afc565b8082028115828204841417610ebf57610ebf615afc565b5f600160ff1b8201615b9957615b99615afc565b505f0390565b8181035f831280158383131683831282161715613e1257613e12615afc565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156119f657805f5260205f20601f840160051c81016020851015615c1a5750805b601f840160051c820191505b81811015613d94575f8155600101615c26565b815167ffffffffffffffff811115615c5357615c53615be1565b615c6781615c618454615b23565b84615bf5565b602080601f831160018114615c9a575f8415615c835750858301515b5f19600386901b1c1916600185901b178555612844565b5f85815260208120601f198616915b82811015615cc857888601518255948401946001909101908401615ca9565b5085821015615ce557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b03828116828216039080821115613e1257613e12615afc565b5f60208284031215615d43575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215615d7f575f80fd5b505080516020909101519092909150565b5f82615d9e57615d9e615ae8565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615dc557615dc5615ae8565b500490565b5f808354615dd781615b23565b60018281168015615def5760018114615e0457615e30565b60ff1984168752821515830287019450615e30565b875f526020805f205f5b85811015615e275781548a820152908401908201615e0e565b50505082870194505b50929695505050505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f615e846017830185615e3c565b7001034b99036b4b9b9b4b733903937b6329607d1b815261190d6011820185615e3c565b634e487b7160e01b5f52603260045260245ffd5b5f81615eca57615eca615afc565b505f19019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204485d3d9d92eeb57ec453d55009460985e73455784e22d97a9959ce3f189d91364736f6c63430008190033", - "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610539575f3560e01c80636e76fc8f116102bf578063b2a02ff111610186578063d5164184116100ef578063e63ab1e9116100a9578063ef8b30f711610084578063ef8b30f714610d5e578063f3fdb15a14610d71578063fb0fc4c314610d84578063fea45d9414610d9b575f80fd5b8063e63ab1e914610d26578063e94b3c2114610d4d578063eee8c9e014610d56575f80fd5b8063d516418414610c92578063d547741f14610ca5578063d6b7494f14610cb8578063d905777e14610cc1578063dd62ed3e14610ce9578063e00b262514610d13575f80fd5b8063c63d75b611610140578063c63d75b614610831578063c6e6f59214610bf7578063ccfd8b1114610c0a578063ce96cb7714610c3b578063d2681a0b14610c4e578063d505accf14610c7f575f80fd5b8063b2a02ff114610b85578063b3d7f6b914610b98578063b460af9414610bab578063ba08765214610bbe578063bee36bb314610bd1578063bf722ca214610be4575f80fd5b806391d1485411610228578063a16a8850116101e2578063a16a885014610b27578063a1bab44714610b3c578063a1e8f02b14610b4f578063a217fddf14610b58578063a9059cbb14610b5f578063acb7081514610b72575f80fd5b806391d1485414610ac0578063926bb63314610ad357806394bf804d14610ae657806395d89b4114610af957806397bce8d014610b01578063a05a091a14610b14575f80fd5b80637ecebe00116102795780637ecebe0014610a6b5780638456cb5914610a8a5780638a1baa4614610a925780638bcd401614610a9b5780638c3cba5a14610aae5780638d0e5f0214610ab7575f80fd5b80636e76fc8f146109c05780636eb9ffeb146109e757806370a0823114610a1357806378007e2314610a325780637ad226dc14610a455780637e932d3214610a58575f80fd5b8063313ce567116104035780634322b7141161036c5780635cc2ef83116103265780635cc2ef83146109225780635e5c06e21461093557806361d027b31461097e57806366601032146109915780636bb65f531461099a5780636e553f65146109ad575f80fd5b80634322b7141461085857806347dffde01461088a5780634914c0081461089d5780634cdad506146108b05780634e7c5059146108c35780635c975abb14610917575f80fd5b80633aa18d6f116103bd5780633aa18d6f146107e65780633c6f317f146107ef5780633ec045a6146108025780633f4ba83a14610829578063402d267d1461083157806342da42bf14610845575f80fd5b8063313ce5671461073e57806333eeb1471461076557806334f7d1f2146107795780633644e5151461078c57806336568abe1461079457806338d52e0f146107a7575f80fd5b806313700101116104a5578063248a9ca31161045f578063248a9ca3146106bb57806325fc07a9146106dd57806328acf2cf146106fc5780632c5dcc771461070f5780632e0af008146107225780632f2ff15d1461072b575f80fd5b8063137001011461065d57806318160ddd146106705780631a5b9e62146106795780631a90f1861461068c5780631d43b30b1461069557806323b872dd146106a8575f80fd5b806307a2d13a116104f657806307a2d13a146105d6578063095ea7b3146105e95780630a28a477146105fc5780630ab69be81461060f5780630e52dbec146106365780630f2b75aa14610655575f80fd5b8063014a296f1461053d57806301e1d1141461056a57806301ffc9a714610580578063022d8af5146105a35780630539fa8c146105b857806306fdde03146105c1575b5f80fd5b61055061054b36600461566a565b610dae565b604080519283526020830191909152015b60405180910390f35b610572610de3565b604051908152602001610561565b61059361058e366004615685565b610e8f565b6040519015158152602001610561565b6105b66105b13660046156c7565b610ec5565b005b61057260d85481565b6105c9610f54565b60405161056191906156e0565b6105726105e4366004615715565b610fe0565b6105936105f736600461572c565b61100c565b61057261060a366004615715565b611077565b61055061061d366004615715565b5f90815260d16020526040902080546001909101549091565b60da546106439060ff1681565b60405160ff9091168152602001610561565b610572611096565b6105b661066b366004615794565b61113b565b61057260cb5481565b6105726106873660046157d3565b6111ac565b61057260d45481565b6105726106a336600461566a565b6116b5565b6105936106b6366004615825565b6117b5565b6105726106c9366004615715565b5f9081526065602052604090206001015490565b6105726106eb366004615715565b5f90815260d1602052604090205490565b6105b661070a366004615873565b611916565b6105b661071d36600461572c565b611962565b61057260dd5481565b6105b661073936600461588c565b6119d2565b6106437f000000000000000000000000000000000000000000000000000000000000000081565b60e35461059390600160a01b900460ff1681565b6105726107873660046158ba565b6119fb565b610572611c57565b6105b66107a236600461588c565b611cb1565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610561565b61057260d95481565b6105726107fd3660046158ba565b611cd3565b6107ce7f000000000000000000000000000000000000000000000000000000000000000081565b6105b6611d46565b61057261083f36600461566a565b505f1990565b6105b6610853366004615715565b611d7b565b60dc5461087290600160801b90046001600160801b031681565b6040516001600160801b039091168152602001610561565b610572610898366004615715565b611dba565b6105726108ab3660046158f8565b611dd8565b6105726108be366004615715565b6122af565b6108f76108d1366004615715565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610561565b60975460ff16610593565b6105b6610930366004615937565b6122b9565b61096361094336600461566a565b60d26020525f908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610561565b60e1546107ce906001600160a01b031681565b61057260e25481565b60e3546107ce906001600160a01b031681565b6105726109bb36600461588c565b612313565b6105727f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da546109fe90600160281b900463ffffffff1681565b60405163ffffffff9091168152602001610561565b610572610a2136600461566a565b60cc6020525f908152604090205481565b610572610a40366004615715565b6123b9565b610550610a5336600461588c565b6123d0565b6105b6610a66366004615957565b61242d565b610572610a7936600461566a565b60ce6020525f908152604090205481565b6105b66124aa565b61057260d55481565b6105b6610aa936600461566a565b6124bc565b61057260d35481565b61057260df5481565b610593610ace36600461588c565b61253c565b6105b6610ae136600461566a565b612566565b610572610af436600461588c565b61284c565b6105c96128e7565b6105b6610b0f366004615976565b6128f4565b610572610b223660046157d3565b612a55565b60da546109fe90610100900463ffffffff1681565b6105b6610b4a366004615715565b612e8d565b61057260d75481565b6105725f81565b610593610b6d36600461572c565b612ecc565b610550610b8036600461588c565b613021565b6105b6610b93366004615825565b61303d565b610572610ba6366004615715565b613051565b610572610bb9366004615a1f565b613067565b610572610bcc366004615a1f565b61316c565b6105b6610bdf36600461566a565b613266565b610572610bf2366004615715565b6132ba565b610572610c05366004615715565b6132d9565b610550610c1836600461588c565b60cf60209081525f92835260408084209091529082529020805460019091015482565b610572610c4936600461566a565b6132f0565b610550610c5c36600461588c565b60d060209081525f92835260408084209091529082529020805460019091015482565b6105b6610c8d366004615a53565b613311565b610572610ca0366004615a1f565b6134d6565b6105b6610cb336600461588c565b61372f565b61057260d65481565b610572610ccf36600461566a565b6001600160a01b03165f90815260cc602052604090205490565b610572610cf7366004615abc565b60cd60209081525f928352604080842090915290825290205481565b6105b6610d213660046156c7565b613753565b6105727f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61057260de5481565b6105726137ab565b610572610d6c366004615715565b61388c565b60db546107ce906001600160a01b031681565b60da546109fe90600160481b900463ffffffff1681565b60dc54610872906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610dd190610fe0565b610dda846116b5565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610e55575f81815260d160205260409020600381015480831115610e4957824210610e2f578160020154610e44565b6002820154610e449042839003838603613896565b860195505b50506224ea0001610dfd565b50610e7860e254670de0b6b3a76400000360d454610e716137ab565b03906138b4565b610e806138c8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610ebf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610ecf8161393e565b610ed7613948565b60dd5f828254610ee79190615b10565b90915550610ef590506139c1565b60dc80546fffffffffffffffffffffffffffffffff19166001600160801b0384169081179091556040519081527f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e906020015b60405180910390a15050565b60c98054610f6190615b23565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8d90615b23565b8015610fd85780601f10610faf57610100808354040283529160200191610fd8565b820191905f5260205f20905b815481529060010190602001808311610fbb57829003601f168201915b505050505081565b60cb545f90801561100357610ffe610ff6610de3565b849083613896565b611005565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110669086815260200190565b60405180910390a350600192915050565b60cb545f90801561100357610ffe8161108e610de3565b859190613a27565b60dd5460de545f9190828183106110af5760d8546110b3565b60d9545b60da549091505f906110ee906110d690600160481b900463ffffffff1642615b5b565b6110e09084615b6e565b6110e990615b85565b613a54565b61110090670de0b6b3a7640000615b9f565b905061110c81856138b4565b61112861112183670de0b6b3a7640000615b5b565b85906138b4565b6111329190615b10565b94505050505090565b5f6111458161393e565b8282604051602001611158929190615bbe565b60405160208183030381529060405260c990816111759190615c39565b508282604051602001611189929190615cf5565b60405160208183030381529060405260ca90816111a69190615c39565b50505050565b5f6111b5613bc7565b6111bd613bd6565b845f036111dd5760405163774257f760e01b815260040160405180910390fd5b60da546111f190879060ff1660035f613c01565b5f86815260d1602052604090206112088188613d9b565b60dd5f8282546112189190615b10565b909155505060e3546001600160a01b0316801561128657604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b15801561126f575f80fd5b505af1158015611281573d5f803e3d5ffd5b505050505b5f6112918389613e19565b90508015611324575f8160d3546112a89190615b10565b90506112ba6112b5613e55565b613f65565b60dc546112f5906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b60dd54906001600160801b03166138b4565b60d4546113029083615b10565b111561132057604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061132f611096565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff1661137d8a600101548b5f015489613fa2565b6113878888613fcf565b611394898960d354613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa1580156113ea573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140e9190615d33565b905061143361142c611420428f615b5b565b83906301e13380613896565b8c906138b4565b935050505080886114449190615b10565b93508684111561146757604051632c1b6b4160e21b815260040160405180910390fd5b6114718585614003565b5f89815260d0602090815260408083206001600160a01b0389168452909152812080549091036114c8576001600160a01b0386165f90815260d26020526040902060018101546114c1908c614079565b6001909101555b5f8061150b6114d685614164565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614190565b91509150815f1461152f5781866002015f8282546115299190615b10565b90915550505b611538816141dc565b60405180604001604052808c855f01546115529190615b10565b81526020018585600101546115679190615b10565b90525f8d815260d0602090815260408083206001600160a01b038d811680865291845293829020855181559483015160019095019490945580513381529182018f905281018790529194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139060600160405180910390a46115ee6139c1565b6115f789614208565b604051637b9d893160e01b81523060048201526001600160a01b0386811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b15801561165d575f80fd5b505af115801561166f573d5f803e3d5ffd5b506116a99250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614256565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b811561178a57600182161561176f575f81815260d0602090815260408083206001600160a01b038a16845290915281206001810154815491929161172a9190615b10565b90506117368188615b10565b96508242111561176c5761175f8561174e8542615b5b565b6117589190615b6e565b82906138b4565b6117699088615b10565b96505b50505b60019190911c906117836224ea0082615b10565b90506116e6565b600284015480156117ab5761179e81611dba565b6117a89087615b10565b95505b5050505050919050565b5f6117be613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530866117f8866122af565b6040518463ffffffff1660e01b815260040161181693929190615d4a565b5f6040518083038186803b15801561182c575f80fd5b505afa15801561183e573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561190257604051630149e46f60e01b81526001600160a01b038681166004830152821690630149e46f906024015f604051808303815f87803b158015611895575f80fd5b505af11580156118a7573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b1580156118eb575f80fd5b505af11580156118fd573d5f803e3d5ffd5b505050505b61190d858585614298565b95945050505050565b5f6119208161393e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610f48565b5f61196c8161393e565b6119776112b5613e55565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119ec8161393e565b6119f68383614372565b505050565b5f611a04613bc7565b611a0c613bd6565b835f03611a2c576040516356316e8760e01b815260040160405180910390fd5b60da54611a4090869060ff1660035f613c01565b5f85815260d16020526040812090611a588288613d9b565b90508060dd5f828254611a6b9190615b10565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f918291611ab0918a906143f7565b9092509050611abf8289615b10565b945086851015611ae257604051632c1b6b4160e21b815260040160405180910390fd5b611aec8489614448565b60d35f828254611afc9190615b5b565b90915550611b0c90508183615b10565b846002015f828254611b1e9190615b5b565b925050819055508060d55f828254611b369190615b10565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611b8b576001600160a01b0387165f90815260d2602052604090208054611b88908c614079565b90555b88815f015f828254611b9d9190615b10565b9250508190555082816001015f828254611bb79190615b10565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611c0c6139c1565b611c158a614208565b611c4a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614478565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611c8c57611c876144be565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611cc5575f80fd5b611ccf8282614557565b5050565b5f611cdc613bc7565b60da54611cf190869060ff1660036002613c01565b611cff8585858560016145bd565b9050611d096139c1565b611d3e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b949350505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611d708161393e565b611d78614919565b50565b5f611d858161393e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610f48565b60df545f90801561100357610ffe611dd06137ab565b849083613a27565b5f611de1613bc7565b6001600160a01b0384163303611e0a576040516344511af160e01b815260040160405180910390fd5b60405163042dcf6b60e31b81523060048201526001600160a01b0383811660248301528581166044830152606482018590527f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890608401602060405180830381865afa158015611e83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea79190615d33565b9250825f03611ec95760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611f0357508515155b15612010576001821615611ff5575f81421015611f3a57611f278288898b5f6145bd565b9050611f338188615b5b565b9650611fe7565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611f6c9190615b10565b9150505f611f9360d6548542611f829190615b5b565b611f8c9190615b6e565b83906138b4565b611f9d9083615b10565b9050888111611fac5788611fb7565b611fb7898383613896565b9250825f03611fc8575f9850611fe4565b611fd584848b8d5f6145bd565b9250611fe1838a615b5b565b98505b50505b611ff18186615b10565b9450505b60019190911c906120096224ea0082615b10565b9050611ef5565b505083158015906120245750600281015415155b15612059575f612033856132ba565b90508015612057575f6120468288614966565b5090506120538185615b10565b9350505b505b604051636e1b003160e01b81523060048201526001600160a01b0384811660248301528681166044830152606482018490525f9182917f00000000000000000000000000000000000000000000000000000000000000001690636e1b0031906084016040805180830381865afa1580156120d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f99190615d6e565b915091508160d55f82825461210e9190615b10565b9091555050306001600160a01b038616036121345761212f30338984614ac0565b612199565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906121649033908b908690600401615d4a565b5f604051808303815f87803b15801561217b575f80fd5b505af115801561218d573d5f803e3d5ffd5b505050506121996139c1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b0388811660048301527f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906024015f604051808303815f87803b15801561224c575f80fd5b505af115801561225e573d5f803e3d5ffd5b505050506122a5333084876122739190615b10565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614478565b5050509392505050565b5f610ebf82610fe0565b5f6122c38161393e565b6122cb614cb9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61231d8361388c565b9050805f0361232a575f80fd5b61235f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614478565b6123698282614ce4565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8382614d57565b60df545f90801561100357610ffe8161108e6137ab565b5f806123da613bc7565b6123e48484614966565b90925090506123f16139c1565b6124266001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614478565b9250929050565b5f6124378161393e565b60e35460ff600160a01b90910416151582151514611ccf5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee6989061249e90851515815260200190565b60405180910390a25050565b6124b2614db6565b6124ba614e32565b565b5f6124c68161393e565b60db546001600160a01b0316156124e2576124e26112b5613e55565b60db80546001600160a01b0319166001600160a01b0384161790556125056139c1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146125af576040516317568c8f60e21b815260040160405180910390fd5b6125b7613948565b60dd5f8282546125c79190615b10565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b81156127a3576001821615612788575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916126439190615b10565b90508086106127855760e3546001600160a01b031680156126b557604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b15801561269e575f80fd5b505af11580156126b0573d5f803e3d5ffd5b505050505b6126bf8288615b5b565b96506126cb8287615b10565b83545f86815260d1602052604090209197506126e79190614e6f565b60d35f8282546126f79190615b5b565b90915550505f84815260d0602090815260408083206001600160a01b038d16845290915281208181556001908101919091558801546127369085614e92565b600189015560408051838152602081018490526001600160a01b038b1691339187917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a4505b50505b60019190911c9061279c6224ea0082615b10565b90506125ff565b6002850154158015906127c057506127ba846132ba565b93508315155b156127e1575f6127d08588614966565b5090506127dd8185615b10565b9350505b821561283c578260d55f8282546127f89190615b5b565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b6128446139c1565b505050505050565b5f61285683613051565b905061288d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614478565b6128978284614ce4565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610ebf8184614d57565b60ca8054610f6190615b23565b5f54610100900460ff161580801561291257505f54600160ff909116105b8061292b5750303b15801561292b57505f5460ff166001145b612933575f80fd5b5f805460ff191660011790558015612954575f805461ff0019166101001790555b61295c614f52565b612964614f64565b60da805468ffffffffffffffff0019166101004263ffffffff1690810268ffffffff0000000000191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129b95f33614372565b6129c38b8b61113b565b6129cc89611916565b6129d588610ec5565b6129de876124bc565b6129e786612e8d565b6129f085611d7b565b6129f984613753565b612a0383836122b9565b8015612a48575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a5e613bc7565b845f03612a7e5760405163b8cb621960e01b815260040160405180910390fd5b60da54612a9390879060ff1660036002613c01565b5f86815260d160205260409020612aaa8188613d9b565b60dd5f828254612aba9190615b10565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612b049190615b10565b871115612b1f5760208101518151612b1c9190615b10565b96505b6040805180820190915281518152602080830151908201525f90612b4f90612b47908a614f7e565b518490614fc4565b60d354612b5c9190615b10565b905060dd5460d45482612b6f9190615b10565b1115612b8d57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612cba575f612ba1611096565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bf58a600101548b5f01548a613fa2565b612bff8989613fcf565b612c0a8a8a8a613fe7565b6040516001600160e01b031960e088901b168152600481019590955260ff909316602485015260448401919091526064830152608482015260a401602060405180830381865afa158015612c60573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c849190615d33565b9050612caf612c96611420428f615b5b565b612ca890670de0b6b3a7640000615b10565b8c90615008565b965050505050612cbe565b8692505b85831015612cdf57604051632c1b6b4160e21b815260040160405180910390fd5b612ce98484614003565b5f80612d35612d00612cfb878c615b5b565b614164565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614190565b9150915081846002015f828254612d4c9190615b10565b90915550612d5b9050816141dc565b612d65838a61501c565b5060208301518351175f03612db8575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612db1908c614e92565b9055612de8565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b60408051338152602081018b90529081018690526001600160a01b0380881691908916908c907fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c9060600160405180910390a4612e436139c1565b612e4c8a614208565b612e806001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614256565b5050505095945050505050565b5f612e978161393e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610f48565b5f612ed5613bc7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612f0f866122af565b6040518463ffffffff1660e01b8152600401612f2d93929190615d4a565b5f6040518083038186803b158015612f43575f80fd5b505afa158015612f55573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561301757604051630149e46f60e01b81523360048201526001600160a01b03821690630149e46f906024015f604051808303815f87803b158015612faa575f80fd5b505af1158015612fbc573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b03878116600483015284169250630149e46f91506024015f604051808303815f87803b158015613000575f80fd5b505af1158015613012573d5f803e3d5ffd5b505050505b611d3e848461507a565b5f8061302b613bc7565b6123e4613037856132ba565b84614966565b613045613bc7565b6119f633848484614ac0565b60cb545f90801561100357610ffe611dd0610de3565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db5906130b990309086908990600401615d4a565b5f6040518083038186803b1580156130cf575f80fd5b505afa1580156130e1573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561314f57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613138575f80fd5b505af115801561314a573d5f803e3d5ffd5b505050505b61315a8585856150dd565b91506131646139c1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db530846131a7886122af565b6040518463ffffffff1660e01b81526004016131c593929190615d4a565b5f6040518083038186803b1580156131db575f80fd5b505afa1580156131ed573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561325b57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015613244575f80fd5b505af1158015613256573d5f803e3d5ffd5b505050505b61315a8585856151e7565b5f6132708161393e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f90801561100357610ffe816132d16137ab565b859190613896565b60cb545f90801561100357610ffe816132d1610de3565b6001600160a01b0381165f90815260cc6020526040812054610ebf90610fe0565b4284101561331d575f80fd5b5f6001613328611c57565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613430573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134665750876001600160a01b0316816001600160a01b0316145b61346e575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134df613bc7565b6134e7613bd6565b6134f18285614003565b60e3546001600160a01b0316801561355a57604051636c912dad60e01b81526001600160a01b038481166004830152821690636c912dad906024015f604051808303815f87803b158015613543575f80fd5b505af1158015613555573d5f803e3d5ffd5b505050505b6135656112b5613e55565b61356e856123b9565b91505f8560d45461357f9190615b10565b60d481905560dc549091506135b0906112e390600160801b90046001600160801b0316670de0b6b3a7640000615d13565b8160d3546135be9190615b10565b11156135dc57604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135ed9190615b10565b90915550506001600160a01b0384165f90815260d260205260408120600201805485929061361c908490615b10565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136746139c1565b604051637b9d893160e01b81523060048201526001600160a01b0385811660248301527f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906044015f604051808303815f87803b1580156136da575f80fd5b505af11580156136ec573d5f803e3d5ffd5b506137269250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614256565b50509392505050565b5f828152606560205260409020600101546137498161393e565b6119f68383614557565b5f61375d8161393e565b60dc80546001600160801b03908116600160801b918516918202179091556040519081527fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90602001610f48565b60d45460dd5460da545f929190839061387890613871906137d990600160281b900463ffffffff1642615b5b565b60db546301e13380906001600160a01b0316637c21fb1d6137fa888a613fcf565b613807898b60d354613fe7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613846573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061386a9190615d33565b9190613896565b84906138b4565b90506138848184615b10565b935050505090565b5f610ebf826132d9565b8282028115158415858304851417166138ad575f80fd5b0492915050565b5f6110058383670de0b6b3a7640000613896565b60da545f9081906138e490610100900463ffffffff1642615b5b565b9050805f036138f4575f91505090565b60da5461393890829061392490613912906224ea009060ff16615b6e565b60dc546001600160801b0316906138b4565b61392e9084615b10565b60d5549190613896565b91505090565b611d7881336152fc565b5f6139516138c8565b90508060d55f8282546139649190615b5b565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a3e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a6d57505f919050565b680755bf798b4a1bf1e58212613a81575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156124ba575f80fd5b60e354600160a01b900460ff16156124ba5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613c0f6224ea0086615d90565b15613c1c57506001613c6f565b428511613c2b57506002613c6f565b613c3b60ff85166224ea00615b6e565b613c486224ea0042615d90565b613c529042615b5b565b613c5c9190615b10565b851115613c6b57506004613c6f565b5060035b826004811115613c8157613c81615da3565b816004811115613c9357613c93615da3565b14158015613cc35750816004811115613cae57613cae615da3565b816004811115613cc057613cc0615da3565b14155b15613d94575f826004811115613cdb57613cdb615da3565b03613d2f57806004811115613cf257613cf2615da3565b836004811115613d0457613d04615da3565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d4157613d41615da3565b836004811115613d5357613d53615da3565b836004811115613d6557613d65615da3565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d26565b5050505050565b60038201545f9042831115613def5760028401544260038601819055613dd890613dc6908490615b5b565b613dd08487615b5b565b839190613896565b9250613de48382615b5b565b600286015550613e12565b828103613dfe575f9150613e12565b600384018390556002840180545f90915591505b5092915050565b81545f9081613e288483615b10565b9050613e41613e3b838760010154615342565b82615357565b613e4b9082615b5b565b9455509192915050565b60d45460dd545f919082613e698284613fcf565b60da549091505f90613ebb9061112190613e9090600160281b900463ffffffff1642615b5b565b60db5460d3546301e13380916001600160a01b031690637c21fb1d908890613807908b908d90613fe7565b9050613ec78185615b10565b9350613ede60e254826138b490919063ffffffff16565b945084613eeb8285615b10565b613ef59190615b5b565b60dd5560d484905560da805468ffffffff00000000001916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611d785760e154613f89906001600160a01b0316613f848361388c565b614ce4565b8060dd5f828254613f9a9190615b10565b909155505050565b5f8115801590613fb157508383115b613fbb575f611d3e565b611d3e82613fc98686615b5b565b90615365565b5f825f03613fdd575f611005565b6110058284615365565b5f835f03613ff5575f611d3e565b611d3e84613fc98486615b10565b336001600160a01b03831614611ccf576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146119f65761404782611077565b6140519082615b5b565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f0361408f57506401000000008117610ebf565b63ffffffff83168083101561410d575f6224ea006140ad8584615b5b565b6140b79190615db7565b90506140c581610100615b5b565b85901c156140e65760405163293cc41f60e21b815260040160405180910390fd5b6140f1816020615b10565b602086901c901b94508484176401000000001792505050610ebf565b5f6224ea0061411c8386615b5b565b6141269190615db7565b905060df81111561414a5760405163293cc41f60e21b815260040160405180910390fd5b614155816020615b10565b6001901b851792505050610ebf565b5f8061417b60e254846138b490919063ffffffff16565b905061418681613f65565b6110058184615b5b565b5f8082156141c4576141bf6141ad6141a787615379565b85615357565b6141b79085615b5b565b859085613896565b6141c6565b5f5b90506141d28185615b5b565b9150935093915050565b805f036141e65750565b60e254156141f757611d7881613f65565b8060d55f828254613f9a9190615b10565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806111a6575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142f1576142cd8382615b5b565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614318908490615b5b565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615ed28339815191529061435f9087815260200190565b60405180910390a3506001949350505050565b61437c828261253c565b611ccf575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143b33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f61440386615379565b9050801561443f576144246144188683615357565b60408801519083613896565b925061443083856138b4565b915061443c8284615b5b565b92505b50935093915050565b815460018301545f919061445c8482615b10565b600186015561190d61446e8383615357565b6141a79084615b5b565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d94575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144ef9190615dca565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b614561828261253c565b15611ccf575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145de5760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906145f68289613d9b565b90508060dd5f8282546146099190615b10565b90915550505f88815260d0602090815260408083206001600160a01b038916845282528083208151808301909252805480835260019091015492820183905290929161465f918b9161465a91615b10565b615357565b6040805180820190915283518152602080850151908201529091505f906146869083614f7e565b5160e3549091506001600160a01b031680156146f357604051636c912dad60e01b81526001600160a01b038a81166004830152821690636c912dad906024015f604051808303815f87803b1580156146dc575f80fd5b505af11580156146ee573d5f803e3d5ffd5b505050505b8b42101561479b5787156147935760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147419186906143f7565b90925090506147508183615b10565b886002015f8282546147629190615b5b565b925050819055508060d55f82825461477a9190615b10565b9091555061478a90508286615b5b565b985050506147e2565b8296506147e2565b60d6546147b6906147ac8e42615b5b565b6138719190615b6e565b6147c09084615b10565b96506147cc8388615b5b565b60d55f8282546147dc9190615b10565b90915550505b8987111561480357604051632c1b6b4160e21b815260040160405180910390fd5b61480d8683614e6f565b60d35f82825461481d9190615b5b565b9091555061482d9050848461501c565b5060208401518451175f03614889575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d29092529091209081015461487e908e614e92565b6001909101556148b9565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a461490a8c614208565b50505050505095945050505050565b614921615397565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001613a1d565b60e3545f9081906001600160a01b031680156149d357604051636c912dad60e01b81526001600160a01b038581166004830152821690636c912dad906024015f604051808303815f87803b1580156149bc575f80fd5b505af11580156149ce573d5f803e3d5ffd5b505050505b6149de6112b5613e55565b6001600160a01b0384165f90815260d2602052604090206002810154614a048782615357565b9350614a0f84611dba565b9450845f03614a315760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a429190615b5b565b90915550614a5290508482615b5b565b82600201819055508360df5f828254614a6b9190615b5b565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614ae05760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b0385811660048301523060248301527f0000000000000000000000000000000000000000000000000000000000000000169063e16ee720906044015f6040518083038186803b158015614b45575f80fd5b505afa158015614b57573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bc557604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614bae575f80fd5b505af1158015614bc0573d5f803e3d5ffd5b505050505b5f614bcf83611077565b9050614bdb83826153a5565b614be5848261541e565b60408051848152602081018390526001600160a01b03808716929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c7591815260200190565b60405180910390a3614c856139c1565b6128446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614256565b614cc1611096565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d4d57604051630149e46f60e01b81526001600160a01b038481166004830152821690630149e46f906024015f604051808303815f87803b158015614d36575f80fd5b505af1158015614d48573d5f803e3d5ffd5b505050505b6119f68383615485565b614d5f613bc7565b614d67613bd6565b614d6f614cb9565b5f614d78613e55565b90505f614d83613948565b9050614d8f8482615b10565b60dd5f828254614d9f9190615b10565b90915550614dae905082613f65565b6111a66139c1565b614de07f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361253c565b158015614e145750614e127f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361253c565b155b156124ba57604051631d006fdb60e31b815260040160405180910390fd5b614e3a613bc7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861494e3390565b815460018301545f9190614e838483615b5b565b855561190d61446e8383615357565b5f821580614ea65750816401000000001783145b15614eb257505f610ebf565b63ffffffff8316808303614f2057602184901c60015b60018216158015614ed857508115155b15614ee957600191821c9101614ec8565b6020614ef58282615b10565b9690961c90951b9485614f0b6224ea0083615b6e565b614f159087615b10565b179350505050610ebf565b6224ea00614f2e8285615b5b565b614f389190615db7565b614f43906020615b10565b6001901b198416915050610ebf565b5f54610100900460ff166124ba575f80fd5b5f54610100900460ff16614f76575f80fd5b6124ba6154d4565b604080518082019091525f8082526020820152825160208401515f91614fa8916132d19082615b10565b8085529050614fb78184615b5b565b6020850152509192915050565b815460018301545f919082614fd98583615b5b565b9050614fe58184615357565b614fef8385615357565b614ff99190615b5b565b60019096015550929392505050565b5f61100583670de0b6b3a764000084613896565b604080518082019091525f8082526020820152602083015183515f9161504191615b10565b90505f61504e8483615b5b565b855190915061505f90829084613896565b80865261506c9082615b5b565b602086015250929392505050565b335f90815260cc602052604081208054839190839061509a908490615b5b565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615ed2833981519152906110669086815260200190565b5f6150e784611077565b9050336001600160a01b03831614615154576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151525761512e8282615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61515e84826153a5565b615168828261541e565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614256565b5f336001600160a01b03831614615253576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146152515761522d8582615b5b565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61525c846122af565b9050805f03615269575f80fd5b61527381856153a5565b61527d828561541e565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46110056001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614256565b615306828261253c565b611ccf57615313816154f2565b61531e836020615504565b60405160200161532f929190615e53565b6040516020818303038152906040525f80fd5b5f8183116153505781611005565b5090919050565b5f8183106153505781611005565b5f61100583670de0b6b3a764000084613a27565b805160208201515f919061538d8282615357565b611d3e9083615b5b565b60975460ff166124ba575f80fd5b6153ad613bc7565b6153b5614cb9565b6153c06112b5613e55565b5f6153c9613948565b90505f838260dd546153db9190615b10565b6153e59190615b5b565b90508060d45460d3546153f89190615b10565b111561541657604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc602052604081208054839290615445908490615b5b565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615ed2833981519152906020015b60405180910390a35050565b8060cb5f8282546154969190615b10565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615ed28339815191529101615479565b5f54610100900460ff166154e6575f80fd5b6097805460ff19169055565b6060610ebf6001600160a01b03831660145b60605f615512836002615b6e565b61551d906002615b10565b67ffffffffffffffff81111561553557615535615be1565b6040519080825280601f01601f19166020018201604052801561555f576020820181803683370190505b509050600360fc1b815f8151811061557957615579615ea8565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106155a7576155a7615ea8565b60200101906001600160f81b03191690815f1a9053505f6155c9846002615b6e565b6155d4906001615b10565b90505b600181111561564b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061560857615608615ea8565b1a60f81b82828151811061561e5761561e615ea8565b60200101906001600160f81b03191690815f1a90535060049490941c9361564481615ebc565b90506155d7565b508315611005575f80fd5b6001600160a01b0381168114611d78575f80fd5b5f6020828403121561567a575f80fd5b813561100581615656565b5f60208284031215615695575f80fd5b81356001600160e01b031981168114611005575f80fd5b80356001600160801b03811681146156c2575f80fd5b919050565b5f602082840312156156d7575f80fd5b611005826156ac565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615725575f80fd5b5035919050565b5f806040838503121561573d575f80fd5b823561574881615656565b946020939093013593505050565b5f8083601f840112615766575f80fd5b50813567ffffffffffffffff81111561577d575f80fd5b602083019150836020828501011115612426575f80fd5b5f80602083850312156157a5575f80fd5b823567ffffffffffffffff8111156157bb575f80fd5b6157c785828601615756565b90969095509350505050565b5f805f805f60a086880312156157e7575f80fd5b853594506020860135935060408601359250606086013561580781615656565b9150608086013561581781615656565b809150509295509295909350565b5f805f60608486031215615837575f80fd5b833561584281615656565b9250602084013561585281615656565b929592945050506040919091013590565b803560ff811681146156c2575f80fd5b5f60208284031215615883575f80fd5b61100582615863565b5f806040838503121561589d575f80fd5b8235915060208301356158af81615656565b809150509250929050565b5f805f80608085870312156158cd575f80fd5b84359350602085013592506040850135915060608501356158ed81615656565b939692955090935050565b5f805f6060848603121561590a575f80fd5b833561591581615656565b925060208401359150604084013561592c81615656565b809150509250925092565b5f8060408385031215615948575f80fd5b50508035926020909101359150565b5f60208284031215615967575f80fd5b81358015158114611005575f80fd5b5f805f805f805f805f806101208b8d031215615990575f80fd5b8a3567ffffffffffffffff8111156159a6575f80fd5b6159b28d828e01615756565b909b5099506159c5905060208c01615863565b97506159d360408c016156ac565b965060608b01356159e381615656565b955060808b0135945060a08b013593506159ff60c08c016156ac565b925060e08b013591506101008b013590509295989b9194979a5092959850565b5f805f60608486031215615a31575f80fd5b833592506020840135615a4381615656565b9150604084013561592c81615656565b5f805f805f805f60e0888a031215615a69575f80fd5b8735615a7481615656565b96506020880135615a8481615656565b95506040880135945060608801359350615aa060808901615863565b925060a0880135915060c0880135905092959891949750929550565b5f8060408385031215615acd575f80fd5b8235615ad881615656565b915060208301356158af81615656565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ebf57610ebf615afc565b600181811c90821680615b3757607f821691505b602082108103615b5557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610ebf57610ebf615afc565b8082028115828204841417610ebf57610ebf615afc565b5f600160ff1b8201615b9957615b99615afc565b505f0390565b8181035f831280158383131683831282161715613e1257613e12615afc565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156119f657805f5260205f20601f840160051c81016020851015615c1a5750805b601f840160051c820191505b81811015613d94575f8155600101615c26565b815167ffffffffffffffff811115615c5357615c53615be1565b615c6781615c618454615b23565b84615bf5565b602080601f831160018114615c9a575f8415615c835750858301515b5f19600386901b1c1916600185901b178555612844565b5f85815260208120601f198616915b82811015615cc857888601518255948401946001909101908401615ca9565b5085821015615ce557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b03828116828216039080821115613e1257613e12615afc565b5f60208284031215615d43575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215615d7f575f80fd5b505080516020909101519092909150565b5f82615d9e57615d9e615ae8565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615dc557615dc5615ae8565b500490565b5f808354615dd781615b23565b60018281168015615def5760018114615e0457615e30565b60ff1984168752821515830287019450615e30565b875f526020805f205f5b85811015615e275781548a820152908401908201615e0e565b50505082870194505b50929695505050505050565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f615e846017830185615e3c565b7001034b99036b4b9b9b4b733903937b6329607d1b815261190d6011820185615e3c565b634e487b7160e01b5f52603260045260245ffd5b5f81615eca57615eca615afc565b505f19019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204485d3d9d92eeb57ec453d55009460985e73455784e22d97a9959ce3f189d91364736f6c63430008190033", - "devdoc": { - "events": { - "AccumulatorAccrual(uint256)": { - "params": { - "timestamp": "current timestamp." - } - }, - "BackupFeeRateSet(uint256)": { - "params": { - "backupFeeRate": "rate charged to the fixed pools to be accrued by the floating depositors." - } - }, - "Borrow(address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets that were borrowed.", - "borrower": "address which will be repaying the borrowed assets.", - "caller": "address which borrowed the asset.", - "receiver": "address that received the borrowed assets.", - "shares": "amount of borrow shares assigned to the account." - } - }, - "BorrowAtMaturity(uint256,address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of the asset that were borrowed.", - "borrower": "address which will be repaying the borrowed assets.", - "caller": "address which borrowed the asset.", - "fee": "extra amount that will need to be paid at maturity.", - "maturity": "maturity in which the account will have to repay the loan.", - "receiver": "address that received the borrowed assets." - } - }, - "DampSpeedSet(uint256,uint256)": { - "params": { - "dampSpeedDown": "represented with 18 decimals.", - "dampSpeedUp": "represented with 18 decimals." - } - }, - "DepositAtMaturity(uint256,address,address,uint256,uint256)": { - "params": { - "assets": "amount of the asset that were deposited.", - "caller": "address which deposited the assets.", - "fee": "is the extra amount that it will be collected at maturity.", - "maturity": "maturity at which the account will be able to collect his deposit + his fee.", - "owner": "address that will be able to withdraw the deposited assets." - } - }, - "EarningsAccumulatorSmoothFactorSet(uint256)": { - "params": { - "earningsAccumulatorSmoothFactor": "factor represented with 18 decimals." - } - }, - "FixedEarningsUpdate(uint256,uint256,uint256)": { - "params": { - "maturity": "maturity date where the earnings were updated.", - "timestamp": "current timestamp.", - "unassignedEarnings": "pending unassigned earnings." - } - }, - "FloatingDebtUpdate(uint256,uint256)": { - "params": { - "timestamp": "current timestamp.", - "utilization": "new floating utilization." - } - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "InterestRateModelSet(address)": { - "params": { - "interestRateModel": "new interest rate model to be used to calculate rates." - } - }, - "Liquidate(address,address,uint256,uint256,address,uint256)": { - "params": { - "assets": "amount of the asset that were repaid.", - "borrower": "address which had the original debt.", - "lendersAssets": "incentive paid to lenders.", - "receiver": "address which repaid the previously borrowed amount.", - "seizeMarket": "address of the asset that were seized by the liquidator.", - "seizedAssets": "amount seized of the collateral." - } - }, - "MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)": { - "params": { - "earningsAccumulator": "earnings accumulator.", - "floatingAssets": "total floating supply assets.", - "floatingBorrowShares": "total floating borrow shares.", - "floatingDebt": "total floating borrow assets.", - "floatingDepositShares": "total floating supply shares.", - "timestamp": "current timestamp." - } - }, - "MaxFuturePoolsSet(uint256)": { - "params": { - "maxFuturePools": "represented with 0 decimals." - } - }, - "Paused(address)": { - "details": "Emitted when the pause is triggered by `account`." - }, - "PenaltyRateSet(uint256)": { - "params": { - "penaltyRate": "penaltyRate percentage per second represented with 18 decimals." - } - }, - "Repay(address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets that was repaid.", - "borrower": "address which had the original debt.", - "caller": "address which repaid the previously borrowed amount.", - "shares": "amount of borrow shares that were subtracted from the account's accountability." - } - }, - "RepayAtMaturity(uint256,address,address,uint256,uint256)": { - "params": { - "assets": "amount that was repaid.", - "borrower": "address which had the original debt.", - "caller": "address which repaid the previously borrowed amount.", - "maturity": "maturity where the account repaid its borrowed amounts.", - "positionAssets": "amount of the debt that was covered in this repayment (penalties could have been repaid)." - } - }, - "ReserveFactorSet(uint256)": { - "params": { - "reserveFactor": "reserveFactor percentage." - } - }, - "RewardsControllerSet(address)": { - "params": { - "rewardsController": "new rewards controller to update account rewards when operating with the Market." - } - }, - "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`)" - }, - "Seize(address,address,uint256)": { - "params": { - "assets": "amount seized of the collateral.", - "borrower": "address which had the original debt.", - "liquidator": "address which seized this collateral." - } - }, - "SpreadBadDebt(address,uint256)": { - "params": { - "assets": "amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.", - "borrower": "address which was cleared from bad debt." - } - }, - "TreasurySet(address,uint256)": { - "params": { - "treasury": "address of the treasury that will receive the minted eTokens.", - "treasuryFeeRate": "represented with 18 decimals." - } - }, - "Unpaused(address)": { - "details": "Emitted when the pause is lifted by `account`." - }, - "WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)": { - "params": { - "assets": "amount of assets withdrawn (can include a discount for early withdraw).", - "caller": "address which withdraw the asset.", - "maturity": "maturity where the account withdraw its deposits.", - "owner": "address which had the assets withdrawn.", - "positionAssets": "position size reduced.", - "receiver": "address which will be collecting the assets." - } - } - }, - "kind": "dev", - "methods": { - "accountSnapshot(address)": { - "params": { - "account": "account to return status snapshot in the specified maturity date." - }, - "returns": { - "_0": "the amount deposited to the floating pool and the amount owed to floating and fixed pools." - } - }, - "borrow(uint256,address,address)": { - "params": { - "assets": "amount to be sent to receiver and repaid by borrower.", - "borrower": "address that will repay the borrowed assets.", - "receiver": "address that will receive the borrowed assets." - }, - "returns": { - "borrowShares": "shares corresponding to the borrowed assets." - } - }, - "borrowAtMaturity(uint256,uint256,uint256,address,address)": { - "params": { - "assets": "amount to be sent to receiver and repaid by borrower.", - "borrower": "address that will repay the borrowed assets.", - "maturity": "maturity date for repayment.", - "maxAssets": "maximum amount of debt that the account is willing to accept.", - "receiver": "address that will receive the borrowed assets." - }, - "returns": { - "assetsOwed": "total amount of assets (principal + fee) to be repaid at maturity." - } - }, - "clearBadDebt(address)": { - "details": "Can only be called from the auditor.", - "params": { - "borrower": "account with insufficient collateral to be cleared the debt." - } - }, - "constructor": { - "custom:oz-upgrades-unsafe-allow": "constructor" - }, - "depositAtMaturity(uint256,uint256,uint256,address)": { - "params": { - "assets": "amount to receive from the msg.sender.", - "maturity": "maturity date where the assets will be deposited.", - "minAssetsRequired": "minimum amount of assets required by the depositor for the transaction to be accepted.", - "receiver": "address that will be able to withdraw the deposited assets." - }, - "returns": { - "positionAssets": "total amount of assets (principal + fee) to be withdrawn at maturity." - } - }, - "fixedPoolBalance(uint256)": { - "params": { - "maturity": "maturity date of the fixed pool." - }, - "returns": { - "_0": "borrowed and supplied amount of the fixed pool." - } - }, - "fixedPoolBorrowed(uint256)": { - "params": { - "maturity": "maturity date of the fixed pool." - }, - "returns": { - "_0": "borrowed amount of the fixed pool." - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)": { - "details": "can only be called once." - }, - "liquidate(address,uint256,address)": { - "details": "Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.", - "params": { - "borrower": "account that has an outstanding debt across floating or fixed pools.", - "maxAssets": "maximum amount of debt that the liquidator is willing to accept. (it can be less)", - "seizeMarket": "market from which the collateral will be seized to give to the liquidator." - }, - "returns": { - "repaidAssets": "actual amount repaid." - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "previewBorrow(uint256)": { - "params": { - "assets": "amount of assets to borrow." - }, - "returns": { - "_0": "amount of shares that will be asigned to the account after the borrow." - } - }, - "previewDebt(address)": { - "params": { - "borrower": "account to return status snapshot for fixed and floating borrows." - }, - "returns": { - "debt": "the total debt, denominated in number of assets." - } - }, - "previewFloatingAssetsAverage()": { - "returns": { - "_0": "projected `floatingAssetsAverage`." - } - }, - "previewRefund(uint256)": { - "params": { - "shares": "amount of shares to subtract from caller's accountability." - }, - "returns": { - "_0": "amount of assets that will be repaid." - } - }, - "previewRepay(uint256)": { - "params": { - "assets": "amount of assets to repay." - }, - "returns": { - "_0": "amount of shares that will be subtracted from the account after the repay." - } - }, - "redeem(uint256,address,address)": { - "details": "Makes sure that the owner doesn't have shortfall after withdrawing.", - "params": { - "owner": "address which owns the floating pool assets.", - "receiver": "address to which the assets will be transferred.", - "shares": "amount of shares to be redeemed for underlying asset." - }, - "returns": { - "assets": "amount of underlying asset that was withdrawn." - } - }, - "refund(uint256,address)": { - "params": { - "borrowShares": "shares to be subtracted from the borrower's accountability.", - "borrower": "address of the account that has the debt." - }, - "returns": { - "actualShares": "actual subtracted shares from the borrower's accountability.", - "assets": "subtracted assets from the borrower's accountability." - } - }, - "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." - }, - "repay(uint256,address)": { - "params": { - "assets": "assets to be subtracted from the borrower's accountability.", - "borrower": "address of the account that has the debt." - }, - "returns": { - "actualRepay": "the actual amount that should be transferred into the protocol.", - "borrowShares": "subtracted shares from the borrower's accountability." - } - }, - "repayAtMaturity(uint256,uint256,uint256,address)": { - "params": { - "borrower": "address of the account that has the debt.", - "maturity": "maturity date where the assets will be repaid.", - "maxAssets": "maximum amount of debt that the account is willing to accept to be repaid.", - "positionAssets": "amount to be paid for the borrower's debt." - }, - "returns": { - "actualRepayAssets": "the actual amount that was transferred into the protocol." - } - }, - "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." - }, - "seize(address,address,uint256)": { - "details": "Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).", - "params": { - "assets": "amount to be removed from borrower's possession.", - "borrower": "address from which the assets will be seized.", - "liquidator": "address which will receive the seized assets." - } - }, - "setAssetSymbol(string)": { - "params": { - "assetSymbol": "the symbol for the underlying asset." - } - }, - "setBackupFeeRate(uint256)": { - "params": { - "backupFeeRate_": "percentage amount represented with 18 decimals." - } - }, - "setDampSpeed(uint256,uint256)": { - "params": { - "down": "damp speed down, represented with 18 decimals.", - "up": "damp speed up, represented with 18 decimals." - } - }, - "setEarningsAccumulatorSmoothFactor(uint128)": { - "params": { - "earningsAccumulatorSmoothFactor_": "represented with 18 decimals." - } - }, - "setInterestRateModel(address)": { - "params": { - "interestRateModel_": "new interest rate model." - } - }, - "setMaxFuturePools(uint8)": { - "details": "If value is decreased, VALID maturities will become NOT_READY.", - "params": { - "futurePools": "number of pools to be active at the same time." - } - }, - "setPenaltyRate(uint256)": { - "params": { - "penaltyRate_": "percentage represented with 18 decimals." - } - }, - "setReserveFactor(uint128)": { - "params": { - "reserveFactor_": "parameter represented with 18 decimals." - } - }, - "setRewardsController(address)": { - "params": { - "rewardsController_": "new rewards controller." - } - }, - "setTreasury(address,uint256)": { - "params": { - "treasuryFeeRate_": "represented with 18 decimals.", - "treasury_": "address of the treasury that will receive the minted eTokens." - } - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "totalAssets()": { - "returns": { - "_0": "actual floatingAssets plus earnings to be accrued at current timestamp." - } - }, - "totalFloatingBorrowAssets()": { - "returns": { - "_0": "actual floating debt plus projected interest." - } - }, - "transfer(address,uint256)": { - "details": "Makes sure that the caller doesn't have shortfall after transferring.", - "params": { - "shares": "amount of shares to be transferred.", - "to": "address to which the assets will be transferred." - } - }, - "transferFrom(address,address,uint256)": { - "details": "Makes sure that `from` address doesn't have shortfall after transferring.", - "params": { - "from": "address from which the assets will be transferred.", - "shares": "amount of shares to be transferred.", - "to": "address to which the assets will be transferred." - } - }, - "withdraw(uint256,address,address)": { - "details": "Makes sure that the owner doesn't have shortfall after withdrawing.", - "params": { - "assets": "amount of underlying to be withdrawn.", - "owner": "address which owns the floating pool assets.", - "receiver": "address to which the assets will be transferred." - }, - "returns": { - "shares": "amount of shares redeemed for underlying asset." - } - }, - "withdrawAtMaturity(uint256,uint256,uint256,address,address)": { - "params": { - "maturity": "maturity date where the assets will be withdrawn.", - "minAssetsRequired": "minimum amount required by the account (if discount included for early withdrawal).", - "owner": "address that previously deposited the assets.", - "positionAssets": "position size to be reduced.", - "receiver": "address that will receive the withdrawn assets." - }, - "returns": { - "assetsDiscounted": "amount of assets withdrawn (can include a discount for early withdraw)." - } - } - }, - "stateVariables": { - "__gap": { - "custom:oz-renamed-from": "floatingUtilization", - "details": "gap from deprecated state." - }, - "auditor": { - "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" - } - }, - "version": 1 - }, - "userdoc": { - "events": { - "AccumulatorAccrual(uint256)": { - "notice": "Emitted when accumulator distributes earnings." - }, - "BackupFeeRateSet(uint256)": { - "notice": "Emitted when the backupFeeRate parameter is changed by admin." - }, - "Borrow(address,address,address,uint256,uint256)": { - "notice": "Event emitted when an account borrows amount of assets from a floating pool." - }, - "BorrowAtMaturity(uint256,address,address,address,uint256,uint256)": { - "notice": "Emitted when an account borrows amount of an asset from a certain maturity date." - }, - "DampSpeedSet(uint256,uint256)": { - "notice": "Emitted when the damp speeds are changed by admin." - }, - "DepositAtMaturity(uint256,address,address,uint256,uint256)": { - "notice": "Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period." - }, - "EarningsAccumulatorSmoothFactorSet(uint256)": { - "notice": "Emitted when the earningsAccumulatorSmoothFactor is changed by admin." - }, - "FixedEarningsUpdate(uint256,uint256,uint256)": { - "notice": "Emitted when the earnings of a maturity are updated." - }, - "FloatingDebtUpdate(uint256,uint256)": { - "notice": "Emitted when the floating debt is updated." - }, - "Frozen(address,bool)": { - "notice": "Emitted when `account` sets the `isFrozen` flag." - }, - "InterestRateModelSet(address)": { - "notice": "Emitted when the interestRateModel is changed by admin." - }, - "Liquidate(address,address,uint256,uint256,address,uint256)": { - "notice": "Emitted when an account's position had a liquidation." - }, - "MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)": { - "notice": "Emitted when market state is updated." - }, - "MaxFuturePoolsSet(uint256)": { - "notice": "Emitted when the maxFuturePools is changed by admin." - }, - "PenaltyRateSet(uint256)": { - "notice": "Emitted when the penaltyRate is changed by admin." - }, - "Repay(address,address,uint256,uint256)": { - "notice": "Emitted when an account repays amount of assets to a floating pool." - }, - "RepayAtMaturity(uint256,address,address,uint256,uint256)": { - "notice": "Emitted when an account repays its borrows after maturity." - }, - "ReserveFactorSet(uint256)": { - "notice": "Emitted when the reserveFactor is changed by admin." - }, - "RewardsControllerSet(address)": { - "notice": "Emitted when the rewardsController is changed by admin." - }, - "Seize(address,address,uint256)": { - "notice": "Emitted when an account's collateral has been seized." - }, - "SpreadBadDebt(address,uint256)": { - "notice": "Emitted when an account is cleared from bad debt." - }, - "TreasurySet(address,uint256)": { - "notice": "Emitted when the treasury variables are changed by admin." - }, - "WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)": { - "notice": "Emitted when an account withdraws from a fixed rate pool." - } - }, - "kind": "user", - "methods": { - "accountSnapshot(address)": { - "notice": "Gets current snapshot for an account across all maturities." - }, - "accounts(address)": { - "notice": "Tracks fixed deposit and borrow map and floating borrow shares of an account." - }, - "backupFeeRate()": { - "notice": "Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity." - }, - "borrow(uint256,address,address)": { - "notice": "Borrows a certain amount from the floating pool." - }, - "borrowAtMaturity(uint256,uint256,uint256,address,address)": { - "notice": "Borrows a certain amount from a maturity." - }, - "clearBadDebt(address)": { - "notice": "Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`." - }, - "dampSpeedDown()": { - "notice": "Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower." - }, - "dampSpeedUp()": { - "notice": "Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher." - }, - "depositAtMaturity(uint256,uint256,uint256,address)": { - "notice": "Deposits a certain amount to a maturity." - }, - "earningsAccumulator()": { - "notice": "Accumulated earnings from extraordinary sources to be gradually distributed." - }, - "earningsAccumulatorSmoothFactor()": { - "notice": "Factor used for gradual accrual of earnings to the floating pool." - }, - "fixedBorrowPositions(uint256,address)": { - "notice": "Tracks account's fixed borrow positions by maturity, account and position." - }, - "fixedDepositPositions(uint256,address)": { - "notice": "Tracks account's fixed deposit positions by maturity, account and position." - }, - "fixedPoolBalance(uint256)": { - "notice": "Retrieves a fixed pool's borrowed and supplied amount." - }, - "fixedPoolBorrowed(uint256)": { - "notice": "Retrieves a fixed pool's borrowed amount." - }, - "fixedPools(uint256)": { - "notice": "Tracks fixed pools state by maturity." - }, - "floatingAssets()": { - "notice": "Amount of floating assets deposited to the pool." - }, - "floatingAssetsAverage()": { - "notice": "Average of the floating assets to get fixed borrow rates and prevent rate manipulation." - }, - "floatingBackupBorrowed()": { - "notice": "Amount of assets lent by the floating pool to the fixed pools." - }, - "floatingDebt()": { - "notice": "Amount of assets lent by the floating pool to accounts." - }, - "initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)": { - "notice": "Initializes the contract." - }, - "interestRateModel()": { - "notice": "Interest rate model contract used to get the borrow rates." - }, - "isFrozen()": { - "notice": "Flag to prevent new borrows and deposits." - }, - "lastAccumulatorAccrual()": { - "notice": "Last time the accumulator distributed earnings." - }, - "lastAverageUpdate()": { - "notice": "Last time the floating assets average was updated." - }, - "lastFloatingDebtUpdate()": { - "notice": "Last time the floating debt was updated." - }, - "liquidate(address,uint256,address)": { - "notice": "Liquidates undercollateralized fixed/floating (or both) position(s)." - }, - "maxFuturePools()": { - "notice": "Number of fixed pools to be active at the same time." - }, - "pause()": { - "notice": "Sets the pause state to true in case of emergency, triggered by an authorized account." - }, - "penaltyRate()": { - "notice": "Rate per second to be charged to delayed fixed pools borrowers after maturity." - }, - "previewBorrow(uint256)": { - "notice": "Simulates the effects of a borrow at the current time, given current contract conditions." - }, - "previewDebt(address)": { - "notice": "Gets all borrows and penalties for an account." - }, - "previewFloatingAssetsAverage()": { - "notice": "Returns the current `floatingAssetsAverage` without updating the storage variable." - }, - "previewRefund(uint256)": { - "notice": "Simulates the effects of a refund at the current time, given current contract conditions." - }, - "previewRepay(uint256)": { - "notice": "Simulates the effects of a repay at the current time, given current contract conditions." - }, - "redeem(uint256,address,address)": { - "notice": "Redeems the owner's floating pool assets to the receiver address." - }, - "refund(uint256,address)": { - "notice": "Repays a certain amount of shares to the floating pool." - }, - "repay(uint256,address)": { - "notice": "Repays a certain amount of assets to the floating pool." - }, - "repayAtMaturity(uint256,uint256,uint256,address)": { - "notice": "Repays a certain amount to a maturity." - }, - "reserveFactor()": { - "notice": "Percentage factor that represents the liquidity reserves that can't be borrowed." - }, - "rewardsController()": { - "notice": "Address of the rewards controller that will accrue rewards for accounts operating with the Market." - }, - "seize(address,address,uint256)": { - "notice": "Public function to seize a certain amount of assets." - }, - "setAssetSymbol(string)": { - "notice": "Sets name and symbol for the Market." - }, - "setBackupFeeRate(uint256)": { - "notice": "Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity." - }, - "setDampSpeed(uint256,uint256)": { - "notice": "Sets the damp speed used to update the floatingAssetsAverage." - }, - "setEarningsAccumulatorSmoothFactor(uint128)": { - "notice": "Sets the factor used when smoothly accruing earnings to the floating pool." - }, - "setFrozen(bool)": { - "notice": "Sets `isFrozen` state, triggered by an authorized account." - }, - "setInterestRateModel(address)": { - "notice": "Sets the interest rate model to be used to calculate rates." - }, - "setMaxFuturePools(uint8)": { - "notice": "Sets the protocol's max future pools for fixed borrowing and lending." - }, - "setPenaltyRate(uint256)": { - "notice": "Sets the penalty rate per second." - }, - "setReserveFactor(uint128)": { - "notice": "Sets the percentage that represents the liquidity reserves that can't be borrowed." - }, - "setRewardsController(address)": { - "notice": "Sets the rewards controller to update account rewards when operating with the Market." - }, - "setTreasury(address,uint256)": { - "notice": "Sets the treasury variables." - }, - "totalAssets()": { - "notice": "Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator." - }, - "totalFloatingBorrowAssets()": { - "notice": "Calculates the total floating debt, considering elapsed time since last update and current interest rate." - }, - "totalFloatingBorrowShares()": { - "notice": "Total amount of floating borrow shares assigned to floating borrow accounts." - }, - "transfer(address,uint256)": { - "notice": "Moves amount of shares from the caller's account to `to`." - }, - "transferFrom(address,address,uint256)": { - "notice": "Moves amount of shares from `from` to `to` using the allowance mechanism." - }, - "treasury()": { - "notice": "Address of the treasury that will receive the allocated earnings." - }, - "treasuryFeeRate()": { - "notice": "Rate to be charged by the treasury to floating and fixed borrows." - }, - "unpause()": { - "notice": "Sets the pause state to false when threat is gone, triggered by an authorized account." - }, - "withdraw(uint256,address,address)": { - "notice": "Withdraws the owner's floating pool assets to the receiver address." - }, - "withdrawAtMaturity(uint256,uint256,uint256,address,address)": { - "notice": "Withdraws a certain amount from a maturity." - } - }, - "version": 1 - }, + "numDeployments": 5, + "solcInputHash": "6e57950826dfd6055f8dc377807ae48e", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"contract Auditor\",\"name\":\"auditor_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Disagreement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientProtocolLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketFrozen\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaturityOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAuditor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPausingRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SelfLiquidation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolState\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"requiredState\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"alternativeState\",\"type\":\"uint8\"}],\"name\":\"UnmatchedPoolStates\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBorrow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRepay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroWithdraw\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AccumulatorAccrual\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"backupFeeRate\",\"type\":\"uint256\"}],\"name\":\"BackupFeeRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"BorrowAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedUp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dampSpeedDown\",\"type\":\"uint256\"}],\"name\":\"DampSpeedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"DepositAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulatorSmoothFactor\",\"type\":\"uint256\"}],\"name\":\"EarningsAccumulatorSmoothFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"}],\"name\":\"FixedEarningsUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilization\",\"type\":\"uint256\"}],\"name\":\"FloatingDebtUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isFrozen\",\"type\":\"bool\"}],\"name\":\"Frozen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel\",\"type\":\"address\"}],\"name\":\"InterestRateModelSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lendersAssets\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizedAssets\",\"type\":\"uint256\"}],\"name\":\"Liquidate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDepositShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"floatingDebt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"earningsAccumulator\",\"type\":\"uint256\"}],\"name\":\"MarketUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxFuturePools\",\"type\":\"uint256\"}],\"name\":\"MaxFuturePoolsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyRate\",\"type\":\"uint256\"}],\"name\":\"PenaltyRateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Repay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"name\":\"RepayAtMaturity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reserveFactor\",\"type\":\"uint256\"}],\"name\":\"ReserveFactorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController\",\"type\":\"address\"}],\"name\":\"RewardsControllerSet\",\"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\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"SpreadBadDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate\",\"type\":\"uint256\"}],\"name\":\"TreasurySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"WithdrawAtMaturity\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EMERGENCY_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"accountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fixedDeposits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fixedBorrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"floatingBorrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auditor\",\"outputs\":[{\"internalType\":\"contract Auditor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"backupFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"borrowAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsOwed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"clearBadDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dampSpeedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"depositAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"earningsAccumulatorSmoothFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedBorrowPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"fixedDepositPositions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"}],\"name\":\"fixedPoolBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"fixedPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplied\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unassignedEarnings\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastAccrual\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingBackupBorrowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"floatingDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"maxFuturePools_\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedUp_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dampSpeedDown_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAccumulatorAccrual\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAverageUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFloatingDebtUpdate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"seizeMarket\",\"type\":\"address\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxFuturePools\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"previewDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"debt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewFloatingAssetsAverage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRefund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewRepay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepay\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxAssets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repayAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualRepayAssets\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveFactor\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsController\",\"outputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"assetSymbol\",\"type\":\"string\"}],\"name\":\"setAssetSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"backupFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setBackupFeeRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"up\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"down\",\"type\":\"uint256\"}],\"name\":\"setDampSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"earningsAccumulatorSmoothFactor_\",\"type\":\"uint128\"}],\"name\":\"setEarningsAccumulatorSmoothFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isFrozen_\",\"type\":\"bool\"}],\"name\":\"setFrozen\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"futurePools\",\"type\":\"uint8\"}],\"name\":\"setMaxFuturePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyRate_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"reserveFactor_\",\"type\":\"uint128\"}],\"name\":\"setReserveFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsController\",\"name\":\"rewardsController_\",\"type\":\"address\"}],\"name\":\"setRewardsController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"treasuryFeeRate_\",\"type\":\"uint256\"}],\"name\":\"setTreasury\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFloatingBorrowShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasuryFeeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maturity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionAssets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAssetsRequired\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawAtMaturity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assetsDiscounted\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\"}},\"BackupFeeRateSet(uint256)\":{\"params\":{\"backupFeeRate\":\"rate charged to the fixed pools to be accrued by the floating depositors.\"}},\"Borrow(address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"receiver\":\"address that received the borrowed assets.\",\"shares\":\"amount of borrow shares assigned to the account.\"}},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were borrowed.\",\"borrower\":\"address which will be repaying the borrowed assets.\",\"caller\":\"address which borrowed the asset.\",\"fee\":\"extra amount that will need to be paid at maturity.\",\"maturity\":\"maturity in which the account will have to repay the loan.\",\"receiver\":\"address that received the borrowed assets.\"}},\"DampSpeedSet(uint256,uint256)\":{\"params\":{\"dampSpeedDown\":\"represented with 18 decimals.\",\"dampSpeedUp\":\"represented with 18 decimals.\"}},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were deposited.\",\"caller\":\"address which deposited the assets.\",\"fee\":\"is the extra amount that it will be collected at maturity.\",\"maturity\":\"maturity at which the account will be able to collect his deposit + his fee.\",\"owner\":\"address that will be able to withdraw the deposited assets.\"}},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"params\":{\"earningsAccumulatorSmoothFactor\":\"factor represented with 18 decimals.\"}},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"params\":{\"maturity\":\"maturity date where the earnings were updated.\",\"timestamp\":\"current timestamp.\",\"unassignedEarnings\":\"pending unassigned earnings.\"}},\"FloatingDebtUpdate(uint256,uint256)\":{\"params\":{\"timestamp\":\"current timestamp.\",\"utilization\":\"new floating utilization.\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"InterestRateModelSet(address)\":{\"params\":{\"interestRateModel\":\"new interest rate model to be used to calculate rates.\"}},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"params\":{\"assets\":\"amount of the asset that were repaid.\",\"borrower\":\"address which had the original debt.\",\"lendersAssets\":\"incentive paid to lenders.\",\"receiver\":\"address which repaid the previously borrowed amount.\",\"seizeMarket\":\"address of the asset that were seized by the liquidator.\",\"seizedAssets\":\"amount seized of the collateral.\"}},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"earningsAccumulator\":\"earnings accumulator.\",\"floatingAssets\":\"total floating supply assets.\",\"floatingBorrowShares\":\"total floating borrow shares.\",\"floatingDebt\":\"total floating borrow assets.\",\"floatingDepositShares\":\"total floating supply shares.\",\"timestamp\":\"current timestamp.\"}},\"MaxFuturePoolsSet(uint256)\":{\"params\":{\"maxFuturePools\":\"represented with 0 decimals.\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PenaltyRateSet(uint256)\":{\"params\":{\"penaltyRate\":\"penaltyRate percentage per second represented with 18 decimals.\"}},\"Repay(address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"shares\":\"amount of borrow shares that were subtracted from the account's accountability.\"}},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount that was repaid.\",\"borrower\":\"address which had the original debt.\",\"caller\":\"address which repaid the previously borrowed amount.\",\"maturity\":\"maturity where the account repaid its borrowed amounts.\",\"positionAssets\":\"amount of the debt that was covered in this repayment (penalties could have been repaid).\"}},\"ReserveFactorSet(uint256)\":{\"params\":{\"reserveFactor\":\"reserveFactor percentage.\"}},\"RewardsControllerSet(address)\":{\"params\":{\"rewardsController\":\"new rewards controller to update account rewards when operating with the Market.\"}},\"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`)\"},\"Seize(address,address,uint256)\":{\"params\":{\"assets\":\"amount seized of the collateral.\",\"borrower\":\"address which had the original debt.\",\"liquidator\":\"address which seized this collateral.\"}},\"SpreadBadDebt(address,uint256)\":{\"params\":{\"assets\":\"amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\",\"borrower\":\"address which was cleared from bad debt.\"}},\"TreasurySet(address,uint256)\":{\"params\":{\"treasury\":\"address of the treasury that will receive the minted eTokens.\",\"treasuryFeeRate\":\"represented with 18 decimals.\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"params\":{\"assets\":\"amount of assets withdrawn (can include a discount for early withdraw).\",\"caller\":\"address which withdraw the asset.\",\"maturity\":\"maturity where the account withdraw its deposits.\",\"owner\":\"address which had the assets withdrawn.\",\"positionAssets\":\"position size reduced.\",\"receiver\":\"address which will be collecting the assets.\"}}},\"kind\":\"dev\",\"methods\":{\"accountSnapshot(address)\":{\"params\":{\"account\":\"account to return status snapshot in the specified maturity date.\"},\"returns\":{\"_0\":\"the amount deposited to the floating pool and the amount owed to floating and fixed pools.\"}},\"borrow(uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"borrowShares\":\"shares corresponding to the borrowed assets.\"}},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"assets\":\"amount to be sent to receiver and repaid by borrower.\",\"borrower\":\"address that will repay the borrowed assets.\",\"maturity\":\"maturity date for repayment.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept.\",\"receiver\":\"address that will receive the borrowed assets.\"},\"returns\":{\"assetsOwed\":\"total amount of assets (principal + fee) to be repaid at maturity.\"}},\"clearBadDebt(address)\":{\"details\":\"Can only be called from the auditor.\",\"params\":{\"borrower\":\"account with insufficient collateral to be cleared the debt.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"assets\":\"amount to receive from the msg.sender.\",\"maturity\":\"maturity date where the assets will be deposited.\",\"minAssetsRequired\":\"minimum amount of assets required by the depositor for the transaction to be accepted.\",\"receiver\":\"address that will be able to withdraw the deposited assets.\"},\"returns\":{\"positionAssets\":\"total amount of assets (principal + fee) to be withdrawn at maturity.\"}},\"fixedPoolBalance(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed and supplied amount of the fixed pool.\"}},\"fixedPoolBorrowed(uint256)\":{\"params\":{\"maturity\":\"maturity date of the fixed pool.\"},\"returns\":{\"_0\":\"borrowed amount of the fixed pool.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"details\":\"can only be called once.\"},\"liquidate(address,uint256,address)\":{\"details\":\"Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool, or/and for multiple fixed pools, seizing a portion of borrower's collateral.\",\"params\":{\"borrower\":\"account that has an outstanding debt across floating or fixed pools.\",\"maxAssets\":\"maximum amount of debt that the liquidator is willing to accept. (it can be less)\",\"seizeMarket\":\"market from which the collateral will be seized to give to the liquidator.\"},\"returns\":{\"repaidAssets\":\"actual amount repaid.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"previewBorrow(uint256)\":{\"params\":{\"assets\":\"amount of assets to borrow.\"},\"returns\":{\"_0\":\"amount of shares that will be asigned to the account after the borrow.\"}},\"previewDebt(address)\":{\"params\":{\"borrower\":\"account to return status snapshot for fixed and floating borrows.\"},\"returns\":{\"debt\":\"the total debt, denominated in number of assets.\"}},\"previewFloatingAssetsAverage()\":{\"returns\":{\"_0\":\"projected `floatingAssetsAverage`.\"}},\"previewRefund(uint256)\":{\"params\":{\"shares\":\"amount of shares to subtract from caller's accountability.\"},\"returns\":{\"_0\":\"amount of assets that will be repaid.\"}},\"previewRepay(uint256)\":{\"params\":{\"assets\":\"amount of assets to repay.\"},\"returns\":{\"_0\":\"amount of shares that will be subtracted from the account after the repay.\"}},\"redeem(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\",\"shares\":\"amount of shares to be redeemed for underlying asset.\"},\"returns\":{\"assets\":\"amount of underlying asset that was withdrawn.\"}},\"refund(uint256,address)\":{\"params\":{\"borrowShares\":\"shares to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualShares\":\"actual subtracted shares from the borrower's accountability.\",\"assets\":\"subtracted assets from the borrower's accountability.\"}},\"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.\"},\"repay(uint256,address)\":{\"params\":{\"assets\":\"assets to be subtracted from the borrower's accountability.\",\"borrower\":\"address of the account that has the debt.\"},\"returns\":{\"actualRepay\":\"the actual amount that should be transferred into the protocol.\",\"borrowShares\":\"subtracted shares from the borrower's accountability.\"}},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"params\":{\"borrower\":\"address of the account that has the debt.\",\"maturity\":\"maturity date where the assets will be repaid.\",\"maxAssets\":\"maximum amount of debt that the account is willing to accept to be repaid.\",\"positionAssets\":\"amount to be paid for the borrower's debt.\"},\"returns\":{\"actualRepayAssets\":\"the actual amount that was transferred into the protocol.\"}},\"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.\"},\"seize(address,address,uint256)\":{\"details\":\"Public function for liquidator to seize borrowers assets in the floating pool. This function will only be called from another Market, on `liquidation` calls. That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\",\"params\":{\"assets\":\"amount to be removed from borrower's possession.\",\"borrower\":\"address from which the assets will be seized.\",\"liquidator\":\"address which will receive the seized assets.\"}},\"setAssetSymbol(string)\":{\"params\":{\"assetSymbol\":\"the symbol for the underlying asset.\"}},\"setBackupFeeRate(uint256)\":{\"params\":{\"backupFeeRate_\":\"percentage amount represented with 18 decimals.\"}},\"setDampSpeed(uint256,uint256)\":{\"params\":{\"down\":\"damp speed down, represented with 18 decimals.\",\"up\":\"damp speed up, represented with 18 decimals.\"}},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"params\":{\"earningsAccumulatorSmoothFactor_\":\"represented with 18 decimals.\"}},\"setInterestRateModel(address)\":{\"params\":{\"interestRateModel_\":\"new interest rate model.\"}},\"setMaxFuturePools(uint8)\":{\"details\":\"If value is decreased, VALID maturities will become NOT_READY.\",\"params\":{\"futurePools\":\"number of pools to be active at the same time.\"}},\"setPenaltyRate(uint256)\":{\"params\":{\"penaltyRate_\":\"percentage represented with 18 decimals.\"}},\"setReserveFactor(uint128)\":{\"params\":{\"reserveFactor_\":\"parameter represented with 18 decimals.\"}},\"setRewardsController(address)\":{\"params\":{\"rewardsController_\":\"new rewards controller.\"}},\"setTreasury(address,uint256)\":{\"params\":{\"treasuryFeeRate_\":\"represented with 18 decimals.\",\"treasury_\":\"address of the treasury that will receive the minted eTokens.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalAssets()\":{\"returns\":{\"_0\":\"actual floatingAssets plus earnings to be accrued at current timestamp.\"}},\"totalFloatingBorrowAssets()\":{\"returns\":{\"_0\":\"actual floating debt plus projected interest.\"}},\"transfer(address,uint256)\":{\"details\":\"Makes sure that the caller doesn't have shortfall after transferring.\",\"params\":{\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Makes sure that `from` address doesn't have shortfall after transferring.\",\"params\":{\"from\":\"address from which the assets will be transferred.\",\"shares\":\"amount of shares to be transferred.\",\"to\":\"address to which the assets will be transferred.\"}},\"withdraw(uint256,address,address)\":{\"details\":\"Makes sure that the owner doesn't have shortfall after withdrawing.\",\"params\":{\"assets\":\"amount of underlying to be withdrawn.\",\"owner\":\"address which owns the floating pool assets.\",\"receiver\":\"address to which the assets will be transferred.\"},\"returns\":{\"shares\":\"amount of shares redeemed for underlying asset.\"}},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"params\":{\"maturity\":\"maturity date where the assets will be withdrawn.\",\"minAssetsRequired\":\"minimum amount required by the account (if discount included for early withdrawal).\",\"owner\":\"address that previously deposited the assets.\",\"positionAssets\":\"position size to be reduced.\",\"receiver\":\"address that will receive the withdrawn assets.\"},\"returns\":{\"assetsDiscounted\":\"amount of assets withdrawn (can include a discount for early withdraw).\"}}},\"stateVariables\":{\"__gap\":{\"custom:oz-renamed-from\":\"floatingUtilization\",\"details\":\"gap from deprecated state.\"},\"auditor\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"events\":{\"AccumulatorAccrual(uint256)\":{\"notice\":\"Emitted when accumulator distributes earnings.\"},\"BackupFeeRateSet(uint256)\":{\"notice\":\"Emitted when the backupFeeRate parameter is changed by admin.\"},\"Borrow(address,address,address,uint256,uint256)\":{\"notice\":\"Event emitted when an account borrows amount of assets from a floating pool.\"},\"BorrowAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account borrows amount of an asset from a certain maturity date.\"},\"DampSpeedSet(uint256,uint256)\":{\"notice\":\"Emitted when the damp speeds are changed by admin.\"},\"DepositAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account deposits an amount of an asset to a certain fixed rate pool, collecting fees at the end of the period.\"},\"EarningsAccumulatorSmoothFactorSet(uint256)\":{\"notice\":\"Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\"},\"FixedEarningsUpdate(uint256,uint256,uint256)\":{\"notice\":\"Emitted when the earnings of a maturity are updated.\"},\"FloatingDebtUpdate(uint256,uint256)\":{\"notice\":\"Emitted when the floating debt is updated.\"},\"Frozen(address,bool)\":{\"notice\":\"Emitted when `account` sets the `isFrozen` flag.\"},\"InterestRateModelSet(address)\":{\"notice\":\"Emitted when the interestRateModel is changed by admin.\"},\"Liquidate(address,address,uint256,uint256,address,uint256)\":{\"notice\":\"Emitted when an account's position had a liquidation.\"},\"MarketUpdate(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when market state is updated.\"},\"MaxFuturePoolsSet(uint256)\":{\"notice\":\"Emitted when the maxFuturePools is changed by admin.\"},\"PenaltyRateSet(uint256)\":{\"notice\":\"Emitted when the penaltyRate is changed by admin.\"},\"Repay(address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays amount of assets to a floating pool.\"},\"RepayAtMaturity(uint256,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account repays its borrows after maturity.\"},\"ReserveFactorSet(uint256)\":{\"notice\":\"Emitted when the reserveFactor is changed by admin.\"},\"RewardsControllerSet(address)\":{\"notice\":\"Emitted when the rewardsController is changed by admin.\"},\"Seize(address,address,uint256)\":{\"notice\":\"Emitted when an account's collateral has been seized.\"},\"SpreadBadDebt(address,uint256)\":{\"notice\":\"Emitted when an account is cleared from bad debt.\"},\"TreasurySet(address,uint256)\":{\"notice\":\"Emitted when the treasury variables are changed by admin.\"},\"WithdrawAtMaturity(uint256,address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when an account withdraws from a fixed rate pool.\"}},\"kind\":\"user\",\"methods\":{\"accountSnapshot(address)\":{\"notice\":\"Gets current snapshot for an account across all maturities.\"},\"accounts(address)\":{\"notice\":\"Tracks fixed deposit and borrow map and floating borrow shares of an account.\"},\"backupFeeRate()\":{\"notice\":\"Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\"},\"borrow(uint256,address,address)\":{\"notice\":\"Borrows a certain amount from the floating pool.\"},\"borrowAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Borrows a certain amount from a maturity.\"},\"clearBadDebt(address)\":{\"notice\":\"Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\"},\"dampSpeedDown()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\"},\"dampSpeedUp()\":{\"notice\":\"Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\"},\"depositAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Deposits a certain amount to a maturity.\"},\"earningsAccumulator()\":{\"notice\":\"Accumulated earnings from extraordinary sources to be gradually distributed.\"},\"earningsAccumulatorSmoothFactor()\":{\"notice\":\"Factor used for gradual accrual of earnings to the floating pool.\"},\"fixedBorrowPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed borrow positions by maturity, account and position.\"},\"fixedDepositPositions(uint256,address)\":{\"notice\":\"Tracks account's fixed deposit positions by maturity, account and position.\"},\"fixedPoolBalance(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed and supplied amount.\"},\"fixedPoolBorrowed(uint256)\":{\"notice\":\"Retrieves a fixed pool's borrowed amount.\"},\"fixedPools(uint256)\":{\"notice\":\"Tracks fixed pools state by maturity.\"},\"floatingAssets()\":{\"notice\":\"Amount of floating assets deposited to the pool.\"},\"floatingAssetsAverage()\":{\"notice\":\"Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\"},\"floatingBackupBorrowed()\":{\"notice\":\"Amount of assets lent by the floating pool to the fixed pools.\"},\"floatingDebt()\":{\"notice\":\"Amount of assets lent by the floating pool to accounts.\"},\"initialize(string,uint8,uint128,address,uint256,uint256,uint128,uint256,uint256)\":{\"notice\":\"Initializes the contract.\"},\"interestRateModel()\":{\"notice\":\"Interest rate model contract used to get the borrow rates.\"},\"isFrozen()\":{\"notice\":\"Flag to prevent new borrows and deposits.\"},\"lastAccumulatorAccrual()\":{\"notice\":\"Last time the accumulator distributed earnings.\"},\"lastAverageUpdate()\":{\"notice\":\"Last time the floating assets average was updated.\"},\"lastFloatingDebtUpdate()\":{\"notice\":\"Last time the floating debt was updated.\"},\"liquidate(address,uint256,address)\":{\"notice\":\"Liquidates undercollateralized fixed/floating (or both) position(s).\"},\"maxFuturePools()\":{\"notice\":\"Number of fixed pools to be active at the same time.\"},\"pause()\":{\"notice\":\"Sets the pause state to true in case of emergency, triggered by an authorized account.\"},\"penaltyRate()\":{\"notice\":\"Rate per second to be charged to delayed fixed pools borrowers after maturity.\"},\"previewBorrow(uint256)\":{\"notice\":\"Simulates the effects of a borrow at the current time, given current contract conditions.\"},\"previewDebt(address)\":{\"notice\":\"Gets all borrows and penalties for an account.\"},\"previewFloatingAssetsAverage()\":{\"notice\":\"Returns the current `floatingAssetsAverage` without updating the storage variable.\"},\"previewRefund(uint256)\":{\"notice\":\"Simulates the effects of a refund at the current time, given current contract conditions.\"},\"previewRepay(uint256)\":{\"notice\":\"Simulates the effects of a repay at the current time, given current contract conditions.\"},\"redeem(uint256,address,address)\":{\"notice\":\"Redeems the owner's floating pool assets to the receiver address.\"},\"refund(uint256,address)\":{\"notice\":\"Repays a certain amount of shares to the floating pool.\"},\"repay(uint256,address)\":{\"notice\":\"Repays a certain amount of assets to the floating pool.\"},\"repayAtMaturity(uint256,uint256,uint256,address)\":{\"notice\":\"Repays a certain amount to a maturity.\"},\"reserveFactor()\":{\"notice\":\"Percentage factor that represents the liquidity reserves that can't be borrowed.\"},\"rewardsController()\":{\"notice\":\"Address of the rewards controller that will accrue rewards for accounts operating with the Market.\"},\"seize(address,address,uint256)\":{\"notice\":\"Public function to seize a certain amount of assets.\"},\"setAssetSymbol(string)\":{\"notice\":\"Sets name and symbol for the Market.\"},\"setBackupFeeRate(uint256)\":{\"notice\":\"Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially providing liquidity.\"},\"setDampSpeed(uint256,uint256)\":{\"notice\":\"Sets the damp speed used to update the floatingAssetsAverage.\"},\"setEarningsAccumulatorSmoothFactor(uint128)\":{\"notice\":\"Sets the factor used when smoothly accruing earnings to the floating pool.\"},\"setFrozen(bool)\":{\"notice\":\"Sets `isFrozen` state, triggered by an authorized account.\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model to be used to calculate rates.\"},\"setMaxFuturePools(uint8)\":{\"notice\":\"Sets the protocol's max future pools for fixed borrowing and lending.\"},\"setPenaltyRate(uint256)\":{\"notice\":\"Sets the penalty rate per second.\"},\"setReserveFactor(uint128)\":{\"notice\":\"Sets the percentage that represents the liquidity reserves that can't be borrowed.\"},\"setRewardsController(address)\":{\"notice\":\"Sets the rewards controller to update account rewards when operating with the Market.\"},\"setTreasury(address,uint256)\":{\"notice\":\"Sets the treasury variables.\"},\"totalAssets()\":{\"notice\":\"Calculates the floating pool balance plus earnings to be accrued at current timestamp from maturities and accumulator.\"},\"totalFloatingBorrowAssets()\":{\"notice\":\"Calculates the total floating debt, considering elapsed time since last update and current interest rate.\"},\"totalFloatingBorrowShares()\":{\"notice\":\"Total amount of floating borrow shares assigned to floating borrow accounts.\"},\"transfer(address,uint256)\":{\"notice\":\"Moves amount of shares from the caller's account to `to`.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Moves amount of shares from `from` to `to` using the allowance mechanism.\"},\"treasury()\":{\"notice\":\"Address of the treasury that will receive the allocated earnings.\"},\"treasuryFeeRate()\":{\"notice\":\"Rate to be charged by the treasury to floating and fixed borrows.\"},\"unpause()\":{\"notice\":\"Sets the pause state to false when threat is gone, triggered by an authorized account.\"},\"withdraw(uint256,address,address)\":{\"notice\":\"Withdraws the owner's floating pool assets to the receiver address.\"},\"withdrawAtMaturity(uint256,uint256,uint256,address,address)\":{\"notice\":\"Withdraws a certain amount from a maturity.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Market.sol\":\"Market\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":70},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\":{\"keccak256\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b83b7afa4d2372da3ba5402fb10860a105c35d79812c60dc61007be2afc17618\",\"dweb:/ipfs/QmYX9xPmbNVSKXrepKiUZiG5oL3SdzFp9a4kqspxX1sEUx\"]},\"@openzeppelin/contracts-upgradeable-v4/access/IAccessControlUpgradeable.sol\":{\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://740cf4dc535e3082560cf5a031473029f322690fc8037fe9d5e3a8bef42e757c\",\"dweb:/ipfs/QmTQxFdfxcaueQa23VX34wAPqzruZbkzyeN58tZK2yav2b\"]},\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e\",\"dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv\"]},\"@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol\":{\"keccak256\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6d362da7417bc7d7cc8623f3d3f8f04c3808d043ee6379568c63a63ec14a124e\",\"dweb:/ipfs/QmYm3wDHUcfGh3MNiRqpWEBbSSYnDSyUsppDATy5DVsfui\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b\",\"dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8b06267c5f80bad727af3e48b1382333d591dad51376399ef2f6b0ee6d58bf95\",\"dweb:/ipfs/QmdU5La1agcQvghnfMpWZGDPz2TUDTCxUwTLKmuMRXBpAx\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/StringsUpgradeable.sol\":{\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f8613145881436fc0480fff22da4868d611e2b0c0c3da083334eb4362ce1945a\",\"dweb:/ipfs/QmPqpP3YeRbBdTJRe6Gv2eGsUaANf4J6RwTNRW36iYahfV\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/introspection/ERC165Upgradeable.sol\":{\"keccak256\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1b13befeb3413749292f9fb229de1c7a509a5ce2c8047d9094fc004ca9d3af89\",\"dweb:/ipfs/QmRzJ2hZSwRtMejHUZAYTPRKgZsnfb112Fno9Jf3EiDfwA\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/introspection/IERC165Upgradeable.sol\":{\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://92ad7e572cf44e6b4b37631b44b62f9eb9fb1cf14d9ce51c1504d5dc7ccaf758\",\"dweb:/ipfs/QmcnbqX85tsWnUXPmtuPLE4SczME2sJaTfmqEFkuAJvWhy\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\":{\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2b2835c737d073ef8b82a4cc246495a9740f43e7ff2cf130906b2449ff9bfb91\",\"dweb:/ipfs/QmSCWfNoSvvTN57ic7o1RW6NqSxxGAqbBTnLKc7QHe27qB\"]},\"@openzeppelin/contracts-upgradeable-v4/utils/math/SignedMathUpgradeable.sol\":{\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://88ace2d60f265752f18903d839910be4e4e104340b2957678585b812447825d4\",\"dweb:/ipfs/QmXFkNxMc3AAGzhs2wUEZyErWQjsvoTGyYjuU5oZkFki5Z\"]},\"@openzeppelin/contracts-v4/utils/math/Math.sol\":{\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c\",\"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS\"]},\"@openzeppelin/contracts-v4/utils/math/SafeCast.sol\":{\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://495145362c7ff1c9ca88c58bbbbcb412e3c2004406647412394486552ff6c278\",\"dweb:/ipfs/QmNNCeng6d5eRPDn6tkWSQhjE39XWfQEfjA63rRwHmr1iH\"]},\"contracts/Auditor.sol\":{\"keccak256\":\"0x5110a03bc02c12d47bc64ccb39250e2c9eaa4c4089e63ed143e0513bf7ede5d8\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e61331e636beec80bc57e2b751fa672ee98dab4fb489c9ea4cf19cd68acbddfd\",\"dweb:/ipfs/QmPgu5ZNy8b7ywz6fX658A5ETWTKdGLXCwtX5eAPEiZfH8\"]},\"contracts/InterestRateModel.sol\":{\"keccak256\":\"0x21b3897afb0da4e23559f3122f2292deb79516d8850a4995ece47b8c4d278004\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://a8aad4f1b7340db20e72e3c115e951ad5c71c87fb6139729f9b3279289f82908\",\"dweb:/ipfs/QmZ1UAp33jbcHJZFmsDSokVM6tSCPTPXi3zEranQDP4ZQE\"]},\"contracts/Market.sol\":{\"keccak256\":\"0xea262e9a46d356f8626b4ea1d2bf9017e009b3d4f95809f5f33331b0236b3ce6\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e05e0132c04440fa2a3bd7d991940f4f14f70efe0414f7b8085f5a2247aea6ec\",\"dweb:/ipfs/QmWwjTo5nRbuY1GywEXUPdA9tDvN6CgA8pL147dQdPTacW\"]},\"contracts/RewardsController.sol\":{\"keccak256\":\"0xab502e9e6c6fdd56878d80fde0aee78c360234b15b1db8d7cb6508fe3c430163\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://08502c85c6753a61ff24aeab55809674dd47cb206ad02aa615c81a53820acb06\",\"dweb:/ipfs/Qmazc5RbGCq7QXsuqqfkC5yC4LgkTUQLg5Xn1YCyi5Rxi4\"]},\"contracts/utils/FixedLib.sol\":{\"keccak256\":\"0x9eb04f02cac9a0c2fd049587524799c8ab4fa1840d9550bad02d87d81074187c\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://885545fb71ae6e82d70b364dd2fc021e25435b01131f1e7a63755c303a350928\",\"dweb:/ipfs/QmaejvpPc1qX1GWvwodnUaHgKzob8WpsU3kz84qpk7vRn3\"]},\"contracts/utils/IPriceFeed.sol\":{\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://b06913f9c7e4fe67bbb1ddf3d9335a2a6c0e7a537aae8ed7d8b5825c61e80514\",\"dweb:/ipfs/Qmb34jWcW4Pv8Upsq2rtoYoncPHoUgDUET6JHBBsTo583L\"]},\"solmate/src/mixins/ERC4626.sol\":{\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1dca20fc42d20ce7b6023fafd744dc7e91ed2d1f6c5f1fb45e3004b1d5f33100\",\"dweb:/ipfs/Qmf7MtQTTSJYEhsJ3HDmegt4PFSG13msyFAv4DFAoqyypa\"]},\"solmate/src/tokens/ERC20.sol\":{\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb440672ebad7d487c1600e406e140fd1ffc4bd7520c86b5709183ca2602da58\",\"dweb:/ipfs/QmNgZaBoAZwnwm4mTL1cUZnMtvt1iZnruMnfpJnDu6upuc\"]},\"solmate/src/utils/FixedPointMathLib.sol\":{\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://737232ccd46bfbe6f34a3e5bc24c345777da47e6ea27bcc46d2c3931883c2257\",\"dweb:/ipfs/QmeA6ikG9dQKZgkJYUVGXcApuCii34h7qtmguToRdSU3qZ\"]},\"solmate/src/utils/SafeTransferLib.sol\":{\"keccak256\":\"0xbb4580ec2c735b5f31bb176567c886a87c2800b3eff132eda15ddc2b28cc2932\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://27ce4609ece6f8635dafd662cf8a45a4e0b5c3240e6f26c6b0081df880039152\",\"dweb:/ipfs/QmYPBJ1DPeFNUTPSPka3G9iwpSfbyJnYQeo5YGvbfyQFGC\"]}},\"version\":1}", + "bytecode": "0x610120604052348015610010575f80fd5b5060405161651138038061651183398101604081905261002f9161021c565b8160405180602001604052805f81525060405180602001604052805f8152508181846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100b09190610254565b60c96100bc8482610313565b5060ca6100c98382610313565b5060ff81166080524660a0526100dd610108565b60c0525050506001600160a01b0392831660e05250508116610100526101016101a1565b505061043e565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c960405161013991906103cd565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f54610100900460ff16156101b4575f80fd5b5f5460ff90811614610203575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610219575f80fd5b50565b5f806040838503121561022d575f80fd5b825161023881610205565b602084015190925061024981610205565b809150509250929050565b5f60208284031215610264575f80fd5b815160ff81168114610274575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102a357607f821691505b6020821081036102c157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561030e57805f5260205f20601f840160051c810160208510156102ec5750805b601f840160051c820191505b8181101561030b575f81556001016102f8565b50505b505050565b81516001600160401b0381111561032c5761032c61027b565b6103408161033a845461028f565b846102c7565b6020601f821160018114610372575f831561035b5750848201515b5f19600385901b1c1916600184901b17845561030b565b5f84815260208120601f198516915b828110156103a15787850151825560209485019460019092019101610381565b50848210156103be57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f8083546103da8161028f565b6001821680156103f1576001811461040657610433565b60ff1983168652811515820286019350610433565b865f5260205f205f5b8381101561042b5781548882015260019091019060200161040f565b505081860193505b509195945050505050565b60805160a05160c05160e05161010051615ff561051c5f395f81816107840152818161154d015281816116fe01528181611d7a01528181611faa01528181612184015281816124b201528181612e8b0152818161303c0152818161312e015281816136700152614b2801525f8181610734015281816115be01528181611b7101528181611c650152818161206c015281816122780152818161233f0152818161282e01528181612e0d015281816136e101528181614cb2015281816151cd01526152cf01525f611bde01525f611ba901525f6106cb0152615ff55ff3fe608060405234801561000f575f80fd5b50600436106104c1575f3560e01c80636e76fc8f11610283578063b2a02ff111610168578063d5164184116100e0578063e63ab1e91161009a578063e63ab1e914610c98578063e94b3c2114610cac578063eee8c9e014610cb5578063ef8b30f714610cbd578063f3fdb15a14610cd0578063fb0fc4c314610ce3578063fea45d9414610cfa575f80fd5b8063d516418414610c04578063d547741f14610c17578063d6b7494f14610c2a578063d905777e14610c33578063dd62ed3e14610c5b578063e00b262514610c85575f80fd5b8063b2a02ff114610af7578063b3d7f6b914610b0a578063b460af9414610b1d578063ba08765214610b30578063bee36bb314610b43578063bf722ca214610b56578063c63d75b6146107ae578063c6e6f59214610b69578063ccfd8b1114610b7c578063ce96cb7714610bad578063d2681a0b14610bc0578063d505accf14610bf1575f80fd5b806391d14854116101fb57806391d1485414610a32578063926bb63314610a4557806394bf804d14610a5857806395d89b4114610a6b57806397bce8d014610a73578063a05a091a14610a86578063a16a885014610a99578063a1bab44714610aae578063a1e8f02b14610ac1578063a217fddf14610aca578063a9059cbb14610ad1578063acb7081514610ae4575f80fd5b80636e76fc8f146109325780636eb9ffeb1461095957806370a082311461098557806378007e23146109a45780637ad226dc146109b75780637e932d32146109ca5780637ecebe00146109dd5780638456cb59146109fc5780638a1baa4614610a045780638bcd401614610a0d5780638c3cba5a14610a205780638d0e5f0214610a29575f80fd5b8063313ce567116103a95780634322b714116103215780634322b714146107d557806347dffde0146107fc5780634914c0081461080f5780634cdad506146108225780634e7c5059146108355780635c975abb146108895780635cc2ef83146108945780635e5c06e2146108a757806361d027b3146108f057806366601032146109035780636bb65f531461090c5780636e553f651461091f575f80fd5b8063313ce567146106c657806333eeb147146106ed57806334f7d1f2146107015780633644e5151461071457806336568abe1461071c57806338d52e0f1461072f5780633aa18d6f146107635780633c6f317f1461076c5780633ec045a61461077f5780633f4ba83a146107a6578063402d267d146107ae57806342da42bf146107c2575f80fd5b8063137001011161043c57806313700101146105e557806318160ddd146105f85780631a5b9e62146106015780631a90f186146106145780631d43b30b1461061d57806323b872dd14610630578063248a9ca31461064357806325fc07a91461066557806328acf2cf146106845780632c5dcc77146106975780632e0af008146106aa5780632f2ff15d146106b3575f80fd5b8063014a296f146104c557806301e1d114146104f257806301ffc9a714610508578063022d8af51461052b5780630539fa8c1461054057806306fdde031461054957806307a2d13a1461055e578063095ea7b3146105715780630a28a477146105845780630ab69be8146105975780630e52dbec146105be5780630f2b75aa146105dd575b5f80fd5b6104d86104d336600461564e565b610d0d565b604080519283526020830191909152015b60405180910390f35b6104fa610d42565b6040519081526020016104e9565b61051b610516366004615669565b610dee565b60405190151581526020016104e9565b61053e6105393660046156ab565b610e24565b005b6104fa60d85481565b610551610eab565b6040516104e991906156c4565b6104fa61056c3660046156f9565b610f37565b61051b61057f366004615710565b610f63565b6104fa6105923660046156f9565b610fce565b6104d86105a53660046156f9565b5f90815260d16020526040902080546001909101549091565b60da546105cb9060ff1681565b60405160ff90911681526020016104e9565b6104fa610fed565b61053e6105f3366004615777565b611092565b6104fa60cb5481565b6104fa61060f3660046157b5565b611103565b6104fa60d45481565b6104fa61062b36600461564e565b6115f3565b61051b61063e366004615807565b6116f3565b6104fa6106513660046156f9565b5f9081526065602052604090206001015490565b6104fa6106733660046156f9565b5f90815260d1602052604090205490565b61053e610692366004615855565b61185a565b61053e6106a5366004615710565b6118a6565b6104fa60dd5481565b61053e6106c136600461586e565b611916565b6105cb7f000000000000000000000000000000000000000000000000000000000000000081565b60e35461051b90600160a01b900460ff1681565b6104fa61070f36600461589c565b61193f565b6104fa611ba6565b61053e61072a36600461586e565b611c00565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b6040516104e991906158da565b6104fa60d95481565b6104fa61077a36600461589c565b611c22565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b61053e611c95565b6104fa6107bc36600461564e565b505f1990565b61053e6107d03660046156f9565b611cb7565b60dc546107ef90600160801b90046001600160801b031681565b6040516104e991906158ee565b6104fa61080a3660046156f9565b611cf6565b6104fa61081d366004615902565b611d14565b6104fa6108303660046156f9565b6121f0565b6108696108433660046156f9565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016104e9565b60975460ff1661051b565b61053e6108a2366004615941565b6121fa565b6108d56108b536600461564e565b60d26020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016104e9565b60e154610756906001600160a01b031681565b6104fa60e25481565b60e354610756906001600160a01b031681565b6104fa61092d36600461586e565b612254565b6104fa7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da5461097090600160281b900463ffffffff1681565b60405163ffffffff90911681526020016104e9565b6104fa61099336600461564e565b60cc6020525f908152604090205481565b6104fa6109b23660046156f9565b6122fa565b6104d86109c536600461586e565b612311565b61053e6109d8366004615961565b61236e565b6104fa6109eb36600461564e565b60ce6020525f908152604090205481565b61053e6123eb565b6104fa60d55481565b61053e610a1b36600461564e565b6123fd565b6104fa60d35481565b6104fa60df5481565b61051b610a4036600461586e565b61247d565b61053e610a5336600461564e565b6124a7565b6104fa610a6636600461586e565b612815565b6105516128b0565b61053e610a81366004615980565b6128bd565b6104fa610a943660046157b5565b612a1c565b60da5461097090610100900463ffffffff1681565b61053e610abc3660046156f9565b612e41565b6104fa60d75481565b6104fa5f81565b61051b610adf366004615710565b612e80565b6104d8610af236600461586e565b612fdd565b61053e610b05366004615807565b612ff9565b6104fa610b183660046156f9565b61300d565b6104fa610b2b366004615a2b565b613023565b6104fa610b3e366004615a2b565b61312b565b61053e610b5136600461564e565b613228565b6104fa610b643660046156f9565b61327c565b6104fa610b773660046156f9565b61329b565b6104d8610b8a36600461586e565b60cf60209081525f92835260408084209091529082529020805460019091015482565b6104fa610bbb36600461564e565b6132b2565b6104d8610bce36600461586e565b60d060209081525f92835260408084209091529082529020805460019091015482565b61053e610bff366004615a5f565b6132d3565b6104fa610c12366004615a2b565b613498565b61053e610c2536600461586e565b613713565b6104fa60d65481565b6104fa610c4136600461564e565b6001600160a01b03165f90815260cc602052604090205490565b6104fa610c69366004615ac9565b60cd60209081525f928352604080842090915290825290205481565b61053e610c933660046156ab565b613737565b6104fa5f80516020615f8083398151915281565b6104fa60de5481565b6104fa61378b565b6104fa610ccb3660046156f9565b61386c565b60db54610756906001600160a01b031681565b60da5461097090600160481b900463ffffffff1681565b60dc546107ef906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610d3090610f37565b610d39846115f3565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610db4575f81815260d160205260409020600381015480831115610da857824210610d8e578160020154610da3565b6002820154610da39042839003838603613876565b860195505b50506224ea0001610d5c565b50610dd760e254670de0b6b3a76400000360d454610dd061378b565b0390613894565b610ddf6138a8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610e1e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610e2e8161391e565b610e36613928565b60dd5f828254610e469190615b1d565b90915550610e5490506139a1565b60dc80546001600160801b0319166001600160801b0384161790556040517f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e90610e9f9084906158ee565b60405180910390a15050565b60c98054610eb890615b30565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee490615b30565b8015610f2f5780601f10610f0657610100808354040283529160200191610f2f565b820191905f5260205f20905b815481529060010190602001808311610f1257829003601f168201915b505050505081565b60cb545f908015610f5a57610f55610f4d610d42565b849083613876565b610f5c565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fbd9086815260200190565b60405180910390a350600192915050565b60cb545f908015610f5a57610f5581610fe5610d42565b859190613a07565b60dd5460de545f9190828183106110065760d85461100a565b60d9545b60da549091505f906110459061102d90600160481b900463ffffffff1642615b68565b6110379084615b7b565b61104090615b92565b613a34565b61105790670de0b6b3a7640000615bac565b90506110638185613894565b61107f61107883670de0b6b3a7640000615b68565b8590613894565b6110899190615b1d565b94505050505090565b5f61109c8161391e565b82826040516020016110af929190615bcb565b60405160208183030381529060405260c990816110cc9190615c46565b5082826040516020016110e0929190615d00565b60405160208183030381529060405260ca90816110fd9190615c46565b50505050565b5f61110c613ba7565b611114613bb6565b845f036111345760405163774257f760e01b815260040160405180910390fd5b60da5461114890879060ff1660035f613be1565b5f86815260d160205260409020611165611160613d7b565b613e89565b61116f8188613ec6565b60dd5f82825461117f9190615b1d565b909155505060e3546001600160a01b031680156111f057604051636c912dad60e01b81526001600160a01b03821690636c912dad906111c29087906004016158da565b5f604051808303815f87803b1580156111d9575f80fd5b505af11580156111eb573d5f803e3d5ffd5b505050505b5f6111fb8389613f44565b9050801561127f575f8160d3546112129190615b1d565b60dc549091506112509061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b60dd54906001600160801b0316613894565b60d45461125d9083615b1d565b111561127b57604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061128a610fed565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff166112d88a600101548b5f015489613f80565b6112e28888613fad565b6112ef898960d354613fc5565b6040518663ffffffff1660e01b815260040161130f959493929190615d3d565b602060405180830381865afa15801561132a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061134e9190615d63565b905061137361136c611360428f615b68565b83906301e13380613876565b8c90613fe1565b935050505080886113849190615b1d565b9350868411156113a757604051632c1b6b4160e21b815260040160405180910390fd5b6113b18585613ff5565b5f89815260d0602090815260408083206001600160a01b038916845290915281208054909103611408576001600160a01b0386165f90815260d2602052604090206001810154611401908c61406b565b6001909101555b5f8061144b61141685614154565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614180565b91509150815f1461146f5781866002015f8282546114699190615b1d565b90915550505b611478816141cc565b60405180604001604052808c855f01546114929190615b1d565b81526020018585600101546114a79190615b1d565b90525f8d815260d0602090815260408083206001600160a01b03808e168086529184529382902085518155949092015160019094019390935591519194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139061151d9033908e908890615d7a565b60405180910390a461152d6139a1565b611536896141f8565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906115849030908990600401615d9b565b5f604051808303815f87803b15801561159b575f80fd5b505af11580156115ad573d5f803e3d5ffd5b506115e79250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614246565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b81156116c85760018216156116ad575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916116689190615b1d565b90506116748188615b1d565b9650824211156116aa5761169d8561168c8542615b68565b6116969190615b7b565b8290613894565b6116a79088615b1d565b96505b50505b60019190911c906116c16224ea0082615b1d565b9050611624565b600284015480156116e9576116dc81611cf6565b6116e69087615b1d565b95505b5050505050919050565b5f6116fc613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53086611736866121f0565b6040518463ffffffff1660e01b815260040161175493929190615db5565b5f6040518083038186803b15801561176a575f80fd5b505afa15801561177c573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561184657604051630149e46f60e01b81526001600160a01b03821690630149e46f906117bf9088906004016158da565b5f604051808303815f87803b1580156117d6575f80fd5b505af11580156117e8573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f91506118189087906004016158da565b5f604051808303815f87803b15801561182f575f80fd5b505af1158015611841573d5f803e3d5ffd5b505050505b611851858585614291565b95945050505050565b5f6118648161391e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610e9f565b5f6118b08161391e565b6118bb611160613d7b565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119308161391e565b61193a838361436b565b505050565b5f611948613ba7565b611950613bb6565b835f03611970576040516356316e8760e01b815260040160405180910390fd5b60da5461198490869060ff1660035f613be1565b5f85815260d1602052604081209061199c8288613ec6565b90506119a9611160613d7b565b8060dd5f8282546119ba9190615b1d565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f9182916119ff918a906143f0565b9092509050611a0e8289615b1d565b945086851015611a3157604051632c1b6b4160e21b815260040160405180910390fd5b611a3b8489614441565b60d35f828254611a4b9190615b68565b90915550611a5b90508183615b1d565b846002015f828254611a6d9190615b68565b925050819055508060d55f828254611a859190615b1d565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611ada576001600160a01b0387165f90815260d2602052604090208054611ad7908c61406b565b90555b88815f015f828254611aec9190615b1d565b9250508190555082816001015f828254611b069190615b1d565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611b5b6139a1565b611b648a6141f8565b611b996001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614471565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611bdb57611bd66144c9565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611c14575f80fd5b611c1e8282614562565b5050565b5f611c2b613ba7565b60da54611c4090869060ff1660036002613be1565b611c4e8585858560016145c8565b9050611c586139a1565b611c8d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b949350505050565b5f80516020615f80833981519152611cac8161391e565b611cb4614952565b50565b5f611cc18161391e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610e9f565b60df545f908015610f5a57610f55611d0c61378b565b849083613a07565b5f611d1d613ba7565b6001600160a01b0384163303611d46576040516344511af160e01b815260040160405180910390fd5b611d4e613928565b60dd5f828254611d5e9190615b1d565b909155505060405163042dcf6b60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890611db5903090869089908990600401615dd9565b602060405180830381865afa158015611dd0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df49190615d63565b9250825f03611e165760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611e5057508515155b15611f5d576001821615611f42575f81421015611e8757611e748288898b5f6145c8565b9050611e808188615b68565b9650611f34565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611eb99190615b1d565b9150505f611ee060d6548542611ecf9190615b68565b611ed99190615b7b565b8390613894565b611eea9083615b1d565b9050888111611ef95788611f04565b611f04898383613876565b9250825f03611f15575f9850611f31565b611f2284848b8d5f6145c8565b9250611f2e838a615b68565b98505b50505b611f3e8186615b1d565b9450505b60019190911c90611f566224ea0082615b1d565b9050611e42565b50508315801590611f715750600281015415155b15611fa6575f611f808561327c565b90508015611fa4575f611f938288614994565b509050611fa08185615b1d565b9350505b505b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1b003130878a886040518563ffffffff1660e01b8152600401611ffa9493929190615dd9565b6040805180830381865afa158015612014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120389190615e03565b915091508160d55f82825461204d9190615b1d565b90915550612094905033306120628588615b1d565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614471565b306001600160a01b038616036120b5576120b030338984614af1565b61211a565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906120e59033908b908690600401615db5565b5f604051808303815f87803b1580156120fc575f80fd5b505af115801561210e573d5f803e3d5ffd5b5050505061211a6139a1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906121b9908a906004016158da565b5f604051808303815f87803b1580156121d0575f80fd5b505af11580156121e2573d5f803e3d5ffd5b505050505050509392505050565b5f610e1e82610f37565b5f6122048161391e565b61220c614cd9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61225e8361386c565b9050805f0361226b575f80fd5b6122a06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614471565b6122aa8282614d04565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8382614d7a565b60df545f908015610f5a57610f5581610fe561378b565b5f8061231b613ba7565b6123258484614994565b90925090506123326139a1565b6123676001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614471565b9250929050565b5f6123788161391e565b60e35460ff600160a01b90910416151582151514611c1e5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee698906123df90851515815260200190565b60405180910390a25050565b6123f3614dd9565b6123fb614e42565b565b5f6124078161391e565b60db546001600160a01b03161561242357612423611160613d7b565b60db80546001600160a01b0319166001600160a01b0384161790556124466139a1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146124f0576040516317568c8f60e21b815260040160405180910390fd5b6124f8613928565b60dd5f8282546125089190615b1d565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b811561276c576001821615612751575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916125849190615b1d565b905080861061274e5760e3546001600160a01b031680156125f957604051636c912dad60e01b81526001600160a01b03821690636c912dad906125cb908c906004016158da565b5f604051808303815f87803b1580156125e2575f80fd5b505af11580156125f4573d5f803e3d5ffd5b505050505b6126038288615b68565b965061260f8287615b1d565b83545f86815260d1602052604081209298509161262b91614e7f565b905080156126c4578060d35f8282546126449190615b68565b909155505083545f906126739061265b9084614e9e565b5f88815260d160205260409020600201549084613876565b90508060d15f8881526020019081526020015f206002015f8282546126989190615b68565b925050819055508060d55f8282546126b09190615b1d565b909155506126c09050818a615b1d565b9850505b5f85815260d0602090815260408083206001600160a01b038e16845290915281208181556001908101919091558901546126fe9086614eb3565b60018a015560408051848152602081018590526001600160a01b038c1691339188917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a450505b50505b60019190911c906127656224ea0082615b1d565b9050612540565b60028501541580159061278957506127838461327c565b93508315155b156127aa575f6127998588614994565b5090506127a68185615b1d565b9350505b8215612805578260d55f8282546127c19190615b68565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b61280d6139a1565b505050505050565b5f61281f8361300d565b90506128566001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b6128608284614d04565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8184614d7a565b60ca8054610eb890615b30565b5f54610100900460ff16158080156128db57505f54600160ff909116105b806128f45750303b1580156128f457505f5460ff166001145b6128fc575f80fd5b5f805460ff19166001179055801561291d575f805461ff0019166101001790555b612925614f72565b61292d614f84565b60da805468ffffffffffffffff0019166101004263ffffffff1690810263ffffffff60281b191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129805f3361436b565b61298a8b8b611092565b6129938961185a565b61299c88610e24565b6129a5876123fd565b6129ae86612e41565b6129b785611cb7565b6129c084613737565b6129ca83836121fa565b8015612a0f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a25613ba7565b845f03612a455760405163b8cb621960e01b815260040160405180910390fd5b60da54612a5a90879060ff1660036002613be1565b5f86815260d160205260409020612a72611160613d7b565b612a7c8188613ec6565b60dd5f828254612a8c9190615b1d565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612ad69190615b1d565b871115612af15760208101518151612aee9190615b1d565b96505b6040805180820190915281518152602080830151908201525f90612b2190612b19908a614f9e565b518490614fe4565b60d354612b2e9190615b1d565b905060dd5460d45482612b419190615b1d565b1115612b5f57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612c71575f612b73610fed565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bc78a600101548b5f01548a613f80565b612bd18989613fad565b612bdc8a8a8a613fc5565b6040518663ffffffff1660e01b8152600401612bfc959493929190615d3d565b602060405180830381865afa158015612c17573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c3b9190615d63565b9050612c66612c4d611360428f615b68565b612c5f90670de0b6b3a7640000615b1d565b8c90615028565b965050505050612c75565b8692505b85831015612c9657604051632c1b6b4160e21b815260040160405180910390fd5b612ca08484613ff5565b5f80612cec612cb7612cb2878c615b68565b614154565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614180565b9150915081846002015f828254612d039190615b1d565b90915550612d129050816141cc565b612d1c838a61503c565b5060208301518351175f03612d6f575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612d68908c614eb3565b9055612d9f565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b856001600160a01b0316876001600160a01b03168b7fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c338d8a604051612de793929190615d7a565b60405180910390a4612df76139a1565b612e008a6141f8565b612e346001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614246565b5050505095945050505050565b5f612e4b8161391e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610e9f565b5f612e89613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612ec3866121f0565b6040518463ffffffff1660e01b8152600401612ee193929190615db5565b5f6040518083038186803b158015612ef7575f80fd5b505afa158015612f09573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015612fd357604051630149e46f60e01b81526001600160a01b03821690630149e46f90612f4c9033906004016158da565b5f604051808303815f87803b158015612f63575f80fd5b505af1158015612f75573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f9150612fa59087906004016158da565b5f604051808303815f87803b158015612fbc575f80fd5b505af1158015612fce573d5f803e3d5ffd5b505050505b611c8d848461509a565b5f80612fe7613ba7565b612325612ff38561327c565b84614994565b613001613ba7565b61193a33848484614af1565b60cb545f908015610f5a57610f55611d0c610d42565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db59061307590309086908990600401615db5565b5f6040518083038186803b15801561308b575f80fd5b505afa15801561309d573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561310e57604051630149e46f60e01b81526001600160a01b03821690630149e46f906130e09086906004016158da565b5f604051808303815f87803b1580156130f7575f80fd5b505af1158015613109573d5f803e3d5ffd5b505050505b6131198585856150fd565b91506131236139a1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53084613166886121f0565b6040518463ffffffff1660e01b815260040161318493929190615db5565b5f6040518083038186803b15801561319a575f80fd5b505afa1580156131ac573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561321d57604051630149e46f60e01b81526001600160a01b03821690630149e46f906131ef9086906004016158da565b5f604051808303815f87803b158015613206575f80fd5b505af1158015613218573d5f803e3d5ffd5b505050505b6131198585856151f4565b5f6132328161391e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f908015610f5a57610f558161329361378b565b859190613876565b60cb545f908015610f5a57610f5581613293610d42565b6001600160a01b0381165f90815260cc6020526040812054610e1e90610f37565b428410156132df575f80fd5b5f60016132ea611ba6565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156133f2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134285750876001600160a01b0316816001600160a01b0316145b613430575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134a1613ba7565b6134a9613bb6565b835f036134c95760405163774257f760e01b815260040160405180910390fd5b6134d38285613ff5565b60e3546001600160a01b0316801561353f57604051636c912dad60e01b81526001600160a01b03821690636c912dad906135119086906004016158da565b5f604051808303815f87803b158015613528575f80fd5b505af115801561353a573d5f803e3d5ffd5b505050505b61354a611160613d7b565b613553856122fa565b91505f8560d4546135649190615b1d565b60d481905560dc549091506135959061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b8160d3546135a39190615b1d565b11156135c157604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135d29190615b1d565b90915550506001600160a01b0384165f90815260d2602052604081206002018054859290613601908490615b1d565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136596139a1565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906136a79030908890600401615d9b565b5f604051808303815f87803b1580156136be575f80fd5b505af11580156136d0573d5f803e3d5ffd5b5061370a9250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614246565b50509392505050565b5f8281526065602052604090206001015461372d8161391e565b61193a8383614562565b5f6137418161391e565b60dc80546001600160801b03808516600160801b0291161790556040517fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90610e9f9084906158ee565b60d45460dd5460da545f929190839061385890613851906137b990600160281b900463ffffffff1642615b68565b60db546301e13380906001600160a01b0316637c21fb1d6137da888a613fad565b6137e7898b60d354613fc5565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613826573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061384a9190615d63565b9190613876565b8490613894565b90506138648184615b1d565b935050505090565b5f610e1e8261329b565b82820281151584158583048514171661388d575f80fd5b0492915050565b5f610f5c8383670de0b6b3a7640000613876565b60da545f9081906138c490610100900463ffffffff1642615b68565b9050805f036138d4575f91505090565b60da54613918908290613904906138f2906224ea009060ff16615b7b565b60dc546001600160801b031690613894565b61390e9084615b1d565b60d5549190613876565b91505090565b611cb481336152f6565b5f6139316138a8565b90508060d55f8282546139449190615b68565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a1e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a4d57505f919050565b680755bf798b4a1bf1e58212613a61575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156123fb575f80fd5b60e354600160a01b900460ff16156123fb5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613bef6224ea0086615e25565b15613bfc57506001613c4f565b428511613c0b57506002613c4f565b613c1b60ff85166224ea00615b7b565b613c286224ea0042615e25565b613c329042615b68565b613c3c9190615b1d565b851115613c4b57506004613c4f565b5060035b826004811115613c6157613c61615e38565b816004811115613c7357613c73615e38565b14158015613ca35750816004811115613c8e57613c8e615e38565b816004811115613ca057613ca0615e38565b14155b15613d74575f826004811115613cbb57613cbb615e38565b03613d0f57806004811115613cd257613cd2615e38565b836004811115613ce457613ce4615e38565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d2157613d21615e38565b836004811115613d3357613d33615e38565b836004811115613d4557613d45615e38565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d06565b5050505050565b60d45460dd545f919082613d8f8284613fad565b60da549091505f90613de19061107890613db690600160281b900463ffffffff1642615b68565b60db5460d3546301e13380916001600160a01b031690637c21fb1d9088906137e7908b908d90613fc5565b9050613ded8185615b1d565b9350613e0460e2548261389490919063ffffffff16565b945084613e118285615b1d565b613e1b9190615b68565b60dd5560d484905560da805463ffffffff60281b1916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611cb45760e154613ead906001600160a01b0316613ea88361386c565b614d04565b8060dd5f828254613ebe9190615b1d565b909155505050565b60038201545f9042831115613f1a5760028401544260038601819055613f0390613ef1908490615b68565b613efb8487615b68565b839190613876565b9250613f0f8382615b68565b600286015550613f3d565b828103613f29575f9150613f3d565b600384018390556002840180545f90915591505b5092915050565b81545f9081613f538483615b1d565b9050613f6c613f6683876001015461533c565b82614e9e565b613f769082615b68565b9455509192915050565b5f8115801590613f8f57508383115b613f99575f611c8d565b611c8d82613fa78686615b68565b9061534a565b5f825f03613fbb575f610f5c565b610f5c828461534a565b5f835f03613fd3575f611c8d565b611c8d84613fa78486615b1d565b5f610f5c8383670de0b6b3a7640000613a07565b336001600160a01b03831614611c1e576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461193a5761403982610fce565b6140439082615b68565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f036140805750600160201b8117610e1e565b63ffffffff8316808310156140fd575f6224ea0061409e8584615b68565b6140a89190615e4c565b90506140b681610100615b68565b85901c156140d75760405163293cc41f60e21b815260040160405180910390fd5b6140e2816020615b1d565b602086901c901b9450848417600160201b1792505050610e1e565b5f6224ea0061410c8386615b68565b6141169190615e4c565b905060df81111561413a5760405163293cc41f60e21b815260040160405180910390fd5b614145816020615b1d565b6001901b851792505050610e1e565b5f8061416b60e2548461389490919063ffffffff16565b905061417681613e89565b610f5c8184615b68565b5f8082156141b4576141af61419d6141978761535e565b85614e9e565b6141a79085615b68565b859085613876565b6141b6565b5f5b90506141c28185615b68565b9150935093915050565b805f036141d65750565b60e254156141e757611cb481613e89565b8060d55f828254613ebe9190615b1d565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806110fd575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142ea576142c68382615b68565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614311908490615b68565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615fa0833981519152906143589087815260200190565b60405180910390a3506001949350505050565b614375828261247d565b611c1e575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f6143fc8661535e565b905080156144385761441d6144118683614e9e565b60408801519083613876565b92506144298385613894565b91506144358284615b68565b92505b50935093915050565b815460018301545f91906144558482615b1d565b60018601556118516144678383614e9e565b6141979084615b68565b5f6040516323b872dd60e01b5f526001600160a01b0385166004526001600160a01b0384166024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d74575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144fa9190615e5f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61456c828261247d565b15611c1e575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145e95760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906146018289613ec6565b905061460e611160613d7b565b8060dd5f82825461461f9190615b1d565b90915550505f88815260d0602090815260408083206001600160a01b0389168452825280832081518083019092528054808352600190910154928201839052909291614675918b9161467091615b1d565b614e9e565b6040805180820190915283518152602080850151908201529091505f9061469c9083614f9e565b5160e3549091506001600160a01b0316801561470c57604051636c912dad60e01b81526001600160a01b03821690636c912dad906146de908c906004016158da565b5f604051808303815f87803b1580156146f5575f80fd5b505af1158015614707573d5f803e3d5ffd5b505050505b8b4210156147d45760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147549186906143f0565b90925090506147638183615b1d565b886002015f8282546147759190615b68565b909155505089156147a8578060d55f8282546147919190615b1d565b909155506147a190508286615b68565b98506147cd565b6147b28183615b1d565b60d55f8282546147c29190615b1d565b925050819055508498505b505061481b565b60d6546147ef906147e58e42615b68565b6138519190615b7b565b6147f99084615b1d565b96506148058388615b68565b60d55f8282546148159190615b1d565b90915550505b8987111561483c57604051632c1b6b4160e21b815260040160405180910390fd5b6148468683614e7f565b60d35f8282546148569190615b68565b909155506148669050848461503c565b5060208401518451175f036148c2575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d2909252909120908101546148b7908e614eb3565b6001909101556148f2565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a46149438c6141f8565b50505050505095945050505050565b61495a61537c565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516139fd91906158da565b60e3545f9081906001600160a01b03168015614a0457604051636c912dad60e01b81526001600160a01b03821690636c912dad906149d69087906004016158da565b5f604051808303815f87803b1580156149ed575f80fd5b505af11580156149ff573d5f803e3d5ffd5b505050505b614a0f611160613d7b565b6001600160a01b0384165f90815260d2602052604090206002810154614a358782614e9e565b9350614a4084611cf6565b9450845f03614a625760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a739190615b68565b90915550614a8390508482615b68565b82600201819055508360df5f828254614a9c9190615b68565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614b115760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e16ee72090614b5f9087903090600401615d9b565b5f6040518083038186803b158015614b75575f80fd5b505afa158015614b87573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bf857604051630149e46f60e01b81526001600160a01b03821690630149e46f90614bca9086906004016158da565b5f604051808303815f87803b158015614be1575f80fd5b505af1158015614bf3573d5f803e3d5ffd5b505050505b5f614c0283610fce565b9050614c0e838261538a565b614c188482615403565b60408051848152602081018390526001600160a01b03808716929088169133915f80516020615f60833981519152910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c9591815260200190565b60405180910390a3614ca56139a1565b61280d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614246565b614ce1610fed565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d7057604051630149e46f60e01b81526001600160a01b03821690630149e46f90614d429086906004016158da565b5f604051808303815f87803b158015614d59575f80fd5b505af1158015614d6b573d5f803e3d5ffd5b505050505b61193a838361546a565b614d82613ba7565b614d8a613bb6565b614d92614cd9565b5f614d9b613d7b565b90505f614da6613928565b9050614db28482615b1d565b60dd5f828254614dc29190615b1d565b90915550614dd1905082613e89565b6110fd6139a1565b614e037f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361247d565b158015614e245750614e225f80516020615f808339815191523361247d565b155b156123fb57604051631d006fdb60e31b815260040160405180910390fd5b614e4a613ba7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586149873390565b815460018301545f9190614e938483615b68565b855561185161446783835b5f818310614eac5781610f5c565b5090919050565b5f821580614ec6575081600160201b1783145b15614ed257505f610e1e565b63ffffffff8316808303614f4057602184901c60015b60018216158015614ef857508115155b15614f0957600191821c9101614ee8565b6020614f158282615b1d565b9690961c90951b9485614f2b6224ea0083615b7b565b614f359087615b1d565b179350505050610e1e565b6224ea00614f4e8285615b68565b614f589190615e4c565b614f63906020615b1d565b6001901b198416915050610e1e565b5f54610100900460ff166123fb575f80fd5b5f54610100900460ff16614f96575f80fd5b6123fb6154b9565b604080518082019091525f8082526020820152825160208401515f91614fc8916132939082615b1d565b8085529050614fd78184615b68565b6020850152509192915050565b815460018301545f919082614ff98583615b68565b90506150058184614e9e565b61500f8385614e9e565b6150199190615b68565b60019096015550929392505050565b5f610f5c83670de0b6b3a764000084613876565b604080518082019091525f8082526020820152602083015183515f9161506191615b1d565b90505f61506e8483615b68565b855190915061507f90829084613876565b80865261508c9082615b68565b602086015250929392505050565b335f90815260cc60205260408120805483919083906150ba908490615b68565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615fa083398151915290610fbd9086815260200190565b5f61510784610fce565b9050336001600160a01b03831614615174576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151725761514e8282615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61517e848261538a565b6151888282615403565b60408051858152602081018390526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614246565b5f336001600160a01b03831614615260576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461525e5761523a8582615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b615269846121f0565b9050805f03615276575f80fd5b615280818561538a565b61528a8285615403565b60408051828152602081018690526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614246565b615300828261247d565b611c1e5761530d816154d7565b6153188360206154e9565b604051602001615329929190615ee7565b6040516020818303038152906040525f80fd5b5f818311614eac5781610f5c565b5f610f5c83670de0b6b3a764000084613a07565b805160208201515f91906153728282614e9e565b611c8d9083615b68565b60975460ff166123fb575f80fd5b615392613ba7565b61539a614cd9565b6153a5611160613d7b565b5f6153ae613928565b90505f838260dd546153c09190615b1d565b6153ca9190615b68565b90508060d45460d3546153dd9190615b1d565b11156153fb57604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc60205260408120805483929061542a908490615b68565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615fa0833981519152906020015b60405180910390a35050565b8060cb5f82825461547b9190615b1d565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615fa0833981519152910161545e565b5f54610100900460ff166154cb575f80fd5b6097805460ff19169055565b6060610e1e6001600160a01b03831660145b60605f6154f7836002615b7b565b615502906002615b1d565b6001600160401b0381111561551957615519615bee565b6040519080825280601f01601f191660200182016040528015615543576020820181803683370190505b509050600360fc1b815f8151811061555d5761555d615f36565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061558b5761558b615f36565b60200101906001600160f81b03191690815f1a9053505f6155ad846002615b7b565b6155b8906001615b1d565b90505b600181111561562f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106155ec576155ec615f36565b1a60f81b82828151811061560257615602615f36565b60200101906001600160f81b03191690815f1a90535060049490941c9361562881615f4a565b90506155bb565b508315610f5c575f80fd5b6001600160a01b0381168114611cb4575f80fd5b5f6020828403121561565e575f80fd5b8135610f5c8161563a565b5f60208284031215615679575f80fd5b81356001600160e01b031981168114610f5c575f80fd5b80356001600160801b03811681146156a6575f80fd5b919050565b5f602082840312156156bb575f80fd5b610f5c82615690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615709575f80fd5b5035919050565b5f8060408385031215615721575f80fd5b823561572c8161563a565b946020939093013593505050565b5f8083601f84011261574a575f80fd5b5081356001600160401b03811115615760575f80fd5b602083019150836020828501011115612367575f80fd5b5f8060208385031215615788575f80fd5b82356001600160401b0381111561579d575f80fd5b6157a98582860161573a565b90969095509350505050565b5f805f805f60a086880312156157c9575f80fd5b85359450602086013593506040860135925060608601356157e98161563a565b915060808601356157f98161563a565b809150509295509295909350565b5f805f60608486031215615819575f80fd5b83356158248161563a565b925060208401356158348161563a565b929592945050506040919091013590565b803560ff811681146156a6575f80fd5b5f60208284031215615865575f80fd5b610f5c82615845565b5f806040838503121561587f575f80fd5b8235915060208301356158918161563a565b809150509250929050565b5f805f80608085870312156158af575f80fd5b84359350602085013592506040850135915060608501356158cf8161563a565b939692955090935050565b6001600160a01b0391909116815260200190565b6001600160801b0391909116815260200190565b5f805f60608486031215615914575f80fd5b833561591f8161563a565b92506020840135915060408401356159368161563a565b809150509250925092565b5f8060408385031215615952575f80fd5b50508035926020909101359150565b5f60208284031215615971575f80fd5b81358015158114610f5c575f80fd5b5f805f805f805f805f806101208b8d03121561599a575f80fd5b8a356001600160401b038111156159af575f80fd5b6159bb8d828e0161573a565b909b5099506159ce905060208c01615845565b97506159dc60408c01615690565b965060608b01356159ec8161563a565b955060808b0135945060a08b01359350615a0860c08c01615690565b999c989b50969995989497939650919460e0810135936101009091013592509050565b5f805f60608486031215615a3d575f80fd5b833592506020840135615a4f8161563a565b915060408401356159368161563a565b5f805f805f805f60e0888a031215615a75575f80fd5b8735615a808161563a565b96506020880135615a908161563a565b95506040880135945060608801359350615aac60808901615845565b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215615ada575f80fd5b8235615ae58161563a565b915060208301356158918161563a565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610e1e57610e1e615b09565b600181811c90821680615b4457607f821691505b602082108103615b6257634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610e1e57610e1e615b09565b8082028115828204841417610e1e57610e1e615b09565b5f600160ff1b8201615ba657615ba6615b09565b505f0390565b8181035f831280158383131683831282161715613f3d57613f3d615b09565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f82111561193a57805f5260205f20601f840160051c81016020851015615c275750805b601f840160051c820191505b81811015613d74575f8155600101615c33565b81516001600160401b03811115615c5f57615c5f615bee565b615c7381615c6d8454615b30565b84615c02565b6020601f821160018114615ca5575f8315615c8e5750848201515b5f19600385901b1c1916600184901b178455613d74565b5f84815260208120601f198516915b82811015615cd45787850151825560209485019460019092019101615cb4565b5084821015615cf157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b038281168282160390811115610e1e57610e1e615b09565b94855260ff93909316602085015260408401919091526060830152608082015260a00190565b5f60208284031215615d73575f80fd5b5051919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b5f8060408385031215615e14575f80fd5b505080516020909101519092909150565b5f82615e3357615e33615af5565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615e5a57615e5a615af5565b500490565b5f808354615e6c81615b30565b600182168015615e835760018114615e9857615ec5565b60ff1983168652811515820286019350615ec5565b865f5260205f205f5b83811015615ebd57815488820152600190910190602001615ea1565b505081860193505b509195945050505050565b5f81518060208401855e5f93019283525090919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81525f615f126017830185615ed0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526118516011820185615ed0565b634e487b7160e01b5f52603260045260245ffd5b5f81615f5857615f58615b09565b505f19019056fefbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122005ec196d152ea67004b2106a9e8456d6fce9e4ca698150d3a643ce4c0c94880d64736f6c634300081a0033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106104c1575f3560e01c80636e76fc8f11610283578063b2a02ff111610168578063d5164184116100e0578063e63ab1e91161009a578063e63ab1e914610c98578063e94b3c2114610cac578063eee8c9e014610cb5578063ef8b30f714610cbd578063f3fdb15a14610cd0578063fb0fc4c314610ce3578063fea45d9414610cfa575f80fd5b8063d516418414610c04578063d547741f14610c17578063d6b7494f14610c2a578063d905777e14610c33578063dd62ed3e14610c5b578063e00b262514610c85575f80fd5b8063b2a02ff114610af7578063b3d7f6b914610b0a578063b460af9414610b1d578063ba08765214610b30578063bee36bb314610b43578063bf722ca214610b56578063c63d75b6146107ae578063c6e6f59214610b69578063ccfd8b1114610b7c578063ce96cb7714610bad578063d2681a0b14610bc0578063d505accf14610bf1575f80fd5b806391d14854116101fb57806391d1485414610a32578063926bb63314610a4557806394bf804d14610a5857806395d89b4114610a6b57806397bce8d014610a73578063a05a091a14610a86578063a16a885014610a99578063a1bab44714610aae578063a1e8f02b14610ac1578063a217fddf14610aca578063a9059cbb14610ad1578063acb7081514610ae4575f80fd5b80636e76fc8f146109325780636eb9ffeb1461095957806370a082311461098557806378007e23146109a45780637ad226dc146109b75780637e932d32146109ca5780637ecebe00146109dd5780638456cb59146109fc5780638a1baa4614610a045780638bcd401614610a0d5780638c3cba5a14610a205780638d0e5f0214610a29575f80fd5b8063313ce567116103a95780634322b714116103215780634322b714146107d557806347dffde0146107fc5780634914c0081461080f5780634cdad506146108225780634e7c5059146108355780635c975abb146108895780635cc2ef83146108945780635e5c06e2146108a757806361d027b3146108f057806366601032146109035780636bb65f531461090c5780636e553f651461091f575f80fd5b8063313ce567146106c657806333eeb147146106ed57806334f7d1f2146107015780633644e5151461071457806336568abe1461071c57806338d52e0f1461072f5780633aa18d6f146107635780633c6f317f1461076c5780633ec045a61461077f5780633f4ba83a146107a6578063402d267d146107ae57806342da42bf146107c2575f80fd5b8063137001011161043c57806313700101146105e557806318160ddd146105f85780631a5b9e62146106015780631a90f186146106145780631d43b30b1461061d57806323b872dd14610630578063248a9ca31461064357806325fc07a91461066557806328acf2cf146106845780632c5dcc77146106975780632e0af008146106aa5780632f2ff15d146106b3575f80fd5b8063014a296f146104c557806301e1d114146104f257806301ffc9a714610508578063022d8af51461052b5780630539fa8c1461054057806306fdde031461054957806307a2d13a1461055e578063095ea7b3146105715780630a28a477146105845780630ab69be8146105975780630e52dbec146105be5780630f2b75aa146105dd575b5f80fd5b6104d86104d336600461564e565b610d0d565b604080519283526020830191909152015b60405180910390f35b6104fa610d42565b6040519081526020016104e9565b61051b610516366004615669565b610dee565b60405190151581526020016104e9565b61053e6105393660046156ab565b610e24565b005b6104fa60d85481565b610551610eab565b6040516104e991906156c4565b6104fa61056c3660046156f9565b610f37565b61051b61057f366004615710565b610f63565b6104fa6105923660046156f9565b610fce565b6104d86105a53660046156f9565b5f90815260d16020526040902080546001909101549091565b60da546105cb9060ff1681565b60405160ff90911681526020016104e9565b6104fa610fed565b61053e6105f3366004615777565b611092565b6104fa60cb5481565b6104fa61060f3660046157b5565b611103565b6104fa60d45481565b6104fa61062b36600461564e565b6115f3565b61051b61063e366004615807565b6116f3565b6104fa6106513660046156f9565b5f9081526065602052604090206001015490565b6104fa6106733660046156f9565b5f90815260d1602052604090205490565b61053e610692366004615855565b61185a565b61053e6106a5366004615710565b6118a6565b6104fa60dd5481565b61053e6106c136600461586e565b611916565b6105cb7f000000000000000000000000000000000000000000000000000000000000000081565b60e35461051b90600160a01b900460ff1681565b6104fa61070f36600461589c565b61193f565b6104fa611ba6565b61053e61072a36600461586e565b611c00565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b6040516104e991906158da565b6104fa60d95481565b6104fa61077a36600461589c565b611c22565b6107567f000000000000000000000000000000000000000000000000000000000000000081565b61053e611c95565b6104fa6107bc36600461564e565b505f1990565b61053e6107d03660046156f9565b611cb7565b60dc546107ef90600160801b90046001600160801b031681565b6040516104e991906158ee565b6104fa61080a3660046156f9565b611cf6565b6104fa61081d366004615902565b611d14565b6104fa6108303660046156f9565b6121f0565b6108696108433660046156f9565b60d16020525f908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016104e9565b60975460ff1661051b565b61053e6108a2366004615941565b6121fa565b6108d56108b536600461564e565b60d26020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016104e9565b60e154610756906001600160a01b031681565b6104fa60e25481565b60e354610756906001600160a01b031681565b6104fa61092d36600461586e565b612254565b6104fa7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b60da5461097090600160281b900463ffffffff1681565b60405163ffffffff90911681526020016104e9565b6104fa61099336600461564e565b60cc6020525f908152604090205481565b6104fa6109b23660046156f9565b6122fa565b6104d86109c536600461586e565b612311565b61053e6109d8366004615961565b61236e565b6104fa6109eb36600461564e565b60ce6020525f908152604090205481565b61053e6123eb565b6104fa60d55481565b61053e610a1b36600461564e565b6123fd565b6104fa60d35481565b6104fa60df5481565b61051b610a4036600461586e565b61247d565b61053e610a5336600461564e565b6124a7565b6104fa610a6636600461586e565b612815565b6105516128b0565b61053e610a81366004615980565b6128bd565b6104fa610a943660046157b5565b612a1c565b60da5461097090610100900463ffffffff1681565b61053e610abc3660046156f9565b612e41565b6104fa60d75481565b6104fa5f81565b61051b610adf366004615710565b612e80565b6104d8610af236600461586e565b612fdd565b61053e610b05366004615807565b612ff9565b6104fa610b183660046156f9565b61300d565b6104fa610b2b366004615a2b565b613023565b6104fa610b3e366004615a2b565b61312b565b61053e610b5136600461564e565b613228565b6104fa610b643660046156f9565b61327c565b6104fa610b773660046156f9565b61329b565b6104d8610b8a36600461586e565b60cf60209081525f92835260408084209091529082529020805460019091015482565b6104fa610bbb36600461564e565b6132b2565b6104d8610bce36600461586e565b60d060209081525f92835260408084209091529082529020805460019091015482565b61053e610bff366004615a5f565b6132d3565b6104fa610c12366004615a2b565b613498565b61053e610c2536600461586e565b613713565b6104fa60d65481565b6104fa610c4136600461564e565b6001600160a01b03165f90815260cc602052604090205490565b6104fa610c69366004615ac9565b60cd60209081525f928352604080842090915290825290205481565b61053e610c933660046156ab565b613737565b6104fa5f80516020615f8083398151915281565b6104fa60de5481565b6104fa61378b565b6104fa610ccb3660046156f9565b61386c565b60db54610756906001600160a01b031681565b60da5461097090600160481b900463ffffffff1681565b60dc546107ef906001600160801b031681565b6001600160a01b0381165f90815260cc60205260408120548190610d3090610f37565b610d39846115f3565b91509150915091565b60da545f9081906224ea004281810690039160ff16028101815b818111610db4575f81815260d160205260409020600381015480831115610da857824210610d8e578160020154610da3565b6002820154610da39042839003838603613876565b860195505b50506224ea0001610d5c565b50610dd760e254670de0b6b3a76400000360d454610dd061378b565b0390613894565b610ddf6138a8565b8460dd54010101935050505090565b5f6001600160e01b03198216637965db0b60e01b1480610e1e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f610e2e8161391e565b610e36613928565b60dd5f828254610e469190615b1d565b90915550610e5490506139a1565b60dc80546001600160801b0319166001600160801b0384161790556040517f5499a947330efc8c6d458d51fd04d56d7e44dc1469558b2300e359963cef317e90610e9f9084906158ee565b60405180910390a15050565b60c98054610eb890615b30565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee490615b30565b8015610f2f5780601f10610f0657610100808354040283529160200191610f2f565b820191905f5260205f20905b815481529060010190602001808311610f1257829003601f168201915b505050505081565b60cb545f908015610f5a57610f55610f4d610d42565b849083613876565b610f5c565b825b9392505050565b335f81815260cd602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fbd9086815260200190565b60405180910390a350600192915050565b60cb545f908015610f5a57610f5581610fe5610d42565b859190613a07565b60dd5460de545f9190828183106110065760d85461100a565b60d9545b60da549091505f906110459061102d90600160481b900463ffffffff1642615b68565b6110379084615b7b565b61104090615b92565b613a34565b61105790670de0b6b3a7640000615bac565b90506110638185613894565b61107f61107883670de0b6b3a7640000615b68565b8590613894565b6110899190615b1d565b94505050505090565b5f61109c8161391e565b82826040516020016110af929190615bcb565b60405160208183030381529060405260c990816110cc9190615c46565b5082826040516020016110e0929190615d00565b60405160208183030381529060405260ca90816110fd9190615c46565b50505050565b5f61110c613ba7565b611114613bb6565b845f036111345760405163774257f760e01b815260040160405180910390fd5b60da5461114890879060ff1660035f613be1565b5f86815260d160205260409020611165611160613d7b565b613e89565b61116f8188613ec6565b60dd5f82825461117f9190615b1d565b909155505060e3546001600160a01b031680156111f057604051636c912dad60e01b81526001600160a01b03821690636c912dad906111c29087906004016158da565b5f604051808303815f87803b1580156111d9575f80fd5b505af11580156111eb573d5f803e3d5ffd5b505050505b5f6111fb8389613f44565b9050801561127f575f8160d3546112129190615b1d565b60dc549091506112509061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b60dd54906001600160801b0316613894565b60d45461125d9083615b1d565b111561127b57604051622d41ad60e31b815260040160405180910390fd5b60d3555b505f8061128a610fed565b90505f60d45490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff166112d88a600101548b5f015489613f80565b6112e28888613fad565b6112ef898960d354613fc5565b6040518663ffffffff1660e01b815260040161130f959493929190615d3d565b602060405180830381865afa15801561132a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061134e9190615d63565b905061137361136c611360428f615b68565b83906301e13380613876565b8c90613fe1565b935050505080886113849190615b1d565b9350868411156113a757604051632c1b6b4160e21b815260040160405180910390fd5b6113b18585613ff5565b5f89815260d0602090815260408083206001600160a01b038916845290915281208054909103611408576001600160a01b0386165f90815260d2602052604090206001810154611401908c61406b565b6001909101555b5f8061144b61141685614154565b604080516080810182528954815260018a0154602082015260028a01549181019190915260038901546060820152908d614180565b91509150815f1461146f5781866002015f8282546114699190615b1d565b90915550505b611478816141cc565b60405180604001604052808c855f01546114929190615b1d565b81526020018585600101546114a79190615b1d565b90525f8d815260d0602090815260408083206001600160a01b03808e168086529184529382902085518155949092015160019094019390935591519194508a1692508c91507f66866b472f27d55d69496091bbd651907b2fb1041b3eeaca6e565ae5b5af40139061151d9033908e908890615d7a565b60405180910390a461152d6139a1565b611536896141f8565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906115849030908990600401615d9b565b5f604051808303815f87803b15801561159b575f80fd5b505af11580156115ad573d5f803e3d5ffd5b506115e79250506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169050878a614246565b50505095945050505050565b6001600160a01b0381165f90815260d260209081526040822060d6546001820154919290919081901c9063ffffffff165b81156116c85760018216156116ad575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916116689190615b1d565b90506116748188615b1d565b9650824211156116aa5761169d8561168c8542615b68565b6116969190615b7b565b8290613894565b6116a79088615b1d565b96505b50505b60019190911c906116c16224ea0082615b1d565b9050611624565b600284015480156116e9576116dc81611cf6565b6116e69087615b1d565b95505b5050505050919050565b5f6116fc613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53086611736866121f0565b6040518463ffffffff1660e01b815260040161175493929190615db5565b5f6040518083038186803b15801561176a575f80fd5b505afa15801561177c573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561184657604051630149e46f60e01b81526001600160a01b03821690630149e46f906117bf9088906004016158da565b5f604051808303815f87803b1580156117d6575f80fd5b505af11580156117e8573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f91506118189087906004016158da565b5f604051808303815f87803b15801561182f575f80fd5b505af1158015611841573d5f803e3d5ffd5b505050505b611851858585614291565b95945050505050565b5f6118648161391e565b60da805460ff191660ff84169081179091556040519081527f23c0170203096819aed8a13739fe91ce445ec92a7e2aa228081b5e45ee582c8090602001610e9f565b5f6118b08161391e565b6118bb611160613d7b565b60e180546001600160a01b0319166001600160a01b03851690811790915560e28390556040518381527fd471a80a3a5fd21dfce2b1b7c88bbea4684ab90254a4e47345ac344d566788729060200160405180910390a2505050565b5f828152606560205260409020600101546119308161391e565b61193a838361436b565b505050565b5f611948613ba7565b611950613bb6565b835f03611970576040516356316e8760e01b815260040160405180910390fd5b60da5461198490869060ff1660035f613be1565b5f85815260d1602052604081209061199c8288613ec6565b90506119a9611160613d7b565b8060dd5f8282546119ba9190615b1d565b909155505060d754604080516080810182528454815260018501546020820152600285015491810191909152600384015460608201525f9182916119ff918a906143f0565b9092509050611a0e8289615b1d565b945086851015611a3157604051632c1b6b4160e21b815260040160405180910390fd5b611a3b8489614441565b60d35f828254611a4b9190615b68565b90915550611a5b90508183615b1d565b846002015f828254611a6d9190615b68565b925050819055508060d55f828254611a859190615b1d565b90915550505f89815260cf602090815260408083206001600160a01b038a16845290915281208054909103611ada576001600160a01b0387165f90815260d2602052604090208054611ad7908c61406b565b90555b88815f015f828254611aec9190615b1d565b9250508190555082816001015f828254611b069190615b1d565b9091555050604080518a8152602081018590526001600160a01b0389169133918d917fd9900507c64720c1a5e11858a42769b599616268b832495aa6afe8b9dc566e76910160405180910390a4611b5b6139a1565b611b648a6141f8565b611b996001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c614471565b5050505050949350505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611bdb57611bd66144c9565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314611c14575f80fd5b611c1e8282614562565b5050565b5f611c2b613ba7565b60da54611c4090869060ff1660036002613be1565b611c4e8585858560016145c8565b9050611c586139a1565b611c8d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b949350505050565b5f80516020615f80833981519152611cac8161391e565b611cb4614952565b50565b5f611cc18161391e565b60d78290556040518281527f08b437f29bc93f50025290193a680338033c3fccb93cf0ef95788eba3f003e2690602001610e9f565b60df545f908015610f5a57610f55611d0c61378b565b849083613a07565b5f611d1d613ba7565b6001600160a01b0384163303611d46576040516344511af160e01b815260040160405180910390fd5b611d4e613928565b60dd5f828254611d5e9190615b1d565b909155505060405163042dcf6b60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063216e7b5890611db5903090869089908990600401615dd9565b602060405180830381865afa158015611dd0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df49190615d63565b9250825f03611e165760405163685e923560e01b815260040160405180910390fd5b6001600160a01b0384165f90815260d2602090815260409091206001810154909181901c9063ffffffff165b8115801590611e5057508515155b15611f5d576001821615611f42575f81421015611e8757611e748288898b5f6145c8565b9050611e808188615b68565b9650611f34565b5f82815260d0602090815260408083206001600160a01b038c168452909152812060018101548154611eb99190615b1d565b9150505f611ee060d6548542611ecf9190615b68565b611ed99190615b7b565b8390613894565b611eea9083615b1d565b9050888111611ef95788611f04565b611f04898383613876565b9250825f03611f15575f9850611f31565b611f2284848b8d5f6145c8565b9250611f2e838a615b68565b98505b50505b611f3e8186615b1d565b9450505b60019190911c90611f566224ea0082615b1d565b9050611e42565b50508315801590611f715750600281015415155b15611fa6575f611f808561327c565b90508015611fa4575f611f938288614994565b509050611fa08185615b1d565b9350505b505b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1b003130878a886040518563ffffffff1660e01b8152600401611ffa9493929190615dd9565b6040805180830381865afa158015612014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120389190615e03565b915091508160d55f82825461204d9190615b1d565b90915550612094905033306120628588615b1d565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614471565b306001600160a01b038616036120b5576120b030338984614af1565b61211a565b60405163b2a02ff160e01b81526001600160a01b0386169063b2a02ff1906120e59033908b908690600401615db5565b5f604051808303815f87803b1580156120fc575f80fd5b505af115801561210e573d5f803e3d5ffd5b5050505061211a6139a1565b60408051858152602081018490529081018290526001600160a01b03808716919089169033907f67bb48f97d82192848c24158abf58ec614777328e19655e0a219652b773fd1db9060600160405180910390a46040516311fd52e160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906311fd52e1906121b9908a906004016158da565b5f604051808303815f87803b1580156121d0575f80fd5b505af11580156121e2573d5f803e3d5ffd5b505050505050509392505050565b5f610e1e82610f37565b5f6122048161391e565b61220c614cd9565b60d883905560d982905560408051848152602081018490527fd09fee08a2915f9ac9a77197b21a3e275d34ec9542f569eb15b95ce8f7fe2808910160405180910390a1505050565b5f61225e8361386c565b9050805f0361226b575f80fd5b6122a06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086614471565b6122aa8282614d04565b60408051848152602081018390526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8382614d7a565b60df545f908015610f5a57610f5581610fe561378b565b5f8061231b613ba7565b6123258484614994565b90925090506123326139a1565b6123676001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085614471565b9250929050565b5f6123788161391e565b60e35460ff600160a01b90910416151582151514611c1e5760e38054831515600160a01b0260ff60a01b1990911617905560405133907f713eb400302cebac61f82eb8de5051d38458517ffac43ae45f4a9fd5d09ee698906123df90851515815260200190565b60405180910390a25050565b6123f3614dd9565b6123fb614e42565b565b5f6124078161391e565b60db546001600160a01b03161561242357612423611160613d7b565b60db80546001600160a01b0319166001600160a01b0384161790556124466139a1565b6040516001600160a01b038316907f7902cd1307c545e3f5782172612372bf997a93698917ced12b2f83d86e347d0c905f90a25050565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146124f0576040516317568c8f60e21b815260040160405180910390fd5b6124f8613928565b60dd5f8282546125089190615b1d565b90915550506001600160a01b0381165f90815260d260209081526040822060d55460018201549193909290919081901c9063ffffffff165b811561276c576001821615612751575f81815260d0602090815260408083206001600160a01b038a1684529091528120600181015481549192916125849190615b1d565b905080861061274e5760e3546001600160a01b031680156125f957604051636c912dad60e01b81526001600160a01b03821690636c912dad906125cb908c906004016158da565b5f604051808303815f87803b1580156125e2575f80fd5b505af11580156125f4573d5f803e3d5ffd5b505050505b6126038288615b68565b965061260f8287615b1d565b83545f86815260d1602052604081209298509161262b91614e7f565b905080156126c4578060d35f8282546126449190615b68565b909155505083545f906126739061265b9084614e9e565b5f88815260d160205260409020600201549084613876565b90508060d15f8881526020019081526020015f206002015f8282546126989190615b68565b925050819055508060d55f8282546126b09190615b1d565b909155506126c09050818a615b1d565b9850505b5f85815260d0602090815260408083206001600160a01b038e16845290915281208181556001908101919091558901546126fe9086614eb3565b60018a015560408051848152602081018590526001600160a01b038c1691339188917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a450505b50505b60019190911c906127656224ea0082615b1d565b9050612540565b60028501541580159061278957506127838461327c565b93508315155b156127aa575f6127998588614994565b5090506127a68185615b1d565b9350505b8215612805578260d55f8282546127c19190615b68565b90915550506040518381526001600160a01b038716907fde0e3a281fa92ee953a13c5bd96dcaf07b10c6b9f42c65d0e3752c855caa6e7c9060200160405180910390a25b61280d6139a1565b505050505050565b5f61281f8361300d565b90506128566001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084614471565b6128608284614d04565b60408051828152602081018590526001600160a01b0384169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3610e1e8184614d7a565b60ca8054610eb890615b30565b5f54610100900460ff16158080156128db57505f54600160ff909116105b806128f45750303b1580156128f457505f5460ff166001145b6128fc575f80fd5b5f805460ff19166001179055801561291d575f805461ff0019166101001790555b612925614f72565b61292d614f84565b60da805468ffffffffffffffff0019166101004263ffffffff1690810263ffffffff60281b191691909117600160281b82021763ffffffff60481b1916600160481b919091021790556129805f3361436b565b61298a8b8b611092565b6129938961185a565b61299c88610e24565b6129a5876123fd565b6129ae86612e41565b6129b785611cb7565b6129c084613737565b6129ca83836121fa565b8015612a0f575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b5f612a25613ba7565b845f03612a455760405163b8cb621960e01b815260040160405180910390fd5b60da54612a5a90879060ff1660036002613be1565b5f86815260d160205260409020612a72611160613d7b565b612a7c8188613ec6565b60dd5f828254612a8c9190615b1d565b90915550505f87815260cf602090815260408083206001600160a01b038716845282529182902082518084019093528054808452600190910154918301829052612ad69190615b1d565b871115612af15760208101518151612aee9190615b1d565b96505b6040805180820190915281518152602080830151908201525f90612b2190612b19908a614f9e565b518490614fe4565b60d354612b2e9190615b1d565b905060dd5460d45482612b419190615b1d565b1115612b5f57604051622d41ad60e31b815260040160405180910390fd5b60d35542881115612c71575f612b73610fed565b90505f60d45490505f60d35490505f60db5f9054906101000a90046001600160a01b03166001600160a01b031663d9d9048d8d60da5f9054906101000a900460ff16612bc78a600101548b5f01548a613f80565b612bd18989613fad565b612bdc8a8a8a613fc5565b6040518663ffffffff1660e01b8152600401612bfc959493929190615d3d565b602060405180830381865afa158015612c17573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c3b9190615d63565b9050612c66612c4d611360428f615b68565b612c5f90670de0b6b3a7640000615b1d565b8c90615028565b965050505050612c75565b8692505b85831015612c9657604051632c1b6b4160e21b815260040160405180910390fd5b612ca08484613ff5565b5f80612cec612cb7612cb2878c615b68565b614154565b604080516080810182528754815260018801546020820152600288015491810191909152600387015460608201529087614180565b9150915081846002015f828254612d039190615b1d565b90915550612d129050816141cc565b612d1c838a61503c565b5060208301518351175f03612d6f575f8a815260cf602090815260408083206001600160a01b038a168452825280832083815560010183905560d290915290208054612d68908c614eb3565b9055612d9f565b5f8a815260cf602090815260408083206001600160a01b038a168452825290912084518155908401516001909101555b856001600160a01b0316876001600160a01b03168b7fe57dbac0e7c42ad5f3b0fadb9c065565377cf771054fca70d35c96e01f9ec53c338d8a604051612de793929190615d7a565b60405180910390a4612df76139a1565b612e008a6141f8565b612e346001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168887614246565b5050505095945050505050565b5f612e4b8161391e565b60d68290556040518281527fdb0ebfb2503f7c16b45577ebbf6c7d6b99b6e8aaf6652b156e36d5d6654a3a5e90602001610e9f565b5f612e89613ba7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53033612ec3866121f0565b6040518463ffffffff1660e01b8152600401612ee193929190615db5565b5f6040518083038186803b158015612ef7575f80fd5b505afa158015612f09573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015612fd357604051630149e46f60e01b81526001600160a01b03821690630149e46f90612f4c9033906004016158da565b5f604051808303815f87803b158015612f63575f80fd5b505af1158015612f75573d5f803e3d5ffd5b5050604051630149e46f60e01b81526001600160a01b0384169250630149e46f9150612fa59087906004016158da565b5f604051808303815f87803b158015612fbc575f80fd5b505af1158015612fce573d5f803e3d5ffd5b505050505b611c8d848461509a565b5f80612fe7613ba7565b612325612ff38561327c565b84614994565b613001613ba7565b61193a33848484614af1565b60cb545f908015610f5a57610f55611d0c610d42565b60405163a3883db560e01b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a3883db59061307590309086908990600401615db5565b5f6040518083038186803b15801561308b575f80fd5b505afa15801561309d573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561310e57604051630149e46f60e01b81526001600160a01b03821690630149e46f906130e09086906004016158da565b5f604051808303815f87803b1580156130f7575f80fd5b505af1158015613109573d5f803e3d5ffd5b505050505b6131198585856150fd565b91506131236139a1565b509392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a3883db53084613166886121f0565b6040518463ffffffff1660e01b815260040161318493929190615db5565b5f6040518083038186803b15801561319a575f80fd5b505afa1580156131ac573d5f803e3d5ffd5b505060e3546001600160a01b0316915050801561321d57604051630149e46f60e01b81526001600160a01b03821690630149e46f906131ef9086906004016158da565b5f604051808303815f87803b158015613206575f80fd5b505af1158015613218573d5f803e3d5ffd5b505050505b6131198585856151f4565b5f6132328161391e565b60e380546001600160a01b0319166001600160a01b0384169081179091556040517fbe945f1688d0c44e4727dde3ee4f1f52c5263e6213e3d6321cf7804cbe33be3c905f90a25050565b60df545f908015610f5a57610f558161329361378b565b859190613876565b60cb545f908015610f5a57610f5581613293610d42565b6001600160a01b0381165f90815260cc6020526040812054610e1e90610f37565b428410156132df575f80fd5b5f60016132ea611ba6565b6001600160a01b038a81165f81815260ce602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156133f2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906134285750876001600160a01b0316816001600160a01b0316145b613430575f80fd5b6001600160a01b039081165f90815260cd602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b5f6134a1613ba7565b6134a9613bb6565b835f036134c95760405163774257f760e01b815260040160405180910390fd5b6134d38285613ff5565b60e3546001600160a01b0316801561353f57604051636c912dad60e01b81526001600160a01b03821690636c912dad906135119086906004016158da565b5f604051808303815f87803b158015613528575f80fd5b505af115801561353a573d5f803e3d5ffd5b505050505b61354a611160613d7b565b613553856122fa565b91505f8560d4546135649190615b1d565b60d481905560dc549091506135959061123e90600160801b90046001600160801b0316670de0b6b3a7640000615d1e565b8160d3546135a39190615b1d565b11156135c157604051622d41ad60e31b815260040160405180910390fd5b8260df5f8282546135d29190615b1d565b90915550506001600160a01b0384165f90815260d2602052604081206002018054859290613601908490615b1d565b909155505060408051878152602081018590526001600160a01b03808716929088169133917f96558a334f4759f0e7c423d68c84721860bd8fbf94ddc4e55158ecb125ad04b5910160405180910390a46136596139a1565b604051637b9d893160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637b9d8931906136a79030908890600401615d9b565b5f604051808303815f87803b1580156136be575f80fd5b505af11580156136d0573d5f803e3d5ffd5b5061370a9250506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690508688614246565b50509392505050565b5f8281526065602052604090206001015461372d8161391e565b61193a8383614562565b5f6137418161391e565b60dc80546001600160801b03808516600160801b0291161790556040517fc197c4ec4c97f824717acfad017c2a16643adc8874798a0899da42c6b5ebf9bf90610e9f9084906158ee565b60d45460dd5460da545f929190839061385890613851906137b990600160281b900463ffffffff1642615b68565b60db546301e13380906001600160a01b0316637c21fb1d6137da888a613fad565b6137e7898b60d354613fc5565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401602060405180830381865afa158015613826573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061384a9190615d63565b9190613876565b8490613894565b90506138648184615b1d565b935050505090565b5f610e1e8261329b565b82820281151584158583048514171661388d575f80fd5b0492915050565b5f610f5c8383670de0b6b3a7640000613876565b60da545f9081906138c490610100900463ffffffff1642615b68565b9050805f036138d4575f91505090565b60da54613918908290613904906138f2906224ea009060ff16615b7b565b60dc546001600160801b031690613894565b61390e9084615b1d565b60d5549190613876565b91505090565b611cb481336152f6565b5f6139316138a8565b90508060d55f8282546139449190615b68565b909155505060da805464ffffffff0019166101004263ffffffff811691909102919091179091556040519081527fe24d78f24f27ad7740c08c83f439e4c144df201bfd8f5c4c93e3e0898248b1bb9060200160405180910390a190565b60cb5460dd5460df5460d45460d5546040805142815260208101969096528501939093526060840191909152608083015260a08201527f7a71b92e3ef471c5ad18359e076f3df1c563d92e9ea1e33aa4761dbbc9b7ae409060c0015b60405180910390a1565b828202811515841585830485141716613a1e575f80fd5b6001826001830304018115150290509392505050565b5f680248ce36a70cb26b3e198213613a4d57505f919050565b680755bf798b4a1bf1e58212613a61575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60975460ff16156123fb575f80fd5b60e354600160a01b900460ff16156123fb5760405163b2ce2a9360e01b815260040160405180910390fd5b5f613bef6224ea0086615e25565b15613bfc57506001613c4f565b428511613c0b57506002613c4f565b613c1b60ff85166224ea00615b7b565b613c286224ea0042615e25565b613c329042615b68565b613c3c9190615b1d565b851115613c4b57506004613c4f565b5060035b826004811115613c6157613c61615e38565b816004811115613c7357613c73615e38565b14158015613ca35750816004811115613c8e57613c8e615e38565b816004811115613ca057613ca0615e38565b14155b15613d74575f826004811115613cbb57613cbb615e38565b03613d0f57806004811115613cd257613cd2615e38565b836004811115613ce457613ce4615e38565b604051631a71301d60e11b815260ff9283166004820152911660248201526044015b60405180910390fd5b806004811115613d2157613d21615e38565b836004811115613d3357613d33615e38565b836004811115613d4557613d45615e38565b604051637f2cef9960e01b815260ff938416600482015291831660248301529091166044820152606401613d06565b5050505050565b60d45460dd545f919082613d8f8284613fad565b60da549091505f90613de19061107890613db690600160281b900463ffffffff1642615b68565b60db5460d3546301e13380916001600160a01b031690637c21fb1d9088906137e7908b908d90613fc5565b9050613ded8185615b1d565b9350613e0460e2548261389490919063ffffffff16565b945084613e118285615b1d565b613e1b9190615b68565b60dd5560d484905560da805463ffffffff60281b1916600160281b4263ffffffff8116919091029190911790915560408051918252602082018490527f582b129106eba35020853cdae92ceb413a0227befcce433b67b23a630219b35f910160405180910390a15050505090565b8015611cb45760e154613ead906001600160a01b0316613ea88361386c565b614d04565b8060dd5f828254613ebe9190615b1d565b909155505050565b60038201545f9042831115613f1a5760028401544260038601819055613f0390613ef1908490615b68565b613efb8487615b68565b839190613876565b9250613f0f8382615b68565b600286015550613f3d565b828103613f29575f9150613f3d565b600384018390556002840180545f90915591505b5092915050565b81545f9081613f538483615b1d565b9050613f6c613f6683876001015461533c565b82614e9e565b613f769082615b68565b9455509192915050565b5f8115801590613f8f57508383115b613f99575f611c8d565b611c8d82613fa78686615b68565b9061534a565b5f825f03613fbb575f610f5c565b610f5c828461534a565b5f835f03613fd3575f611c8d565b611c8d84613fa78486615b1d565b5f610f5c8383670de0b6b3a7640000613a07565b336001600160a01b03831614611c1e576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461193a5761403982610fce565b6140439082615b68565b6001600160a01b0384165f90815260cd60209081526040808320338452909152902055505050565b5f825f036140805750600160201b8117610e1e565b63ffffffff8316808310156140fd575f6224ea0061409e8584615b68565b6140a89190615e4c565b90506140b681610100615b68565b85901c156140d75760405163293cc41f60e21b815260040160405180910390fd5b6140e2816020615b1d565b602086901c901b9450848417600160201b1792505050610e1e565b5f6224ea0061410c8386615b68565b6141169190615e4c565b905060df81111561413a5760405163293cc41f60e21b815260040160405180910390fd5b614145816020615b1d565b6001901b851792505050610e1e565b5f8061416b60e2548461389490919063ffffffff16565b905061417681613e89565b610f5c8184615b68565b5f8082156141b4576141af61419d6141978761535e565b85614e9e565b6141a79085615b68565b859085613876565b6141b6565b5f5b90506141c28185615b68565b9150935093915050565b805f036141d65750565b60e254156141e757611cb481613e89565b8060d55f828254613ebe9190615b1d565b5f81815260d160209081526040918290206002015482514281529182015282917fa2e6044136bec58e0605f40ac11a7bf87f1a8bdf3e2588b11b2cfae5acd9109f910160405180910390a250565b5f60405163a9059cbb60e01b5f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806110fd575f80fd5b6001600160a01b0383165f90815260cd602090815260408083203384529091528120545f1981146142ea576142c68382615b68565b6001600160a01b0386165f90815260cd602090815260408083203384529091529020555b6001600160a01b0385165f90815260cc602052604081208054859290614311908490615b68565b90915550506001600160a01b038085165f81815260cc6020526040908190208054870190555190918716905f80516020615fa0833981519152906143589087815260200190565b60405180910390a3506001949350505050565b614375828261247d565b611c1e575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556143ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f805f6143fc8661535e565b905080156144385761441d6144118683614e9e565b60408801519083613876565b92506144298385613894565b91506144358284615b68565b92505b50935093915050565b815460018301545f91906144558482615b1d565b60018601556118516144678383614e9e565b6141979084615b68565b5f6040516323b872dd60e01b5f526001600160a01b0385166004526001600160a01b0384166024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080613d74575f80fd5b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c96040516144fa9190615e5f565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b61456c828261247d565b15611c1e575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b5f845f036145e95760405163685e923560e01b815260040160405180910390fd5b5f86815260d160205260408120906146018289613ec6565b905061460e611160613d7b565b8060dd5f82825461461f9190615b1d565b90915550505f88815260d0602090815260408083206001600160a01b0389168452825280832081518083019092528054808352600190910154928201839052909291614675918b9161467091615b1d565b614e9e565b6040805180820190915283518152602080850151908201529091505f9061469c9083614f9e565b5160e3549091506001600160a01b0316801561470c57604051636c912dad60e01b81526001600160a01b03821690636c912dad906146de908c906004016158da565b5f604051808303815f87803b1580156146f5575f80fd5b505af1158015614707573d5f803e3d5ffd5b505050505b8b4210156147d45760d754604080516080810182528854815260018901546020820152600289015491810191909152600388015460608201525f9182916147549186906143f0565b90925090506147638183615b1d565b886002015f8282546147759190615b68565b909155505089156147a8578060d55f8282546147919190615b1d565b909155506147a190508286615b68565b98506147cd565b6147b28183615b1d565b60d55f8282546147c29190615b1d565b925050819055508498505b505061481b565b60d6546147ef906147e58e42615b68565b6138519190615b7b565b6147f99084615b1d565b96506148058388615b68565b60d55f8282546148159190615b1d565b90915550505b8987111561483c57604051632c1b6b4160e21b815260040160405180910390fd5b6148468683614e7f565b60d35f8282546148569190615b68565b909155506148669050848461503c565b5060208401518451175f036148c2575f8c815260d0602090815260408083206001600160a01b038d1684528252808320838155600190810184905560d2909252909120908101546148b7908e614eb3565b6001909101556148f2565b5f8c815260d0602090815260408083206001600160a01b038d168452825290912085518155908501516001909101555b60408051888152602081018590526001600160a01b038b169133918f917ff17fce321dd9fb005136a80c0bfb3789e455b7a70be9eb8922f1ad20a80d1a33910160405180910390a46149438c6141f8565b50505050505095945050505050565b61495a61537c565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516139fd91906158da565b60e3545f9081906001600160a01b03168015614a0457604051636c912dad60e01b81526001600160a01b03821690636c912dad906149d69087906004016158da565b5f604051808303815f87803b1580156149ed575f80fd5b505af11580156149ff573d5f803e3d5ffd5b505050505b614a0f611160613d7b565b6001600160a01b0384165f90815260d2602052604090206002810154614a358782614e9e565b9350614a4084611cf6565b9450845f03614a625760405163685e923560e01b815260040160405180910390fd5b8460d45f828254614a739190615b68565b90915550614a8390508482615b68565b82600201819055508360df5f828254614a9c9190615b68565b909155505060408051868152602081018690526001600160a01b0388169133917fe4a1ae657f49cb1fb1c7d3a94ae6093565c4c8c0e03de488f79c377c3c3a24e0910160405180910390a35050509250929050565b805f03614b115760405163b8cb621960e01b815260040160405180910390fd5b60405163070b773960e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e16ee72090614b5f9087903090600401615d9b565b5f6040518083038186803b158015614b75575f80fd5b505afa158015614b87573d5f803e3d5ffd5b505060e3546001600160a01b03169150508015614bf857604051630149e46f60e01b81526001600160a01b03821690630149e46f90614bca9086906004016158da565b5f604051808303815f87803b158015614be1575f80fd5b505af1158015614bf3573d5f803e3d5ffd5b505050505b5f614c0283610fce565b9050614c0e838261538a565b614c188482615403565b60408051848152602081018390526001600160a01b03808716929088169133915f80516020615f60833981519152910160405180910390a4836001600160a01b0316856001600160a01b03167f9e2db63c5a9dc5d08222447d76570029e4f2f3074c8aa4f1c511fa658506c71085604051614c9591815260200190565b60405180910390a3614ca56139a1565b61280d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168685614246565b614ce1610fed565b60de5560da805463ffffffff60481b1916600160481b4263ffffffff1602179055565b60e3546001600160a01b03168015614d7057604051630149e46f60e01b81526001600160a01b03821690630149e46f90614d429086906004016158da565b5f604051808303815f87803b158015614d59575f80fd5b505af1158015614d6b573d5f803e3d5ffd5b505050505b61193a838361546a565b614d82613ba7565b614d8a613bb6565b614d92614cd9565b5f614d9b613d7b565b90505f614da6613928565b9050614db28482615b1d565b60dd5f828254614dc29190615b1d565b90915550614dd1905082613e89565b6110fd6139a1565b614e037f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a633361247d565b158015614e245750614e225f80516020615f808339815191523361247d565b155b156123fb57604051631d006fdb60e31b815260040160405180910390fd5b614e4a613ba7565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586149873390565b815460018301545f9190614e938483615b68565b855561185161446783835b5f818310614eac5781610f5c565b5090919050565b5f821580614ec6575081600160201b1783145b15614ed257505f610e1e565b63ffffffff8316808303614f4057602184901c60015b60018216158015614ef857508115155b15614f0957600191821c9101614ee8565b6020614f158282615b1d565b9690961c90951b9485614f2b6224ea0083615b7b565b614f359087615b1d565b179350505050610e1e565b6224ea00614f4e8285615b68565b614f589190615e4c565b614f63906020615b1d565b6001901b198416915050610e1e565b5f54610100900460ff166123fb575f80fd5b5f54610100900460ff16614f96575f80fd5b6123fb6154b9565b604080518082019091525f8082526020820152825160208401515f91614fc8916132939082615b1d565b8085529050614fd78184615b68565b6020850152509192915050565b815460018301545f919082614ff98583615b68565b90506150058184614e9e565b61500f8385614e9e565b6150199190615b68565b60019096015550929392505050565b5f610f5c83670de0b6b3a764000084613876565b604080518082019091525f8082526020820152602083015183515f9161506191615b1d565b90505f61506e8483615b68565b855190915061507f90829084613876565b80865261508c9082615b68565b602086015250929392505050565b335f90815260cc60205260408120805483919083906150ba908490615b68565b90915550506001600160a01b0383165f81815260cc6020526040908190208054850190555133905f80516020615fa083398151915290610fbd9086815260200190565b5f61510784610fce565b9050336001600160a01b03831614615174576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f1981146151725761514e8282615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b61517e848261538a565b6151888282615403565b60408051858152602081018390526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486614246565b5f336001600160a01b03831614615260576001600160a01b0382165f90815260cd602090815260408083203384529091529020545f19811461525e5761523a8582615b68565b6001600160a01b0384165f90815260cd602090815260408083203384529091529020555b505b615269846121f0565b9050805f03615276575f80fd5b615280818561538a565b61528a8285615403565b60408051828152602081018690526001600160a01b03808516929086169133915f80516020615f60833981519152910160405180910390a4610f5c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614246565b615300828261247d565b611c1e5761530d816154d7565b6153188360206154e9565b604051602001615329929190615ee7565b6040516020818303038152906040525f80fd5b5f818311614eac5781610f5c565b5f610f5c83670de0b6b3a764000084613a07565b805160208201515f91906153728282614e9e565b611c8d9083615b68565b60975460ff166123fb575f80fd5b615392613ba7565b61539a614cd9565b6153a5611160613d7b565b5f6153ae613928565b90505f838260dd546153c09190615b1d565b6153ca9190615b68565b90508060d45460d3546153dd9190615b1d565b11156153fb57604051622d41ad60e31b815260040160405180910390fd5b60dd55505050565b6001600160a01b0382165f90815260cc60205260408120805483929061542a908490615b68565b909155505060cb805482900390556040518181525f906001600160a01b038416905f80516020615fa0833981519152906020015b60405180910390a35050565b8060cb5f82825461547b9190615b1d565b90915550506001600160a01b0382165f81815260cc60209081526040808320805486019055518481525f80516020615fa0833981519152910161545e565b5f54610100900460ff166154cb575f80fd5b6097805460ff19169055565b6060610e1e6001600160a01b03831660145b60605f6154f7836002615b7b565b615502906002615b1d565b6001600160401b0381111561551957615519615bee565b6040519080825280601f01601f191660200182016040528015615543576020820181803683370190505b509050600360fc1b815f8151811061555d5761555d615f36565b60200101906001600160f81b03191690815f1a905350600f60fb1b8160018151811061558b5761558b615f36565b60200101906001600160f81b03191690815f1a9053505f6155ad846002615b7b565b6155b8906001615b1d565b90505b600181111561562f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106155ec576155ec615f36565b1a60f81b82828151811061560257615602615f36565b60200101906001600160f81b03191690815f1a90535060049490941c9361562881615f4a565b90506155bb565b508315610f5c575f80fd5b6001600160a01b0381168114611cb4575f80fd5b5f6020828403121561565e575f80fd5b8135610f5c8161563a565b5f60208284031215615679575f80fd5b81356001600160e01b031981168114610f5c575f80fd5b80356001600160801b03811681146156a6575f80fd5b919050565b5f602082840312156156bb575f80fd5b610f5c82615690565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215615709575f80fd5b5035919050565b5f8060408385031215615721575f80fd5b823561572c8161563a565b946020939093013593505050565b5f8083601f84011261574a575f80fd5b5081356001600160401b03811115615760575f80fd5b602083019150836020828501011115612367575f80fd5b5f8060208385031215615788575f80fd5b82356001600160401b0381111561579d575f80fd5b6157a98582860161573a565b90969095509350505050565b5f805f805f60a086880312156157c9575f80fd5b85359450602086013593506040860135925060608601356157e98161563a565b915060808601356157f98161563a565b809150509295509295909350565b5f805f60608486031215615819575f80fd5b83356158248161563a565b925060208401356158348161563a565b929592945050506040919091013590565b803560ff811681146156a6575f80fd5b5f60208284031215615865575f80fd5b610f5c82615845565b5f806040838503121561587f575f80fd5b8235915060208301356158918161563a565b809150509250929050565b5f805f80608085870312156158af575f80fd5b84359350602085013592506040850135915060608501356158cf8161563a565b939692955090935050565b6001600160a01b0391909116815260200190565b6001600160801b0391909116815260200190565b5f805f60608486031215615914575f80fd5b833561591f8161563a565b92506020840135915060408401356159368161563a565b809150509250925092565b5f8060408385031215615952575f80fd5b50508035926020909101359150565b5f60208284031215615971575f80fd5b81358015158114610f5c575f80fd5b5f805f805f805f805f806101208b8d03121561599a575f80fd5b8a356001600160401b038111156159af575f80fd5b6159bb8d828e0161573a565b909b5099506159ce905060208c01615845565b97506159dc60408c01615690565b965060608b01356159ec8161563a565b955060808b0135945060a08b01359350615a0860c08c01615690565b999c989b50969995989497939650919460e0810135936101009091013592509050565b5f805f60608486031215615a3d575f80fd5b833592506020840135615a4f8161563a565b915060408401356159368161563a565b5f805f805f805f60e0888a031215615a75575f80fd5b8735615a808161563a565b96506020880135615a908161563a565b95506040880135945060608801359350615aac60808901615845565b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215615ada575f80fd5b8235615ae58161563a565b915060208301356158918161563a565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610e1e57610e1e615b09565b600181811c90821680615b4457607f821691505b602082108103615b6257634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610e1e57610e1e615b09565b8082028115828204841417610e1e57610e1e615b09565b5f600160ff1b8201615ba657615ba6615b09565b505f0390565b8181035f831280158383131683831282161715613f3d57613f3d615b09565b67032bc30b1ba363c960c51b8152818360088301375f9101600801908152919050565b634e487b7160e01b5f52604160045260245ffd5b601f82111561193a57805f5260205f20601f840160051c81016020851015615c275750805b601f840160051c820191505b81811015613d74575f8155600101615c33565b81516001600160401b03811115615c5f57615c5f615bee565b615c7381615c6d8454615b30565b84615c02565b6020601f821160018114615ca5575f8315615c8e5750848201515b5f19600385901b1c1916600184901b178455613d74565b5f84815260208120601f198516915b82811015615cd45787850151825560209485019460019092019101615cb4565b5084821015615cf157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b6265786160e81b8152818360038301375f9101600301908152919050565b6001600160801b038281168282160390811115610e1e57610e1e615b09565b94855260ff93909316602085015260408401919091526060830152608082015260a00190565b5f60208284031215615d73575f80fd5b5051919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b5f8060408385031215615e14575f80fd5b505080516020909101519092909150565b5f82615e3357615e33615af5565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f82615e5a57615e5a615af5565b500490565b5f808354615e6c81615b30565b600182168015615e835760018114615e9857615ec5565b60ff1983168652811515820286019350615ec5565b865f5260205f205f5b83811015615ebd57815488820152600190910190602001615ea1565b505081860193505b509195945050505050565b5f81518060208401855e5f93019283525090919050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81525f615f126017830185615ed0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526118516011820185615ed0565b634e487b7160e01b5f52603260045260245ffd5b5f81615f5857615f58615b09565b505f19019056fefbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122005ec196d152ea67004b2106a9e8456d6fce9e4ca698150d3a643ce4c0c94880d64736f6c634300081a0033", "storageLayout": { "storage": [ { - "astId": 543, + "astId": 416, "contract": "contracts/Market.sol:Market", "label": "_initialized", "offset": 0, @@ -3528,7 +2785,7 @@ "type": "t_uint8" }, { - "astId": 546, + "astId": 419, "contract": "contracts/Market.sol:Market", "label": "_initializing", "offset": 1, @@ -3536,7 +2793,7 @@ "type": "t_bool" }, { - "astId": 3288, + "astId": 1086, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3544,7 +2801,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 4287, + "astId": 1360, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3568,7 +2825,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 727, + "astId": 600, "contract": "contracts/Market.sol:Market", "label": "_paused", "offset": 0, @@ -3576,7 +2833,7 @@ "type": "t_bool" }, { - "astId": 832, + "astId": 705, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3584,7 +2841,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 35688, + "astId": 16118, "contract": "contracts/Market.sol:Market", "label": "name", "offset": 0, @@ -3592,7 +2849,7 @@ "type": "t_string_storage" }, { - "astId": 35690, + "astId": 16120, "contract": "contracts/Market.sol:Market", "label": "symbol", "offset": 0, @@ -3600,7 +2857,7 @@ "type": "t_string_storage" }, { - "astId": 35694, + "astId": 16124, "contract": "contracts/Market.sol:Market", "label": "totalSupply", "offset": 0, @@ -3608,7 +2865,7 @@ "type": "t_uint256" }, { - "astId": 35698, + "astId": 16128, "contract": "contracts/Market.sol:Market", "label": "balanceOf", "offset": 0, @@ -3616,7 +2873,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 35704, + "astId": 16134, "contract": "contracts/Market.sol:Market", "label": "allowance", "offset": 0, @@ -3624,7 +2881,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 35712, + "astId": 16142, "contract": "contracts/Market.sol:Market", "label": "nonces", "offset": 0, @@ -3632,39 +2889,39 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 15178, + "astId": 7382, "contract": "contracts/Market.sol:Market", "label": "fixedDepositPositions", "offset": 0, "slot": "207", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))" }, { - "astId": 15186, + "astId": 7390, "contract": "contracts/Market.sol:Market", "label": "fixedBorrowPositions", "offset": 0, "slot": "208", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))" }, { - "astId": 15192, + "astId": 7396, "contract": "contracts/Market.sol:Market", "label": "fixedPools", "offset": 0, "slot": "209", - "type": "t_mapping(t_uint256,t_struct(Pool)35048_storage)" + "type": "t_mapping(t_uint256,t_struct(Pool)15534_storage)" }, { - "astId": 15198, + "astId": 7402, "contract": "contracts/Market.sol:Market", "label": "accounts", "offset": 0, "slot": "210", - "type": "t_mapping(t_address,t_struct(Account)19124_storage)" + "type": "t_mapping(t_address,t_struct(Account)11401_storage)" }, { - "astId": 15201, + "astId": 7405, "contract": "contracts/Market.sol:Market", "label": "floatingBackupBorrowed", "offset": 0, @@ -3672,7 +2929,7 @@ "type": "t_uint256" }, { - "astId": 15204, + "astId": 7408, "contract": "contracts/Market.sol:Market", "label": "floatingDebt", "offset": 0, @@ -3680,7 +2937,7 @@ "type": "t_uint256" }, { - "astId": 15207, + "astId": 7411, "contract": "contracts/Market.sol:Market", "label": "earningsAccumulator", "offset": 0, @@ -3688,7 +2945,7 @@ "type": "t_uint256" }, { - "astId": 15210, + "astId": 7414, "contract": "contracts/Market.sol:Market", "label": "penaltyRate", "offset": 0, @@ -3696,7 +2953,7 @@ "type": "t_uint256" }, { - "astId": 15213, + "astId": 7417, "contract": "contracts/Market.sol:Market", "label": "backupFeeRate", "offset": 0, @@ -3704,7 +2961,7 @@ "type": "t_uint256" }, { - "astId": 15216, + "astId": 7420, "contract": "contracts/Market.sol:Market", "label": "dampSpeedUp", "offset": 0, @@ -3712,7 +2969,7 @@ "type": "t_uint256" }, { - "astId": 15219, + "astId": 7423, "contract": "contracts/Market.sol:Market", "label": "dampSpeedDown", "offset": 0, @@ -3720,7 +2977,7 @@ "type": "t_uint256" }, { - "astId": 15222, + "astId": 7426, "contract": "contracts/Market.sol:Market", "label": "maxFuturePools", "offset": 0, @@ -3728,7 +2985,7 @@ "type": "t_uint8" }, { - "astId": 15225, + "astId": 7429, "contract": "contracts/Market.sol:Market", "label": "lastAccumulatorAccrual", "offset": 1, @@ -3736,7 +2993,7 @@ "type": "t_uint32" }, { - "astId": 15228, + "astId": 7432, "contract": "contracts/Market.sol:Market", "label": "lastFloatingDebtUpdate", "offset": 5, @@ -3744,7 +3001,7 @@ "type": "t_uint32" }, { - "astId": 15231, + "astId": 7435, "contract": "contracts/Market.sol:Market", "label": "lastAverageUpdate", "offset": 9, @@ -3752,15 +3009,15 @@ "type": "t_uint32" }, { - "astId": 15235, + "astId": 7439, "contract": "contracts/Market.sol:Market", "label": "interestRateModel", "offset": 0, "slot": "219", - "type": "t_contract(InterestRateModel)15062" + "type": "t_contract(InterestRateModel)7266" }, { - "astId": 15238, + "astId": 7442, "contract": "contracts/Market.sol:Market", "label": "earningsAccumulatorSmoothFactor", "offset": 0, @@ -3768,7 +3025,7 @@ "type": "t_uint128" }, { - "astId": 15241, + "astId": 7445, "contract": "contracts/Market.sol:Market", "label": "reserveFactor", "offset": 16, @@ -3776,7 +3033,7 @@ "type": "t_uint128" }, { - "astId": 15244, + "astId": 7448, "contract": "contracts/Market.sol:Market", "label": "floatingAssets", "offset": 0, @@ -3784,7 +3041,7 @@ "type": "t_uint256" }, { - "astId": 15247, + "astId": 7451, "contract": "contracts/Market.sol:Market", "label": "floatingAssetsAverage", "offset": 0, @@ -3792,7 +3049,7 @@ "type": "t_uint256" }, { - "astId": 15250, + "astId": 7454, "contract": "contracts/Market.sol:Market", "label": "totalFloatingBorrowShares", "offset": 0, @@ -3800,7 +3057,7 @@ "type": "t_uint256" }, { - "astId": 15253, + "astId": 7457, "contract": "contracts/Market.sol:Market", "label": "__gap", "offset": 0, @@ -3808,7 +3065,7 @@ "type": "t_uint256" }, { - "astId": 15256, + "astId": 7460, "contract": "contracts/Market.sol:Market", "label": "treasury", "offset": 0, @@ -3816,7 +3073,7 @@ "type": "t_address" }, { - "astId": 15259, + "astId": 7463, "contract": "contracts/Market.sol:Market", "label": "treasuryFeeRate", "offset": 0, @@ -3824,15 +3081,15 @@ "type": "t_uint256" }, { - "astId": 15263, + "astId": 7467, "contract": "contracts/Market.sol:Market", "label": "rewardsController", "offset": 0, "slot": "227", - "type": "t_contract(RewardsController)23082" + "type": "t_contract(RewardsController)14682" }, { - "astId": 15266, + "astId": 7470, "contract": "contracts/Market.sol:Market", "label": "isFrozen", "offset": 20, @@ -3868,12 +3125,12 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(InterestRateModel)15062": { + "t_contract(InterestRateModel)7266": { "encoding": "inplace", "label": "contract InterestRateModel", "numberOfBytes": "20" }, - "t_contract(RewardsController)23082": { + "t_contract(RewardsController)14682": { "encoding": "inplace", "label": "contract RewardsController", "numberOfBytes": "20" @@ -3892,19 +3149,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_uint256)" }, - "t_mapping(t_address,t_struct(Account)19124_storage)": { + "t_mapping(t_address,t_struct(Account)11401_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct Market.Account)", "numberOfBytes": "32", - "value": "t_struct(Account)19124_storage" + "value": "t_struct(Account)11401_storage" }, - "t_mapping(t_address,t_struct(Position)35054_storage)": { + "t_mapping(t_address,t_struct(Position)15540_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct FixedLib.Position)", "numberOfBytes": "32", - "value": "t_struct(Position)35054_storage" + "value": "t_struct(Position)15540_storage" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -3920,31 +3177,31 @@ "numberOfBytes": "32", "value": "t_struct(RoleData)23_storage" }, - "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)35054_storage))": { + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Position)15540_storage))": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => mapping(address => struct FixedLib.Position))", "numberOfBytes": "32", - "value": "t_mapping(t_address,t_struct(Position)35054_storage)" + "value": "t_mapping(t_address,t_struct(Position)15540_storage)" }, - "t_mapping(t_uint256,t_struct(Pool)35048_storage)": { + "t_mapping(t_uint256,t_struct(Pool)15534_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct FixedLib.Pool)", "numberOfBytes": "32", - "value": "t_struct(Pool)35048_storage" + "value": "t_struct(Pool)15534_storage" }, "t_string_storage": { "encoding": "bytes", "label": "string", "numberOfBytes": "32" }, - "t_struct(Account)19124_storage": { + "t_struct(Account)11401_storage": { "encoding": "inplace", "label": "struct Market.Account", "members": [ { - "astId": 19119, + "astId": 11396, "contract": "contracts/Market.sol:Market", "label": "fixedDeposits", "offset": 0, @@ -3952,7 +3209,7 @@ "type": "t_uint256" }, { - "astId": 19121, + "astId": 11398, "contract": "contracts/Market.sol:Market", "label": "fixedBorrows", "offset": 0, @@ -3960,7 +3217,7 @@ "type": "t_uint256" }, { - "astId": 19123, + "astId": 11400, "contract": "contracts/Market.sol:Market", "label": "floatingBorrowShares", "offset": 0, @@ -3970,12 +3227,12 @@ ], "numberOfBytes": "96" }, - "t_struct(Pool)35048_storage": { + "t_struct(Pool)15534_storage": { "encoding": "inplace", "label": "struct FixedLib.Pool", "members": [ { - "astId": 35041, + "astId": 15527, "contract": "contracts/Market.sol:Market", "label": "borrowed", "offset": 0, @@ -3983,7 +3240,7 @@ "type": "t_uint256" }, { - "astId": 35043, + "astId": 15529, "contract": "contracts/Market.sol:Market", "label": "supplied", "offset": 0, @@ -3991,7 +3248,7 @@ "type": "t_uint256" }, { - "astId": 35045, + "astId": 15531, "contract": "contracts/Market.sol:Market", "label": "unassignedEarnings", "offset": 0, @@ -3999,7 +3256,7 @@ "type": "t_uint256" }, { - "astId": 35047, + "astId": 15533, "contract": "contracts/Market.sol:Market", "label": "lastAccrual", "offset": 0, @@ -4009,12 +3266,12 @@ ], "numberOfBytes": "128" }, - "t_struct(Position)35054_storage": { + "t_struct(Position)15540_storage": { "encoding": "inplace", "label": "struct FixedLib.Position", "members": [ { - "astId": 35051, + "astId": 15537, "contract": "contracts/Market.sol:Market", "label": "principal", "offset": 0, @@ -4022,7 +3279,7 @@ "type": "t_uint256" }, { - "astId": 35053, + "astId": 15539, "contract": "contracts/Market.sol:Market", "label": "fee", "offset": 0, diff --git a/deployments/optimism/RewardsController.json b/deployments/optimism/RewardsController.json index 8224cc37..1d64922d 100644 --- a/deployments/optimism/RewardsController.json +++ b/deployments/optimism/RewardsController.json @@ -50,76 +50,6 @@ "stateMutability": "payable", "type": "fallback" }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "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" @@ -134,6 +64,11 @@ "name": "InvalidConfig", "type": "error" }, + { + "inputs": [], + "name": "NotKeeper", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -713,7 +648,7 @@ }, { "internalType": "uint256[]", - "name": "claimedAmounts", + "name": "", "type": "uint256[]" } ], @@ -744,6 +679,52 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "components": [ + { + "internalType": "contract Market", + "name": "market", + "type": "address" + }, + { + "internalType": "bool[]", + "name": "operations", + "type": "bool[]" + } + ], + "internalType": "struct RewardsController.MarketOperation[]", + "name": "marketOps", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "contract ERC20[]", + "name": "rewardsList", + "type": "address[]" + } + ], + "name": "claimOnBehalfOf", + "outputs": [ + { + "internalType": "contract ERC20[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1022,6 +1003,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "keepers", + "outputs": [ + { + "internalType": "address", + "name": "keeper", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1303,6 +1303,24 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "keeper", + "type": "address" + } + ], + "name": "setKeeper", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1436,12 +1454,12 @@ "0xfBa759BCd1a99a7724c5068FEddb4F5b844b941A", "0x8129fc1c" ], - "numDeployments": 4, + "numDeployments": 5, "solcInputHash": "d84b642715e2afb0ff40e55838571f1c", "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"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\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"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.\",\"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`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"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\":{\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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.5.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 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(\\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(\\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\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"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/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../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 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(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) 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 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 Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\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\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 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(\\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 (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\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 /// @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\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405260405162000b5038038062000b5083398101604081905262000026916200038b565b828162000036828260006200004d565b50620000449050826200008a565b50505062000489565b6200005883620000e5565b600082511180620000665750805b1562000085576200008383836200012760201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000b562000156565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e2816200018f565b50565b620000f081620001ed565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200014f838360405180606001604052806027815260200162000b296027913962000247565b9392505050565b60006200018060008051602062000b0983398151915260001b620002c660201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b038116620001a357600080fd5b80620001cc60008051602062000b0983398151915260001b620002c660201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200020381620002c960201b6200025a1760201c565b6200020d57600080fd5b80620001cc7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b620002c660201b620001ea1760201c565b6060600080856001600160a01b0316856040516200026691906200046b565b600060405180830381855af49150503d8060008114620002a3576040519150601f19603f3d011682016040523d82523d6000602084013e620002a8565b606091505b509092509050620002bc86838387620002d8565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200030857825160000362000300576001600160a01b0385163b6200030057600080fd5b508162000314565b6200031483836200031c565b949350505050565b8151156200032d5781518083602001fd5b600080fd5b80516001600160a01b03811681146200034a57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200038257818101518382015260200162000368565b50506000910152565b600080600060608486031215620003a157600080fd5b620003ac8462000332565b9250620003bc6020850162000332565b60408501519092506001600160401b0380821115620003da57600080fd5b818601915086601f830112620003ef57600080fd5b8151818111156200040457620004046200034f565b604051601f8201601f19908116603f011681019083821181831017156200042f576200042f6200034f565b816040528281528960208487010111156200044957600080fd5b6200045c83602083016020880162000365565b80955050505050509250925092565b600082516200047f81846020870162000365565b9190910192915050565b61067080620004996000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b610080366004610546565b610118565b61005b610093366004610561565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e4366004610546565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b610116610111610285565b61028f565b565b6101206102b3565b6001600160a01b0316330361014d5761014a816040518060200160405280600081525060006102e6565b50565b61014a6100fe565b61015d6102b3565b6001600160a01b031633036101b4576101af8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506102e6915050565b505050565b6101af6100fe565b60006101c66102b3565b6001600160a01b031633036101e2576101dd610285565b905090565b6101ea6100fe565b90565b6101f56102b3565b6001600160a01b0316330361014d5761014a81610311565b60006102176102b3565b6001600160a01b031633036101e2576101dd6102b3565b6060610253838360405180606001604052806027815260200161061460279139610365565b9392505050565b6001600160a01b03163b151590565b6102716102b3565b6001600160a01b0316330361011657600080fd5b60006101dd6103dd565b3660008037600080366000845af43d6000803e8080156102ae573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6102ef83610405565b6000825111806102fc5750805b156101af5761030b838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61033a6102b3565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610445565b6060600080856001600160a01b03168560405161038291906105e4565b600060405180830381855af49150503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091506103d38683838761049c565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6102d7565b61040e816104da565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661045857600080fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156104c85782516000036104c1576001600160a01b0385163b6104c157600080fd5b50816104d2565b6104d28383610515565b949350505050565b6001600160a01b0381163b6104ee57600080fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61047b565b8151156105255781518083602001fd5b600080fd5b80356001600160a01b038116811461054157600080fd5b919050565b60006020828403121561055857600080fd5b6102538261052a565b60008060006040848603121561057657600080fd5b61057f8461052a565b9250602084013567ffffffffffffffff8082111561059c57600080fd5b818601915086601f8301126105b057600080fd5b8135818111156105bf57600080fd5b8760208285010111156105d157600080fd5b6020830194508093505050509250925092565b6000825160005b8181101561060557602081860181015185830152016105eb565b50600092019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203011748945e626a6c7d6bd1969f4e5640e829c89504a5d4e52671d90f482851564736f6c63430008110033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "deployedBytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b610080366004610546565b610118565b61005b610093366004610561565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e4366004610546565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b610116610111610285565b61028f565b565b6101206102b3565b6001600160a01b0316330361014d5761014a816040518060200160405280600081525060006102e6565b50565b61014a6100fe565b61015d6102b3565b6001600160a01b031633036101b4576101af8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506102e6915050565b505050565b6101af6100fe565b60006101c66102b3565b6001600160a01b031633036101e2576101dd610285565b905090565b6101ea6100fe565b90565b6101f56102b3565b6001600160a01b0316330361014d5761014a81610311565b60006102176102b3565b6001600160a01b031633036101e2576101dd6102b3565b6060610253838360405180606001604052806027815260200161061460279139610365565b9392505050565b6001600160a01b03163b151590565b6102716102b3565b6001600160a01b0316330361011657600080fd5b60006101dd6103dd565b3660008037600080366000845af43d6000803e8080156102ae573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6102ef83610405565b6000825111806102fc5750805b156101af5761030b838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61033a6102b3565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610445565b6060600080856001600160a01b03168560405161038291906105e4565b600060405180830381855af49150503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091506103d38683838761049c565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6102d7565b61040e816104da565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661045857600080fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156104c85782516000036104c1576001600160a01b0385163b6104c157600080fd5b50816104d2565b6104d28383610515565b949350505050565b6001600160a01b0381163b6104ee57600080fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61047b565b8151156105255781518083602001fd5b600080fd5b80356001600160a01b038116811461054157600080fd5b919050565b60006020828403121561055857600080fd5b6102538261052a565b60008060006040848603121561057657600080fd5b61057f8461052a565b9250602084013567ffffffffffffffff8082111561059c57600080fd5b818601915086601f8301126105b057600080fd5b8135818111156105bf57600080fd5b8760208285010111156105d157600080fd5b6020830194508093505050509250925092565b6000825160005b8181101561060557602081860181015185830152016105eb565b50600092019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203011748945e626a6c7d6bd1969f4e5640e829c89504a5d4e52671d90f482851564736f6c63430008110033", - "implementation": "0x0B9d4AB484F95090074008aE59db1fAb6606Bc7A", + "implementation": "0x59611c1E363e76E85f246Dd26A821b324841930F", "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.", "kind": "dev", diff --git a/deployments/optimism/RewardsController_Implementation.json b/deployments/optimism/RewardsController_Implementation.json index e0ee73b6..a386a9bc 100644 --- a/deployments/optimism/RewardsController_Implementation.json +++ b/deployments/optimism/RewardsController_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x0B9d4AB484F95090074008aE59db1fAb6606Bc7A", + "address": "0x59611c1E363e76E85f246Dd26A821b324841930F", "abi": [ { "inputs": [], @@ -16,6 +16,11 @@ "name": "InvalidConfig", "type": "error" }, + { + "inputs": [], + "name": "NotKeeper", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -595,7 +600,7 @@ }, { "internalType": "uint256[]", - "name": "claimedAmounts", + "name": "", "type": "uint256[]" } ], @@ -626,6 +631,52 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "components": [ + { + "internalType": "contract Market", + "name": "market", + "type": "address" + }, + { + "internalType": "bool[]", + "name": "operations", + "type": "bool[]" + } + ], + "internalType": "struct RewardsController.MarketOperation[]", + "name": "marketOps", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "contract ERC20[]", + "name": "rewardsList", + "type": "address[]" + } + ], + "name": "claimOnBehalfOf", + "outputs": [ + { + "internalType": "contract ERC20[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -904,6 +955,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "keepers", + "outputs": [ + { + "internalType": "address", + "name": "keeper", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1185,6 +1255,24 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "keeper", + "type": "address" + } + ], + "name": "setKeeper", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1223,41 +1311,41 @@ "type": "function" } ], - "transactionHash": "0xe189f1005ae82d4fdd886c00a03577f3f5ad06de9db22f26327c0a4ef9af1df3", + "transactionHash": "0x535d5c5df657e670e18799ca31c93180e9fee0c74c48ffe22b64b4c1bde156ab", "receipt": { "to": null, "from": "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", - "contractAddress": "0x0B9d4AB484F95090074008aE59db1fAb6606Bc7A", + "contractAddress": "0x59611c1E363e76E85f246Dd26A821b324841930F", "transactionIndex": 7, - "gasUsed": "4341905", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000004000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x74335087734cdfe79b39b164b2245d04d1c85dc0723330d8a4e4e25b38b5f5d3", - "transactionHash": "0xe189f1005ae82d4fdd886c00a03577f3f5ad06de9db22f26327c0a4ef9af1df3", + "gasUsed": "4538874", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000800000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000", + "blockHash": "0x1752bf4d8d01aa5a8e424d4c6bf41f87db4ed9066f5b1a3e50a47bdf023cd78e", + "transactionHash": "0x535d5c5df657e670e18799ca31c93180e9fee0c74c48ffe22b64b4c1bde156ab", "logs": [ { "transactionIndex": 7, - "blockNumber": 107367073, - "transactionHash": "0xe189f1005ae82d4fdd886c00a03577f3f5ad06de9db22f26327c0a4ef9af1df3", - "address": "0x0B9d4AB484F95090074008aE59db1fAb6606Bc7A", + "blockNumber": 124901137, + "transactionHash": "0x535d5c5df657e670e18799ca31c93180e9fee0c74c48ffe22b64b4c1bde156ab", + "address": "0x59611c1E363e76E85f246Dd26A821b324841930F", "topics": [ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" ], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 27, - "blockHash": "0x74335087734cdfe79b39b164b2245d04d1c85dc0723330d8a4e4e25b38b5f5d3" + "logIndex": 39, + "blockHash": "0x1752bf4d8d01aa5a8e424d4c6bf41f87db4ed9066f5b1a3e50a47bdf023cd78e" } ], - "blockNumber": 107367073, - "cumulativeGasUsed": "5849624", + "blockNumber": 124901137, + "cumulativeGasUsed": "5575383", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 3, - "solcInputHash": "8f9fc1d65cbd21932a45ce808391a06a", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"IndexOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"operation\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"operationIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rewardsAccrued\",\"type\":\"uint256\"}],\"name\":\"Accrue\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"contract IPriceFeed\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"start\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"distributionPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"targetDebt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalDistribution\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"undistributedFactor\",\"type\":\"uint256\"},{\"internalType\":\"int128\",\"name\":\"flipSpeed\",\"type\":\"int128\"},{\"internalType\":\"uint64\",\"name\":\"compensationFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"transitionFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"borrowAllocationWeightFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositAllocationWeightAddend\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositAllocationWeightFactor\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct RewardsController.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DistributionSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newUndistributed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastUpdate\",\"type\":\"uint256\"}],\"name\":\"IndexUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UTILIZATION_CAP\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"operation\",\"type\":\"bool\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"accountOperation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"allClaimable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"unclaimedRewards\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allMarketsOperations\",\"outputs\":[{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"bool[]\",\"name\":\"operations\",\"type\":\"bool[]\"}],\"internalType\":\"struct RewardsController.MarketOperation[]\",\"name\":\"marketOps\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allRewards\",\"outputs\":[{\"internalType\":\"contract ERC20[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"}],\"name\":\"availableRewardsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"bool[]\",\"name\":\"operations\",\"type\":\"bool[]\"}],\"internalType\":\"struct RewardsController.MarketOperation[]\",\"name\":\"marketOps\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"contract ERC20[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct ClaimPermit\",\"name\":\"permit\",\"type\":\"tuple\"}],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"contract ERC20[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"claimedAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"bool[]\",\"name\":\"operations\",\"type\":\"bool[]\"}],\"internalType\":\"struct RewardsController.MarketOperation[]\",\"name\":\"marketOps\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract ERC20[]\",\"name\":\"rewardsList\",\"type\":\"address[]\"}],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"contract ERC20[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"claimedAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"claimAll\",\"outputs\":[{\"internalType\":\"contract ERC20[]\",\"name\":\"rewardsList\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"claimedAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"bool[]\",\"name\":\"operations\",\"type\":\"bool[]\"}],\"internalType\":\"struct RewardsController.MarketOperation[]\",\"name\":\"marketOps\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"claimable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"unclaimedRewards\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"contract IPriceFeed\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"start\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"distributionPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"targetDebt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalDistribution\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"undistributedFactor\",\"type\":\"uint256\"},{\"internalType\":\"int128\",\"name\":\"flipSpeed\",\"type\":\"int128\"},{\"internalType\":\"uint64\",\"name\":\"compensationFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"transitionFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"borrowAllocationWeightFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositAllocationWeightAddend\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositAllocationWeightFactor\",\"type\":\"uint64\"}],\"internalType\":\"struct RewardsController.Config[]\",\"name\":\"configs\",\"type\":\"tuple[]\"}],\"name\":\"config\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Market\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"distribution\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"availableRewardsCount\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"baseUnit\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"distributionTime\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"handleBorrow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"handleDeposit\",\"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\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"marketList\",\"outputs\":[{\"internalType\":\"contract Market\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deltaTime\",\"type\":\"uint256\"}],\"name\":\"previewAllocation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depositIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newUndistributed\",\"type\":\"uint256\"}],\"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\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"rewardConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"contract IPriceFeed\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"start\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"distributionPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"targetDebt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalDistribution\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"undistributedFactor\",\"type\":\"uint256\"},{\"internalType\":\"int128\",\"name\":\"flipSpeed\",\"type\":\"int128\"},{\"internalType\":\"uint64\",\"name\":\"compensationFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"transitionFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"borrowAllocationWeightFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositAllocationWeightAddend\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositAllocationWeightFactor\",\"type\":\"uint64\"}],\"internalType\":\"struct RewardsController.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewardEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"rewardIndexes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rewardList\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Accrue(address,address,address,bool,uint256,uint256,uint256)\":{\"params\":{\"account\":\"account that accrued the rewards.\",\"accountIndex\":\"previous account index.\",\"market\":\"Market where the operation was made.\",\"operation\":\"true if the operation was a borrow, false if it was a deposit.\",\"operationIndex\":\"new operation index that is assigned to the `accountIndex`.\",\"reward\":\"reward asset.\",\"rewardsAccrued\":\"amount of rewards accrued.\"}},\"Claim(address,address,address,uint256)\":{\"params\":{\"account\":\"account that claimed the rewards.\",\"amount\":\"amount of rewards claimed.\",\"reward\":\"reward asset.\",\"to\":\"account that received the rewards.\"}},\"DistributionSet(address,address,(address,address,address,uint32,uint256,uint256,uint256,uint256,int128,uint64,uint64,uint64,uint64,uint64))\":{\"params\":{\"config\":\"configuration struct containing the distribution parameters.\",\"market\":\"Market whose distribution was set.\",\"reward\":\"reward asset to be distributed when operating with the Market.\"}},\"IndexUpdate(address,address,uint256,uint256,uint256,uint256)\":{\"params\":{\"borrowIndex\":\"index of the borrow operations of a distribution.\",\"depositIndex\":\"index of the deposit operations of a distribution.\",\"lastUpdate\":\"current timestamp.\",\"market\":\"Market of the distribution.\",\"newUndistributed\":\"amount of undistributed rewards.\",\"reward\":\"reward asset.\"}}},\"kind\":\"dev\",\"methods\":{\"accountOperation(address,address,bool,address)\":{\"params\":{\"account\":\"The account to get the operation data from.\",\"market\":\"The market in which the operation was made.\",\"operation\":\"True if the operation was a borrow, false if it was a deposit.\",\"reward\":\"The reward asset.\"},\"returns\":{\"_0\":\"accrued The accrued amount.\",\"_1\":\"index The account index.\"}},\"allClaimable(address,address)\":{\"params\":{\"account\":\"The account to get the claimable amount for.\",\"reward\":\"The reward asset.\"},\"returns\":{\"unclaimedRewards\":\"The claimable amount for the given account.\"}},\"allMarketsOperations()\":{\"returns\":{\"marketOps\":\"The list of market operations.\"}},\"availableRewardsCount(address)\":{\"params\":{\"market\":\"Market to get the number of available rewards to distribute.\"},\"returns\":{\"_0\":\"The amount reward assets set to a Market.\"}},\"claim((address,bool[])[],(address,address[],uint256,uint8,bytes32,bytes32))\":{\"params\":{\"marketOps\":\"The operations to claim rewards for.\",\"permit\":\"Arguments and signature from `permit.owner`.\"},\"returns\":{\"_0\":\"rewardsList The list of rewards assets.\",\"claimedAmounts\":\"The list of claimed amounts.\"}},\"claim((address,bool[])[],address,address[])\":{\"params\":{\"marketOps\":\"The operations to claim rewards for.\",\"rewardsList\":\"The list of rewards assets to claim.\",\"to\":\"The address to send the rewards to.\"},\"returns\":{\"_0\":\"rewardsList The list of rewards assets.\",\"claimedAmounts\":\"The list of claimed amounts.\"}},\"claimAll(address)\":{\"params\":{\"to\":\"The address to send the rewards to.\"},\"returns\":{\"claimedAmounts\":\"The list of claimed amounts.\",\"rewardsList\":\"The list of rewards assets.\"}},\"claimable((address,bool[])[],address,address)\":{\"params\":{\"account\":\"The account to get the claimable amount for.\",\"marketOps\":\"The list of Market operations to get the accrued and pending rewards from.\",\"reward\":\"The reward asset.\"},\"returns\":{\"unclaimedRewards\":\"The claimable amount for the given account.\"}},\"config((address,address,address,uint32,uint256,uint256,uint256,uint256,int128,uint64,uint64,uint64,uint64,uint64)[])\":{\"params\":{\"configs\":\"The configurations to update each RewardData with.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"distributionTime(address,address)\":{\"params\":{\"market\":\"The market to get the distribution times.\",\"reward\":\"The reward asset.\"},\"returns\":{\"_0\":\"The distribution `start`, `end` and `lastUpdate` time.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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.\"},\"handleBorrow(address)\":{\"details\":\"There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\",\"params\":{\"account\":\"The account to which the index is updated.\"}},\"handleDeposit(address)\":{\"details\":\"There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\",\"params\":{\"account\":\"The account to which the index is updated.\"}},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize()\":{\"details\":\"Can only be called once.\"},\"previewAllocation(address,address,uint256)\":{\"params\":{\"deltaTime\":\"The elapsed time since the last update.\",\"market\":\"The market to calculate the indexes for.\",\"reward\":\"The reward asset to calculate the indexes for.\"},\"returns\":{\"borrowIndex\":\"The index for the borrow operation.\",\"depositIndex\":\"The index for the deposit operation.\",\"newUndistributed\":\"The new undistributed rewards of the distribution.\"}},\"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.\"},\"rewardConfig(address,address)\":{\"params\":{\"market\":\"The market to get the distribution configuration for.\",\"reward\":\"The reward asset.\"},\"returns\":{\"_0\":\"The distribution configuration.\"}},\"rewardIndexes(address,address)\":{\"params\":{\"market\":\"The market to get the reward indexes for.\",\"reward\":\"The reward asset to get the reward indexes for.\"},\"returns\":{\"_0\":\"borrowIndex The index for the floating and fixed borrow operation.\",\"_1\":\"depositIndex The index for the floating deposit operation.\",\"_2\":\"lastUndistributed The last amount of undistributed rewards.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"withdraw(address,address)\":{\"params\":{\"asset\":\"The asset to withdraw.\",\"to\":\"The address to withdraw the asset to.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"Accrue(address,address,address,bool,uint256,uint256,uint256)\":{\"notice\":\"Emitted when rewards are accrued by an account.\"},\"Claim(address,address,address,uint256)\":{\"notice\":\"Emitted when rewards are claimed by an account.\"},\"DistributionSet(address,address,(address,address,address,uint32,uint256,uint256,uint256,uint256,int128,uint64,uint64,uint64,uint64,uint64))\":{\"notice\":\"Emitted when a distribution is set.\"},\"IndexUpdate(address,address,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when the distribution indexes are updated.\"}},\"kind\":\"user\",\"methods\":{\"UTILIZATION_CAP()\":{\"notice\":\"Max utilization supported by the sigmoid function not to cause a division by zero (1e18 = WAD).\"},\"accountOperation(address,address,bool,address)\":{\"notice\":\"Gets the account data of a given account, Market, operation and reward asset.\"},\"allClaimable(address,address)\":{\"notice\":\"Gets the claimable amount of rewards for a given account and reward asset.\"},\"allMarketsOperations()\":{\"notice\":\"Gets all market and operations.\"},\"allRewards()\":{\"notice\":\"Retrieves all rewards addresses.\"},\"availableRewardsCount(address)\":{\"notice\":\"Gets the amount of reward assets that are being distributed for a Market.\"},\"claim((address,bool[])[],(address,address[],uint256,uint8,bytes32,bytes32))\":{\"notice\":\"Claims `permit.owner` rewards for the given operations and reward assets to the given account.\"},\"claim((address,bool[])[],address,address[])\":{\"notice\":\"Claims `msg.sender` rewards for the given operations and reward assets to the given account.\"},\"claimAll(address)\":{\"notice\":\"Claims all `msg.sender` rewards to the given account.\"},\"claimable((address,bool[])[],address,address)\":{\"notice\":\"Gets the claimable amount of rewards for a given account, Market operations and reward asset.\"},\"config((address,address,address,uint32,uint256,uint256,uint256,uint256,int128,uint64,uint64,uint64,uint64,uint64)[])\":{\"notice\":\"Enables or updates the reward distribution for the given markets and rewards.\"},\"distribution(address)\":{\"notice\":\"Tracks the reward distribution data for a given market.\"},\"distributionTime(address,address)\":{\"notice\":\"Gets the distribution `start`, `end` and `lastUpdate` value of a given market and reward.\"},\"handleBorrow(address)\":{\"notice\":\"Hook to be called by the Market to update the index of the account that made a rewarded borrow.\"},\"handleDeposit(address)\":{\"notice\":\"Hook to be called by the Market to update the index of the account that made a rewarded deposit.\"},\"initialize()\":{\"notice\":\"Initializes the contract.\"},\"marketList(uint256)\":{\"notice\":\"Stores Markets with distributions set.\"},\"previewAllocation(address,address,uint256)\":{\"notice\":\"Retrieves projected distribution indexes and new undistributed amount for a given `deltaTime`.\"},\"rewardConfig(address,address)\":{\"notice\":\"Gets the configuration of a given distribution.\"},\"rewardEnabled(address)\":{\"notice\":\"Tracks enabled asset rewards.\"},\"rewardIndexes(address,address)\":{\"notice\":\"Gets the reward indexes and last amount of undistributed rewards for a given market and reward asset.\"},\"rewardList(uint256)\":{\"notice\":\"Stores registered asset rewards.\"},\"withdraw(address,address)\":{\"notice\":\"Withdraws the contract's balance of the given asset to the given address.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/RewardsController.sol\":\"RewardsController\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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/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/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\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\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"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/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\"},\"contracts/Auditor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract Auditor is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n\\n /// @notice Address that a market should have as price feed to consider as base price and avoid external price call.\\n address public constant BASE_FEED = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n /// @notice Target health factor that the account should have after it's liquidated to prevent cascade liquidations.\\n uint256 public constant TARGET_HEALTH = 1.25e18;\\n /// @notice Maximum value the liquidator can send and still have granular control of max assets.\\n /// Above this threshold, they should send `type(uint256).max`.\\n uint256 public constant ASSETS_THRESHOLD = type(uint256).max / 1e18;\\n\\n /// @notice Decimals that the answer of all price feeds should have.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 public immutable priceDecimals;\\n /// @notice Base factor to scale the price returned by the feed to 18 decimals.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable baseFactor;\\n /// @notice Base price used if the feed to fetch the price from is `BASE_FEED`.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable basePrice;\\n\\n /// @notice Tracks the markets' indexes that an account has entered as collateral.\\n mapping(address => uint256) public accountMarkets;\\n /// @notice Stores market parameters per each enabled market.\\n mapping(Market => MarketData) public markets;\\n /// @notice Array of all enabled markets.\\n Market[] public marketList;\\n\\n /// @notice Liquidation incentive factors for the liquidator and the lenders of the market where the debt is repaid.\\n LiquidationIncentive public liquidationIncentive;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(uint256 priceDecimals_) {\\n priceDecimals = priceDecimals_;\\n baseFactor = 10 ** (18 - priceDecimals_);\\n basePrice = 10 ** priceDecimals_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(LiquidationIncentive memory liquidationIncentive_) external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setLiquidationIncentive(liquidationIncentive_);\\n }\\n\\n /// @notice Allows assets of a certain market to be used as collateral for borrowing other assets.\\n /// @param market market to enabled as collateral.\\n function enterMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) != 0) return;\\n accountMarkets[msg.sender] = marketMap | marketMask;\\n\\n emit MarketEntered(market, msg.sender);\\n }\\n\\n /// @notice Removes market from sender's account liquidity calculation.\\n /// @dev Sender must not have an outstanding borrow balance in the asset, or be providing necessary collateral\\n /// for an outstanding borrow.\\n /// @param market market to be disabled as collateral.\\n function exitMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n (uint256 assets, uint256 debt) = market.accountSnapshot(msg.sender);\\n\\n // fail if the sender has a borrow balance\\n if (debt != 0) revert RemainingDebt();\\n\\n // fail if the sender is not permitted to redeem all of their assets\\n checkShortfall(market, msg.sender, assets);\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) == 0) return;\\n accountMarkets[msg.sender] = marketMap & ~marketMask;\\n\\n emit MarketExited(market, msg.sender);\\n }\\n\\n /// @notice Returns account's liquidity calculation.\\n /// @param account account in which the liquidity will be calculated.\\n /// @param marketToSimulate market in which to simulate withdraw operation.\\n /// @param withdrawAmount amount to simulate as withdraw.\\n /// @return sumCollateral sum of all collateral, already multiplied by each adjust factor (denominated in base).\\n /// @return sumDebtPlusEffects sum of all debt divided by adjust factor considering withdrawal (denominated in base).\\n function accountLiquidity(\\n address account,\\n Market marketToSimulate,\\n uint256 withdrawAmount\\n ) public view returns (uint256 sumCollateral, uint256 sumDebtPlusEffects) {\\n AccountLiquidity memory vars; // holds all our calculation results\\n\\n // for each asset the account is in\\n uint256 marketMap = accountMarkets[account];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 baseUnit = 10 ** m.decimals;\\n uint256 adjustFactor = m.adjustFactor;\\n\\n // read the balances\\n (vars.balance, vars.borrowBalance) = market.accountSnapshot(account);\\n\\n // get the normalized price of the asset (18 decimals)\\n vars.price = assetPrice(m.priceFeed);\\n\\n // sum all the collateral prices\\n sumCollateral += vars.balance.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n\\n // sum all the debt\\n sumDebtPlusEffects += vars.borrowBalance.mulDivUp(vars.price, baseUnit).divWadUp(adjustFactor);\\n\\n // simulate the effects of withdrawing from a pool\\n if (market == marketToSimulate) {\\n // calculate the effects of redeeming markets\\n // (having less collateral is the same as having more debt for this calculation)\\n if (withdrawAmount != 0) {\\n sumDebtPlusEffects += withdrawAmount.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n }\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Validates that the current state of the position and system are valid.\\n /// @dev To be called after adding the borrowed debt to the account position.\\n /// @param market address of the market where the borrow is made.\\n /// @param borrower address of the account that will repay the debt.\\n function checkBorrow(Market market, address borrower) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[borrower];\\n uint256 marketMask = 1 << m.index;\\n\\n // validate borrow state\\n if ((marketMap & marketMask) == 0) {\\n // only markets may call checkBorrow if borrower not in market\\n if (msg.sender != address(market)) revert NotMarket();\\n\\n accountMarkets[borrower] = marketMap | marketMask;\\n emit MarketEntered(market, borrower);\\n }\\n\\n // verify that current liquidity is not short\\n (uint256 collateral, uint256 debt) = accountLiquidity(borrower, Market(address(0)), 0);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Checks if the account has liquidity shortfall.\\n /// @param market address of the market where the operation will happen.\\n /// @param account address of the account to check for possible shortfall.\\n /// @param amount amount that the account wants to withdraw or transfer.\\n function checkShortfall(Market market, address account, uint256 amount) public view {\\n // if the account is not 'in' the market, bypass the liquidity check\\n if ((accountMarkets[account] & (1 << markets[market].index)) == 0) return;\\n\\n // otherwise, perform a hypothetical liquidity check to guard against shortfall\\n (uint256 collateral, uint256 debt) = accountLiquidity(account, market, amount);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Allows/rejects liquidation of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt is being repaid.\\n /// @param seizeMarket market from where the liquidator will seize assets.\\n /// @param borrower address in which the assets are being liquidated.\\n /// @param maxLiquidatorAssets maximum amount of debt the liquidator is willing to accept.\\n /// @return maxRepayAssets capped amount of debt the liquidator is allowed to repay.\\n function checkLiquidation(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 maxLiquidatorAssets\\n ) external view returns (uint256 maxRepayAssets) {\\n // if markets are listed, they have the same auditor\\n if (!markets[repayMarket].isListed || !markets[seizeMarket].isListed) revert MarketNotListed();\\n\\n MarketVars memory repay;\\n LiquidityVars memory base;\\n uint256 marketMap = accountMarkets[borrower];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage marketData = markets[market];\\n MarketVars memory m = MarketVars({\\n price: assetPrice(marketData.priceFeed),\\n adjustFactor: marketData.adjustFactor,\\n baseUnit: 10 ** marketData.decimals\\n });\\n\\n if (market == repayMarket) repay = m;\\n\\n (uint256 collateral, uint256 debt) = market.accountSnapshot(borrower);\\n\\n uint256 value = debt.mulDivUp(m.price, m.baseUnit);\\n base.totalDebt += value;\\n base.adjustedDebt += value.divWadUp(m.adjustFactor);\\n\\n value = collateral.mulDivDown(m.price, m.baseUnit);\\n base.totalCollateral += value;\\n base.adjustedCollateral += value.mulWadDown(m.adjustFactor);\\n if (market == seizeMarket) base.seizeAvailable = value;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (base.adjustedCollateral >= base.adjustedDebt) revert InsufficientShortfall();\\n\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n uint256 adjustFactor = base.adjustedCollateral.mulWadDown(base.totalDebt).divWadUp(\\n base.adjustedDebt.mulWadUp(base.totalCollateral)\\n );\\n uint256 closeFactor = (TARGET_HEALTH - base.adjustedCollateral.divWadUp(base.adjustedDebt)).divWadUp(\\n TARGET_HEALTH - adjustFactor.mulWadDown(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n );\\n maxRepayAssets = Math.min(\\n Math\\n .min(\\n base.totalDebt.mulWadUp(Math.min(1e18, closeFactor)),\\n base.seizeAvailable.divWadUp(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n )\\n .mulDivUp(repay.baseUnit, repay.price),\\n maxLiquidatorAssets < ASSETS_THRESHOLD\\n ? maxLiquidatorAssets.divWadDown(1e18 + memIncentive.lenders)\\n : maxLiquidatorAssets\\n );\\n }\\n\\n /// @notice Allow/rejects seizing of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market where the assets will be seized.\\n function checkSeize(Market repayMarket, Market seizeMarket) external view {\\n // if markets are listed, they also point to the same Auditor\\n if (!markets[seizeMarket].isListed || !markets[repayMarket].isListed) revert MarketNotListed();\\n }\\n\\n /// @notice Calculates the amount of collateral to be seized when a position is undercollateralized.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market from where the assets will be seized by the liquidator.\\n /// @param borrower account in which assets are being seized.\\n /// @param actualRepayAssets amount being repaid.\\n /// @return lendersAssets amount to be added for other lenders as a compensation of bad debt clearing.\\n /// @return seizeAssets amount that can be seized by the liquidator.\\n function calculateSeize(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 actualRepayAssets\\n ) external view returns (uint256 lendersAssets, uint256 seizeAssets) {\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n lendersAssets = actualRepayAssets.mulWadDown(memIncentive.lenders);\\n\\n // read prices for borrowed and collateral markets\\n uint256 priceBorrowed = assetPrice(markets[repayMarket].priceFeed);\\n uint256 priceCollateral = assetPrice(markets[seizeMarket].priceFeed);\\n uint256 baseAmount = actualRepayAssets.mulDivUp(priceBorrowed, 10 ** markets[repayMarket].decimals);\\n\\n seizeAssets = Math.min(\\n baseAmount.mulDivUp(10 ** markets[seizeMarket].decimals, priceCollateral).mulWadUp(\\n 1e18 + memIncentive.liquidator + memIncentive.lenders\\n ),\\n seizeMarket.maxWithdraw(borrower)\\n );\\n }\\n\\n /// @notice Checks if account has debt with no collateral, if so then call `clearBadDebt` from each market.\\n /// @dev Collateral is multiplied by price and adjust factor to be accurately evaluated as positive collateral asset.\\n /// @param account account in which debt is being checked.\\n function handleBadDebt(address account) external {\\n uint256 memMarketMap = accountMarkets[account];\\n uint256 marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 assets = market.maxWithdraw(account);\\n if (assets.mulDivDown(assetPrice(m.priceFeed), 10 ** m.decimals).mulWadDown(m.adjustFactor) > 0) return;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) marketList[i].clearBadDebt(account);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the asset price of a price feed.\\n /// @dev If Chainlink's asset price is <= 0 the call is reverted.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price.\\n /// @return The price of the asset scaled to 18-digit decimals.\\n function assetPrice(IPriceFeed priceFeed) public view returns (uint256) {\\n if (address(priceFeed) == BASE_FEED) return basePrice;\\n\\n int256 price = priceFeed.latestAnswer();\\n if (price <= 0) revert InvalidPrice();\\n return uint256(price) * baseFactor;\\n }\\n\\n /// @notice Retrieves all markets.\\n function allMarkets() external view returns (Market[] memory) {\\n return marketList;\\n }\\n\\n /// @notice Enables a certain market.\\n /// @dev Enabling more than 256 markets will cause an overflow when casting market index to uint8.\\n /// @param market market to add to the protocol.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n /// @param adjustFactor market's adjust factor for the underlying asset.\\n function enableMarket(\\n Market market,\\n IPriceFeed priceFeed,\\n uint128 adjustFactor\\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (market.auditor() != this) revert AuditorMismatch();\\n if (markets[market].isListed) revert MarketAlreadyListed();\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n\\n uint8 decimals = market.decimals();\\n markets[market] = MarketData({\\n isListed: true,\\n adjustFactor: adjustFactor,\\n decimals: decimals,\\n index: uint8(marketList.length),\\n priceFeed: priceFeed\\n });\\n\\n marketList.push(market);\\n\\n emit MarketListed(market, decimals);\\n emit PriceFeedSet(market, priceFeed);\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the adjust factor for a certain market.\\n /// @param market address of the market to change adjust factor for.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n function setAdjustFactor(Market market, uint128 adjustFactor) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (!markets[market].isListed) revert MarketNotListed();\\n\\n markets[market].adjustFactor = adjustFactor;\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the Chainlink Price Feed Aggregator source for a market.\\n /// @param market market address of the asset.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n function setPriceFeed(Market market, IPriceFeed priceFeed) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n markets[market].priceFeed = priceFeed;\\n emit PriceFeedSet(market, priceFeed);\\n }\\n\\n /// @notice Sets liquidation incentive (liquidator and lenders) for the whole ecosystem.\\n /// @param liquidationIncentive_ new liquidation incentive.\\n function setLiquidationIncentive(\\n LiquidationIncentive memory liquidationIncentive_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n liquidationIncentive = liquidationIncentive_;\\n emit LiquidationIncentiveSet(liquidationIncentive_);\\n }\\n\\n /// @notice Emitted when a new market is listed for borrow/lending.\\n /// @param market address of the market that was listed.\\n /// @param decimals decimals of the market's underlying asset.\\n event MarketListed(Market indexed market, uint8 decimals);\\n\\n /// @notice Emitted when an account enters a market to use his deposit as collateral for a loan.\\n /// @param market address of the market that the account entered.\\n /// @param account address of the account that just entered a market.\\n event MarketEntered(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when an account leaves a market.\\n /// Means that they would stop using their deposit as collateral and won't ask for any loans in this market.\\n /// @param market address of the market that the account just left.\\n /// @param account address of the account that just left a market.\\n event MarketExited(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when a adjust factor is changed by admin.\\n /// @param market address of the market that has a new adjust factor.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n event AdjustFactorSet(Market indexed market, uint256 adjustFactor);\\n\\n /// @notice Emitted when a new liquidationIncentive has been set.\\n /// @param liquidationIncentive represented with 18 decimals.\\n event LiquidationIncentiveSet(LiquidationIncentive liquidationIncentive);\\n\\n /// @notice Emitted when a market and prie feed is changed by admin.\\n /// @param market address of the asset used to get the price.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n event PriceFeedSet(Market indexed market, IPriceFeed indexed priceFeed);\\n\\n /// @notice Stores the market parameters used for liquidity calculations.\\n /// @param adjustFactor used to asses the lending power of the market's underlying asset.\\n /// @param decimals number of decimals of the market's underlying asset.\\n /// @param index index of the market in the `marketList`.\\n /// @param isListed true if the market is enabled.\\n /// @param priceFeed address of the price feed used to query the asset's price.\\n struct MarketData {\\n uint128 adjustFactor;\\n uint8 decimals;\\n uint8 index;\\n bool isListed;\\n IPriceFeed priceFeed;\\n }\\n\\n /// @notice Stores the liquidator and lenders factors used in liquidations to calculate the amount to seize.\\n /// @param liquidator factor used to calculate the extra bonus a liquidator can seize.\\n /// @param lenders factor used to calculate the bonus that the pool lenders receive.\\n struct LiquidationIncentive {\\n uint128 liquidator;\\n uint128 lenders;\\n }\\n\\n /// @notice Used as memory access to temporary store account liquidity data.\\n /// @param balance collateral balance of the account.\\n /// @param borrowBalance borrow balance of the account.\\n /// @param price asset price returned by the price feed with 18 decimals.\\n struct AccountLiquidity {\\n uint256 balance;\\n uint256 borrowBalance;\\n uint256 price;\\n }\\n}\\n\\nerror AuditorMismatch();\\nerror InsufficientAccountLiquidity();\\nerror InsufficientShortfall();\\nerror InvalidPrice();\\nerror InvalidPriceFeed();\\nerror MarketAlreadyListed();\\nerror MarketNotListed();\\nerror NotMarket();\\nerror RemainingDebt();\\n\\nstruct MarketVars {\\n uint256 price;\\n uint256 baseUnit;\\n uint128 adjustFactor;\\n}\\n\\nstruct LiquidityVars {\\n uint256 totalDebt;\\n uint256 totalCollateral;\\n uint256 adjustedDebt;\\n uint256 adjustedCollateral;\\n uint256 seizeAvailable;\\n}\\n\",\"keccak256\":\"0x93d487fdf861e8f58edca8058bffec88f31d280846420faec8e3e7049d3068fd\",\"license\":\"BUSL-1.1\"},\"contracts/InterestRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\ncontract InterestRateModel {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for int256;\\n\\n /// @notice Threshold to define which method should be used to calculate the interest rates.\\n /// @dev When `eta` (`delta / alpha`) is lower than this value, use simpson's rule for approximation.\\n uint256 internal constant PRECISION_THRESHOLD = 7.5e14;\\n\\n /// @notice Scale factor of the fixed curve.\\n uint256 public immutable fixedCurveA;\\n /// @notice Origin intercept of the fixed curve.\\n int256 public immutable fixedCurveB;\\n /// @notice Asymptote of the fixed curve.\\n uint256 public immutable fixedMaxUtilization;\\n\\n /// @notice Scale factor of the floating curve.\\n uint256 public immutable floatingCurveA;\\n /// @notice Origin intercept of the floating curve.\\n int256 public immutable floatingCurveB;\\n /// @notice Asymptote of the floating curve.\\n uint256 public immutable floatingMaxUtilization;\\n\\n constructor(\\n uint256 fixedCurveA_,\\n int256 fixedCurveB_,\\n uint256 fixedMaxUtilization_,\\n uint256 floatingCurveA_,\\n int256 floatingCurveB_,\\n uint256 floatingMaxUtilization_\\n ) {\\n assert(fixedMaxUtilization_ > 1e18);\\n assert(floatingMaxUtilization_ > 1e18);\\n\\n fixedCurveA = fixedCurveA_;\\n fixedCurveB = fixedCurveB_;\\n fixedMaxUtilization = fixedMaxUtilization_;\\n\\n floatingCurveA = floatingCurveA_;\\n floatingCurveB = floatingCurveB_;\\n floatingMaxUtilization = floatingMaxUtilization_;\\n\\n // reverts if it's an invalid curve (such as one yielding a negative interest rate).\\n fixedRate(0, 0);\\n floatingRate(0);\\n }\\n\\n /// @notice Gets the rate to borrow a certain amount at a certain maturity with supply/demand values in the fixed rate\\n /// pool and assets from the backup supplier.\\n /// @param maturity maturity date for calculating days left to maturity.\\n /// @param amount the current borrow's amount.\\n /// @param borrowed ex-ante amount borrowed from this fixed rate pool.\\n /// @param supplied deposits in the fixed rate pool.\\n /// @param backupAssets backup supplier assets.\\n /// @return rate of the fee that the borrower will have to pay (represented with 18 decimals).\\n function fixedBorrowRate(\\n uint256 maturity,\\n uint256 amount,\\n uint256 borrowed,\\n uint256 supplied,\\n uint256 backupAssets\\n ) external view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n\\n uint256 potentialAssets = supplied + backupAssets;\\n uint256 utilizationAfter = (borrowed + amount).divWadUp(potentialAssets);\\n\\n if (utilizationAfter > 1e18) revert UtilizationExceeded();\\n\\n uint256 utilizationBefore = borrowed.divWadDown(potentialAssets);\\n\\n return fixedRate(utilizationBefore, utilizationAfter).mulDivDown(maturity - block.timestamp, 365 days);\\n }\\n\\n /// @notice Returns the current annualized fixed rate to borrow with supply/demand values in the fixed rate pool and\\n /// assets from the backup supplier.\\n /// @param borrowed amount borrowed from the fixed rate pool.\\n /// @param supplied deposits in the fixed rate pool.\\n /// @param backupAssets backup supplier assets.\\n /// @return rate of the fee that the borrower will have to pay, with 18 decimals precision.\\n /// @return utilization current utilization rate, with 18 decimals precision.\\n function minFixedRate(\\n uint256 borrowed,\\n uint256 supplied,\\n uint256 backupAssets\\n ) external view returns (uint256 rate, uint256 utilization) {\\n utilization = borrowed.divWadUp(supplied + backupAssets);\\n rate = fixedRate(utilization, utilization);\\n }\\n\\n /// @notice Returns the interest rate integral from `u0` to `u1`, using the analytical solution (ln).\\n /// @dev Uses the fixed rate curve parameters.\\n /// Handles special case where delta utilization tends to zero, using simpson's rule.\\n /// @param utilizationBefore ex-ante utilization rate, with 18 decimals precision.\\n /// @param utilizationAfter ex-post utilization rate, with 18 decimals precision.\\n /// @return the interest rate, with 18 decimals precision.\\n function fixedRate(uint256 utilizationBefore, uint256 utilizationAfter) internal view returns (uint256) {\\n uint256 alpha = fixedMaxUtilization - utilizationBefore;\\n uint256 delta = utilizationAfter - utilizationBefore;\\n int256 r = int256(\\n delta.divWadDown(alpha) < PRECISION_THRESHOLD\\n ? (fixedCurveA.divWadDown(alpha) +\\n fixedCurveA.mulDivDown(4e18, fixedMaxUtilization - ((utilizationAfter + utilizationBefore) / 2)) +\\n fixedCurveA.divWadDown(fixedMaxUtilization - utilizationAfter)) / 6\\n : fixedCurveA.mulDivDown(\\n uint256(int256(alpha.divWadDown(fixedMaxUtilization - utilizationAfter)).lnWad()),\\n delta\\n )\\n ) + fixedCurveB;\\n assert(r >= 0);\\n return uint256(r);\\n }\\n\\n /// @notice Returns the interest rate for an utilization rate.\\n /// @dev Uses the floating rate curve parameters.\\n /// @param utilization utilization rate, with 18 decimals precision.\\n /// @return the interest rate, with 18 decimals precision.\\n function floatingRate(uint256 utilization) public view returns (uint256) {\\n int256 r = int256(floatingCurveA.divWadDown(floatingMaxUtilization - utilization)) + floatingCurveB;\\n assert(r >= 0);\\n return uint256(r);\\n }\\n}\\n\\nerror AlreadyMatured();\\nerror UtilizationExceeded();\\n\",\"keccak256\":\"0xfb1d32f03bb869906ce577bb0e4cbc3e141006c7087f4e826ce513a9c4582f57\",\"license\":\"BUSL-1.1\"},\"contracts/Market.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { PausableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { ERC4626, ERC20, SafeTransferLib } from \\\"solmate/src/mixins/ERC4626.sol\\\";\\nimport { InterestRateModel } from \\\"./InterestRateModel.sol\\\";\\nimport { RewardsController } from \\\"./RewardsController.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Auditor } from \\\"./Auditor.sol\\\";\\n\\ncontract Market is Initializable, AccessControlUpgradeable, PausableUpgradeable, ERC4626 {\\n using FixedPointMathLib for int256;\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint128;\\n using SafeTransferLib for ERC20;\\n using FixedLib for FixedLib.Pool;\\n using FixedLib for FixedLib.Position;\\n using FixedLib for uint256;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n Auditor public immutable auditor;\\n\\n /// @notice Tracks account's fixed deposit positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedDepositPositions;\\n /// @notice Tracks account's fixed borrow positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedBorrowPositions;\\n /// @notice Tracks fixed pools state by maturity.\\n mapping(uint256 => FixedLib.Pool) public fixedPools;\\n\\n /// @notice Tracks fixed deposit and borrow map and floating borrow shares of an account.\\n mapping(address => Account) public accounts;\\n\\n /// @notice Amount of assets lent by the floating pool to the fixed pools.\\n uint256 public floatingBackupBorrowed;\\n /// @notice Amount of assets lent by the floating pool to accounts.\\n uint256 public floatingDebt;\\n\\n /// @notice Accumulated earnings from extraordinary sources to be gradually distributed.\\n uint256 public earningsAccumulator;\\n /// @notice Rate per second to be charged to delayed fixed pools borrowers after maturity.\\n uint256 public penaltyRate;\\n /// @notice Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\\n uint256 public backupFeeRate;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\\n uint256 public dampSpeedUp;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\\n uint256 public dampSpeedDown;\\n\\n /// @notice Number of fixed pools to be active at the same time.\\n uint8 public maxFuturePools;\\n /// @notice Last time the accumulator distributed earnings.\\n uint32 public lastAccumulatorAccrual;\\n /// @notice Last time the floating debt was updated.\\n uint32 public lastFloatingDebtUpdate;\\n /// @notice Last time the floating assets average was updated.\\n uint32 public lastAverageUpdate;\\n\\n /// @notice Interest rate model contract used to get the borrow rates.\\n InterestRateModel public interestRateModel;\\n\\n /// @notice Factor used for gradual accrual of earnings to the floating pool.\\n uint128 public earningsAccumulatorSmoothFactor;\\n /// @notice Percentage factor that represents the liquidity reserves that can't be borrowed.\\n uint128 public reserveFactor;\\n\\n /// @notice Amount of floating assets deposited to the pool.\\n uint256 public floatingAssets;\\n /// @notice Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\\n uint256 public floatingAssetsAverage;\\n\\n /// @notice Total amount of floating borrow shares assigned to floating borrow accounts.\\n uint256 public totalFloatingBorrowShares;\\n\\n /// @dev gap from deprecated state.\\n /// @custom:oz-renamed-from floatingUtilization\\n uint256 private __gap;\\n\\n /// @notice Address of the treasury that will receive the allocated earnings.\\n address public treasury;\\n /// @notice Rate to be charged by the treasury to floating and fixed borrows.\\n uint256 public treasuryFeeRate;\\n\\n /// @notice Address of the rewards controller that will accrue rewards for accounts operating with the Market.\\n RewardsController public rewardsController;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(ERC20 asset_, Auditor auditor_) ERC4626(asset_, \\\"\\\", \\\"\\\") {\\n auditor = auditor_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(\\n uint8 maxFuturePools_,\\n uint128 earningsAccumulatorSmoothFactor_,\\n InterestRateModel interestRateModel_,\\n uint256 penaltyRate_,\\n uint256 backupFeeRate_,\\n uint128 reserveFactor_,\\n uint256 dampSpeedUp_,\\n uint256 dampSpeedDown_\\n ) external initializer {\\n __AccessControl_init();\\n __Pausable_init();\\n\\n string memory assetSymbol = asset.symbol();\\n name = string.concat(\\\"exactly \\\", assetSymbol);\\n symbol = string.concat(\\\"exa\\\", assetSymbol);\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n lastAverageUpdate = uint32(block.timestamp);\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setMaxFuturePools(maxFuturePools_);\\n setEarningsAccumulatorSmoothFactor(earningsAccumulatorSmoothFactor_);\\n setInterestRateModel(interestRateModel_);\\n setPenaltyRate(penaltyRate_);\\n setBackupFeeRate(backupFeeRate_);\\n setReserveFactor(reserveFactor_);\\n setDampSpeed(dampSpeedUp_, dampSpeedDown_);\\n }\\n\\n /// @notice Borrows a certain amount from the floating pool.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return borrowShares shares corresponding to the borrowed assets.\\n function borrow(\\n uint256 assets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused returns (uint256 borrowShares) {\\n spendAllowance(borrower, assets);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n\\n borrowShares = previewBorrow(assets);\\n\\n uint256 newFloatingDebt = floatingDebt + assets;\\n floatingDebt = newFloatingDebt;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed, also considering the reserves\\n if (floatingBackupBorrowed + newFloatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n\\n totalFloatingBorrowShares += borrowShares;\\n accounts[borrower].floatingBorrowShares += borrowShares;\\n\\n emit Borrow(msg.sender, receiver, borrower, assets, borrowShares);\\n emitMarketUpdate();\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Repays a certain amount of assets to the floating pool.\\n /// @param assets assets to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepay the actual amount that should be transferred into the protocol.\\n /// @return borrowShares subtracted shares from the borrower's accountability.\\n function repay(\\n uint256 assets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepay, uint256 borrowShares) {\\n (actualRepay, borrowShares) = noTransferRefund(previewRepay(assets), borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), actualRepay);\\n }\\n\\n /// @notice Repays a certain amount of shares to the floating pool.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return assets subtracted assets from the borrower's accountability.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function refund(\\n uint256 borrowShares,\\n address borrower\\n ) external whenNotPaused returns (uint256 assets, uint256 actualShares) {\\n (assets, actualShares) = noTransferRefund(borrowShares, borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Allows to (partially) repay a floating borrow. It does not transfer assets.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower the address of the account that has the debt.\\n /// @return assets the actual amount that should be transferred into the protocol.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function noTransferRefund(\\n uint256 borrowShares,\\n address borrower\\n ) internal returns (uint256 assets, uint256 actualShares) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n Account storage account = accounts[borrower];\\n uint256 accountBorrowShares = account.floatingBorrowShares;\\n actualShares = Math.min(borrowShares, accountBorrowShares);\\n assets = previewRefund(actualShares);\\n\\n if (assets == 0) revert ZeroRepay();\\n\\n floatingDebt -= assets;\\n account.floatingBorrowShares = accountBorrowShares - actualShares;\\n totalFloatingBorrowShares -= actualShares;\\n\\n emit Repay(msg.sender, borrower, assets, actualShares);\\n }\\n\\n /// @notice Deposits a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be deposited.\\n /// @param assets amount to receive from the msg.sender.\\n /// @param minAssetsRequired minimum amount of assets required by the depositor for the transaction to be accepted.\\n /// @param receiver address that will be able to withdraw the deposited assets.\\n /// @return positionAssets total amount of assets (principal + fee) to be withdrawn at maturity.\\n function depositAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 minAssetsRequired,\\n address receiver\\n ) external whenNotPaused returns (uint256 positionAssets) {\\n if (assets == 0) revert ZeroDeposit();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n\\n (uint256 fee, uint256 backupFee) = pool.calculateDeposit(assets, backupFeeRate);\\n positionAssets = assets + fee;\\n if (positionAssets < minAssetsRequired) revert Disagreement();\\n\\n floatingBackupBorrowed -= pool.deposit(assets);\\n pool.unassignedEarnings -= fee + backupFee;\\n earningsAccumulator += backupFee;\\n\\n // update account's position\\n FixedLib.Position storage position = fixedDepositPositions[maturity][receiver];\\n\\n // if account doesn't have a current position, add it to the list\\n if (position.principal == 0) {\\n Account storage account = accounts[receiver];\\n account.fixedDeposits = account.fixedDeposits.setMaturity(maturity);\\n }\\n\\n position.principal += assets;\\n position.fee += fee;\\n\\n floatingAssets += backupEarnings;\\n\\n emit DepositAtMaturity(maturity, msg.sender, receiver, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Borrows a certain amount from a maturity.\\n /// @param maturity maturity date for repayment.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return assetsOwed total amount of assets (principal + fee) to be repaid at maturity.\\n function borrowAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 maxAssets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused returns (uint256 assetsOwed) {\\n if (assets == 0) revert ZeroBorrow();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n\\n uint256 fee = assets.mulWadDown(\\n interestRateModel.fixedBorrowRate(maturity, assets, pool.borrowed, pool.supplied, previewFloatingAssetsAverage())\\n );\\n assetsOwed = assets + fee;\\n\\n // validate that the account is not taking arbitrary fees\\n if (assetsOwed > maxAssets) revert Disagreement();\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n spendAllowance(borrower, assetsOwed);\\n\\n {\\n uint256 backupDebtAddition = pool.borrow(assets);\\n if (backupDebtAddition > 0) {\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed + backupDebtAddition;\\n depositToTreasury(updateFloatingDebt());\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n }\\n\\n {\\n // if account doesn't have a current position, add it to the list\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n if (position.principal == 0) {\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.setMaturity(maturity);\\n }\\n\\n // calculate what portion of the fees are to be accrued and what portion goes to earnings accumulator\\n (uint256 newUnassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(fee),\\n assets\\n );\\n if (newUnassignedEarnings > 0) pool.unassignedEarnings += newUnassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n fixedBorrowPositions[maturity][borrower] = FixedLib.Position(position.principal + assets, position.fee + fee);\\n }\\n\\n floatingAssets += backupEarnings;\\n\\n emit BorrowAtMaturity(maturity, msg.sender, receiver, borrower, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Withdraws a certain amount from a maturity.\\n /// @dev It's expected that this function can't be paused to prevent freezing account funds.\\n /// @param maturity maturity date where the assets will be withdrawn.\\n /// @param positionAssets position size to be reduced.\\n /// @param minAssetsRequired minimum amount required by the account (if discount included for early withdrawal).\\n /// @param receiver address that will receive the withdrawn assets.\\n /// @param owner address that previously deposited the assets.\\n /// @return assetsDiscounted amount of assets withdrawn (can include a discount for early withdraw).\\n function withdrawAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 minAssetsRequired,\\n address receiver,\\n address owner\\n ) external returns (uint256 assetsDiscounted) {\\n if (positionAssets == 0) revert ZeroWithdraw();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n\\n FixedLib.Position memory position = fixedDepositPositions[maturity][owner];\\n\\n if (positionAssets > position.principal + position.fee) positionAssets = position.principal + position.fee;\\n\\n // verify if there are any penalties/fee for the account because of early withdrawal, if so discount\\n if (block.timestamp < maturity) {\\n assetsDiscounted = positionAssets.divWadDown(\\n 1e18 +\\n interestRateModel.fixedBorrowRate(\\n maturity,\\n positionAssets,\\n pool.borrowed,\\n pool.supplied,\\n previewFloatingAssetsAverage()\\n )\\n );\\n } else {\\n assetsDiscounted = positionAssets;\\n }\\n\\n if (assetsDiscounted < minAssetsRequired) revert Disagreement();\\n\\n spendAllowance(owner, assetsDiscounted);\\n\\n {\\n // remove the supply from the fixed rate pool\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed +\\n pool.withdraw(\\n FixedLib.Position(position.principal, position.fee).scaleProportionally(positionAssets).principal\\n );\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets) revert InsufficientProtocolLiquidity();\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n\\n // all the fees go to unassigned or to the floating pool\\n (uint256 unassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(positionAssets - assetsDiscounted),\\n assetsDiscounted\\n );\\n pool.unassignedEarnings += unassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n // the account gets discounted the full amount\\n position.reduceProportionally(positionAssets);\\n if (position.principal | position.fee == 0) {\\n delete fixedDepositPositions[maturity][owner];\\n Account storage account = accounts[owner];\\n account.fixedDeposits = account.fixedDeposits.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedDepositPositions[maturity][owner] = position;\\n }\\n\\n floatingAssets += backupEarnings;\\n\\n emit WithdrawAtMaturity(maturity, msg.sender, receiver, owner, positionAssets, assetsDiscounted);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransfer(receiver, assetsDiscounted);\\n }\\n\\n /// @notice Repays a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be repaid.\\n /// @param positionAssets amount to be paid for the borrower's debt.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepayAssets the actual amount that was transferred into the protocol.\\n function repayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepayAssets) {\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n actualRepayAssets = noTransferRepayAtMaturity(maturity, positionAssets, maxAssets, borrower, true);\\n emitMarketUpdate();\\n\\n asset.safeTransferFrom(msg.sender, address(this), actualRepayAssets);\\n }\\n\\n /// @notice Allows to (partially) repay a fixed rate position. It does not transfer assets.\\n /// @param maturity the maturity to access the pool.\\n /// @param positionAssets the amount of debt of the pool that should be paid.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower the address of the account that has the debt.\\n /// @param canDiscount should early repay discounts be applied.\\n /// @return actualRepayAssets the actual amount that should be transferred into the protocol.\\n function noTransferRepayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower,\\n bool canDiscount\\n ) internal returns (uint256 actualRepayAssets) {\\n if (positionAssets == 0) revert ZeroRepay();\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n\\n FixedLib.Position memory position = fixedBorrowPositions[maturity][borrower];\\n\\n uint256 debtCovered = Math.min(positionAssets, position.principal + position.fee);\\n\\n uint256 principalCovered = FixedLib\\n .Position(position.principal, position.fee)\\n .scaleProportionally(debtCovered)\\n .principal;\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n // early repayment allows a discount from the unassigned earnings\\n if (block.timestamp < maturity) {\\n if (canDiscount) {\\n // calculate the deposit fee considering the amount of debt the account'll pay\\n (uint256 discountFee, uint256 backupFee) = pool.calculateDeposit(principalCovered, backupFeeRate);\\n\\n // remove the fee from unassigned earnings\\n pool.unassignedEarnings -= discountFee + backupFee;\\n\\n // the fee charged to the fixed pool supplier goes to the earnings accumulator\\n earningsAccumulator += backupFee;\\n\\n // the fee gets discounted from the account through `actualRepayAssets`\\n actualRepayAssets = debtCovered - discountFee;\\n } else {\\n actualRepayAssets = debtCovered;\\n }\\n } else {\\n actualRepayAssets = debtCovered + debtCovered.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n\\n // all penalties go to the earnings accumulator\\n earningsAccumulator += actualRepayAssets - debtCovered;\\n }\\n\\n // verify that the account agrees to this discount or penalty\\n if (actualRepayAssets > maxAssets) revert Disagreement();\\n\\n // reduce the borrowed from the pool and might decrease the floating backup borrowed\\n floatingBackupBorrowed -= pool.repay(principalCovered);\\n\\n // update the account position\\n position.reduceProportionally(debtCovered);\\n if (position.principal | position.fee == 0) {\\n delete fixedBorrowPositions[maturity][borrower];\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedBorrowPositions[maturity][borrower] = position;\\n }\\n\\n floatingAssets += backupEarnings;\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, actualRepayAssets, debtCovered);\\n emitFixedEarningsUpdate(maturity);\\n }\\n\\n /// @notice Liquidates undercollateralized fixed/floating (or both) position(s).\\n /// @dev Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool,\\n /// or/and for multiple fixed pools, seizing a portion of borrower's collateral.\\n /// @param borrower account that has an outstanding debt across floating or fixed pools.\\n /// @param maxAssets maximum amount of debt that the liquidator is willing to accept. (it can be less)\\n /// @param seizeMarket market from which the collateral will be seized to give to the liquidator.\\n /// @return repaidAssets actual amount repaid.\\n function liquidate(\\n address borrower,\\n uint256 maxAssets,\\n Market seizeMarket\\n ) external whenNotPaused returns (uint256 repaidAssets) {\\n if (msg.sender == borrower) revert SelfLiquidation();\\n\\n maxAssets = auditor.checkLiquidation(this, seizeMarket, borrower, maxAssets);\\n if (maxAssets == 0) revert ZeroRepay();\\n\\n Account storage account = accounts[borrower];\\n\\n {\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0 && maxAssets != 0) {\\n if (packedMaturities & 1 != 0) {\\n uint256 actualRepay;\\n if (block.timestamp < maturity) {\\n actualRepay = noTransferRepayAtMaturity(maturity, maxAssets, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n } else {\\n uint256 position;\\n {\\n FixedLib.Position storage p = fixedBorrowPositions[maturity][borrower];\\n position = p.principal + p.fee;\\n }\\n uint256 debt = position + position.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n actualRepay = debt > maxAssets ? maxAssets.mulDivDown(position, debt) : maxAssets;\\n\\n if (actualRepay == 0) maxAssets = 0;\\n else {\\n actualRepay = noTransferRepayAtMaturity(maturity, actualRepay, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n }\\n }\\n repaidAssets += actualRepay;\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n\\n if (maxAssets > 0 && account.floatingBorrowShares > 0) {\\n uint256 borrowShares = previewRepay(maxAssets);\\n if (borrowShares > 0) {\\n (uint256 actualRepayAssets, ) = noTransferRefund(borrowShares, borrower);\\n repaidAssets += actualRepayAssets;\\n }\\n }\\n\\n // reverts on failure\\n (uint256 lendersAssets, uint256 seizeAssets) = auditor.calculateSeize(this, seizeMarket, borrower, repaidAssets);\\n earningsAccumulator += lendersAssets;\\n\\n if (address(seizeMarket) == address(this)) {\\n internalSeize(this, msg.sender, borrower, seizeAssets);\\n } else {\\n seizeMarket.seize(msg.sender, borrower, seizeAssets);\\n\\n emitMarketUpdate();\\n }\\n\\n emit Liquidate(msg.sender, borrower, repaidAssets, lendersAssets, seizeMarket, seizeAssets);\\n\\n auditor.handleBadDebt(borrower);\\n\\n asset.safeTransferFrom(msg.sender, address(this), repaidAssets + lendersAssets);\\n }\\n\\n /// @notice Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\\n /// @dev Can only be called from the auditor.\\n /// @param borrower account with insufficient collateral to be cleared the debt.\\n function clearBadDebt(address borrower) external {\\n if (msg.sender != address(auditor)) revert NotAuditor();\\n\\n floatingAssets += accrueAccumulatedEarnings();\\n Account storage account = accounts[borrower];\\n uint256 accumulator = earningsAccumulator;\\n uint256 totalBadDebt = 0;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 badDebt = position.principal + position.fee;\\n if (accumulator >= badDebt) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n accumulator -= badDebt;\\n totalBadDebt += badDebt;\\n floatingBackupBorrowed -= fixedPools[maturity].repay(position.principal);\\n delete fixedBorrowPositions[maturity][borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, badDebt, badDebt);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n if (account.floatingBorrowShares > 0 && (accumulator = previewRepay(accumulator)) > 0) {\\n (uint256 badDebt, ) = noTransferRefund(accumulator, borrower);\\n totalBadDebt += badDebt;\\n }\\n if (totalBadDebt > 0) {\\n earningsAccumulator -= totalBadDebt;\\n emit SpreadBadDebt(borrower, totalBadDebt);\\n }\\n emitMarketUpdate();\\n }\\n\\n /// @notice Public function to seize a certain amount of assets.\\n /// @dev Public function for liquidator to seize borrowers assets in the floating pool.\\n /// This function will only be called from another Market, on `liquidation` calls.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function seize(address liquidator, address borrower, uint256 assets) external whenNotPaused {\\n internalSeize(Market(msg.sender), liquidator, borrower, assets);\\n }\\n\\n /// @notice Internal function to seize a certain amount of assets.\\n /// @dev Internal function for liquidator to seize borrowers assets in the floating pool.\\n /// Will only be called from this Market on `liquidation` or through `seize` calls from another Market.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param seizeMarket address which is calling the seize function (see `seize` public function).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function internalSeize(Market seizeMarket, address liquidator, address borrower, uint256 assets) internal {\\n if (assets == 0) revert ZeroWithdraw();\\n\\n // reverts on failure\\n auditor.checkSeize(seizeMarket, this);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(borrower);\\n uint256 shares = previewWithdraw(assets);\\n beforeWithdraw(assets, shares);\\n _burn(borrower, shares);\\n emit Withdraw(msg.sender, liquidator, borrower, assets, shares);\\n emit Seize(liquidator, borrower, assets);\\n emitMarketUpdate();\\n\\n asset.safeTransfer(liquidator, assets);\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @dev It's expected that this function can't be paused to prevent freezing account funds.\\n /// @param assets amount of assets to be withdrawn from the floating pool.\\n function beforeWithdraw(uint256 assets, uint256) internal override {\\n updateFloatingAssetsAverage();\\n depositToTreasury(updateFloatingDebt());\\n uint256 earnings = accrueAccumulatedEarnings();\\n uint256 newFloatingAssets = floatingAssets + earnings - assets;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed\\n if (floatingBackupBorrowed + floatingDebt > newFloatingAssets) revert InsufficientProtocolLiquidity();\\n floatingAssets = newFloatingAssets;\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be deposited to the floating pool.\\n function afterDeposit(uint256 assets, uint256) internal override whenNotPaused {\\n updateFloatingAssetsAverage();\\n uint256 treasuryFee = updateFloatingDebt();\\n uint256 earnings = accrueAccumulatedEarnings();\\n floatingAssets += earnings + assets;\\n depositToTreasury(treasuryFee);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Withdraws the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param assets amount of underlying to be withdrawn.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return shares amount of shares redeemed for underlying asset.\\n function withdraw(uint256 assets, address receiver, address owner) public override returns (uint256 shares) {\\n auditor.checkShortfall(this, owner, assets);\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n shares = super.withdraw(assets, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Redeems the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param shares amount of shares to be redeemed for underlying asset.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return assets amount of underlying asset that was withdrawn.\\n function redeem(uint256 shares, address receiver, address owner) public override returns (uint256 assets) {\\n auditor.checkShortfall(this, owner, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n assets = super.redeem(shares, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n function _mint(address to, uint256 amount) internal override {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(to);\\n super._mint(to, amount);\\n }\\n\\n /// @notice Moves amount of shares from the caller's account to `to`.\\n /// @dev It's expected that this function can't be paused to prevent freezing account funds.\\n /// Makes sure that the caller doesn't have shortfall after transferring.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transfer(address to, uint256 shares) public override returns (bool) {\\n auditor.checkShortfall(this, msg.sender, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(msg.sender);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transfer(to, shares);\\n }\\n\\n /// @notice Moves amount of shares from `from` to `to` using the allowance mechanism.\\n /// @dev It's expected that this function can't be paused to prevent freezing account funds.\\n /// Makes sure that `from` address doesn't have shortfall after transferring.\\n /// @param from address from which the assets will be transferred.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transferFrom(address from, address to, uint256 shares) public override returns (bool) {\\n auditor.checkShortfall(this, from, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(from);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transferFrom(from, to, shares);\\n }\\n\\n /// @notice Gets current snapshot for an account across all maturities.\\n /// @param account account to return status snapshot in the specified maturity date.\\n /// @return the amount deposited to the floating pool and the amount owed to floating and fixed pools.\\n function accountSnapshot(address account) external view returns (uint256, uint256) {\\n return (convertToAssets(balanceOf[account]), previewDebt(account));\\n }\\n\\n /// @notice Gets all borrows and penalties for an account.\\n /// @param borrower account to return status snapshot for fixed and floating borrows.\\n /// @return debt the total debt, denominated in number of assets.\\n function previewDebt(address borrower) public view returns (uint256 debt) {\\n Account storage account = accounts[borrower];\\n uint256 memPenaltyRate = penaltyRate;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n // calculate all maturities using the base maturity and the following bits representing the following intervals\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 positionAssets = position.principal + position.fee;\\n\\n debt += positionAssets;\\n\\n if (block.timestamp > maturity) {\\n debt += positionAssets.mulWadDown((block.timestamp - maturity) * memPenaltyRate);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n // calculate floating borrowed debt\\n uint256 shares = account.floatingBorrowShares;\\n if (shares > 0) debt += previewRefund(shares);\\n }\\n\\n /// @notice Charges treasury fee to certain amount of earnings.\\n /// @param earnings amount of earnings.\\n /// @return earnings minus the fees charged by the treasury.\\n function chargeTreasuryFee(uint256 earnings) internal returns (uint256) {\\n uint256 fee = earnings.mulWadDown(treasuryFeeRate);\\n depositToTreasury(fee);\\n return earnings - fee;\\n }\\n\\n /// @notice Collects all earnings that are charged to borrowers that make use of fixed pool deposits' assets.\\n /// @param earnings amount of earnings.\\n function collectFreeLunch(uint256 earnings) internal {\\n if (earnings == 0) return;\\n\\n if (treasuryFeeRate > 0) {\\n depositToTreasury(earnings);\\n } else {\\n earningsAccumulator += earnings;\\n }\\n }\\n\\n /// @notice Deposits amount of assets on behalf of the treasury address.\\n /// @param fee amount of assets to be deposited.\\n function depositToTreasury(uint256 fee) internal {\\n if (fee > 0) {\\n _mint(treasury, previewDeposit(fee));\\n floatingAssets += fee;\\n }\\n }\\n\\n /// @notice Calculates the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings to be distributed from the accumulator.\\n function accumulatedEarnings() internal view returns (uint256 earnings) {\\n uint256 elapsed = block.timestamp - lastAccumulatorAccrual;\\n if (elapsed == 0) return 0;\\n return\\n earningsAccumulator.mulDivDown(\\n elapsed,\\n elapsed + earningsAccumulatorSmoothFactor.mulWadDown(maxFuturePools * FixedLib.INTERVAL)\\n );\\n }\\n\\n /// @notice Accrues the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings distributed from the accumulator.\\n function accrueAccumulatedEarnings() internal returns (uint256 earnings) {\\n earnings = accumulatedEarnings();\\n\\n earningsAccumulator -= earnings;\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n emit AccumulatorAccrual(block.timestamp);\\n }\\n\\n /// @notice Updates the `floatingAssetsAverage`.\\n function updateFloatingAssetsAverage() internal {\\n floatingAssetsAverage = previewFloatingAssetsAverage();\\n lastAverageUpdate = uint32(block.timestamp);\\n }\\n\\n /// @notice Returns the current `floatingAssetsAverage` without updating the storage variable.\\n /// @return projected `floatingAssetsAverage`.\\n function previewFloatingAssetsAverage() public view returns (uint256) {\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 memFloatingAssetsAverage = floatingAssetsAverage;\\n uint256 dampSpeedFactor = memFloatingAssets < memFloatingAssetsAverage ? dampSpeedDown : dampSpeedUp;\\n uint256 averageFactor = uint256(1e18 - (-int256(dampSpeedFactor * (block.timestamp - lastAverageUpdate))).expWad());\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n /// @notice Updates the floating pool borrows' variables.\\n /// @return treasuryFee amount of fees charged by the treasury to the new calculated floating debt.\\n function updateFloatingDebt() internal returns (uint256 treasuryFee) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 floatingUtilization = memFloatingAssets > 0 ? memFloatingDebt.divWadUp(memFloatingAssets) : 0;\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel.floatingRate(floatingUtilization).mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n\\n memFloatingDebt += newDebt;\\n treasuryFee = newDebt.mulWadDown(treasuryFeeRate);\\n floatingAssets = memFloatingAssets + newDebt - treasuryFee;\\n floatingDebt = memFloatingDebt;\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n emit FloatingDebtUpdate(block.timestamp, floatingUtilization);\\n }\\n\\n /// @notice Calculates the total floating debt, considering elapsed time since last update and current interest rate.\\n /// @return actual floating debt plus projected interest.\\n function totalFloatingBorrowAssets() public view returns (uint256) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 floatingUtilization = memFloatingAssets > 0 ? memFloatingDebt.divWadUp(memFloatingAssets) : 0;\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel.floatingRate(floatingUtilization).mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n return memFloatingDebt + newDebt;\\n }\\n\\n /// @notice Calculates the floating pool balance plus earnings to be accrued at current timestamp\\n /// from maturities and accumulator.\\n /// @return actual floatingAssets plus earnings to be accrued at current timestamp.\\n function totalAssets() public view override returns (uint256) {\\n unchecked {\\n uint256 memMaxFuturePools = maxFuturePools;\\n uint256 backupEarnings = 0;\\n\\n uint256 latestMaturity = block.timestamp - (block.timestamp % FixedLib.INTERVAL);\\n uint256 maxMaturity = latestMaturity + memMaxFuturePools * FixedLib.INTERVAL;\\n\\n for (uint256 maturity = latestMaturity; maturity <= maxMaturity; maturity += FixedLib.INTERVAL) {\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (maturity > lastAccrual) {\\n backupEarnings += block.timestamp < maturity\\n ? pool.unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual)\\n : pool.unassignedEarnings;\\n }\\n }\\n\\n return\\n floatingAssets +\\n backupEarnings +\\n accumulatedEarnings() +\\n (totalFloatingBorrowAssets() - floatingDebt).mulWadDown(1e18 - treasuryFeeRate);\\n }\\n }\\n\\n /// @notice Simulates the effects of a borrow at the current time, given current contract conditions.\\n /// @param assets amount of assets to borrow.\\n /// @return amount of shares that will be asigned to the account after the borrow.\\n function previewBorrow(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a repay at the current time, given current contract conditions.\\n /// @param assets amount of assets to repay.\\n /// @return amount of shares that will be subtracted from the account after the repay.\\n function previewRepay(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a refund at the current time, given current contract conditions.\\n /// @param shares amount of shares to subtract from caller's accountability.\\n /// @return amount of assets that will be repaid.\\n function previewRefund(uint256 shares) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalFloatingBorrowAssets(), supply);\\n }\\n\\n /// @notice Checks msg.sender's allowance over account's assets.\\n /// @param account account in which the allowance will be checked.\\n /// @param assets assets from account that msg.sender wants to operate on.\\n function spendAllowance(address account, uint256 assets) internal {\\n if (msg.sender != account) {\\n uint256 allowed = allowance[account][msg.sender]; // saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[account][msg.sender] = allowed - previewWithdraw(assets);\\n }\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed amount of the fixed pool.\\n function fixedPoolBorrowed(uint256 maturity) external view returns (uint256) {\\n return fixedPools[maturity].borrowed;\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed and supplied amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed and supplied amount of the fixed pool.\\n function fixedPoolBalance(uint256 maturity) external view returns (uint256, uint256) {\\n return (fixedPools[maturity].borrowed, fixedPools[maturity].supplied);\\n }\\n\\n /// @notice Emits MarketUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitMarketUpdate() internal {\\n emit MarketUpdate(\\n block.timestamp,\\n totalSupply,\\n floatingAssets,\\n totalFloatingBorrowShares,\\n floatingDebt,\\n earningsAccumulator\\n );\\n }\\n\\n /// @notice Emits FixedEarningsUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitFixedEarningsUpdate(uint256 maturity) internal {\\n emit FixedEarningsUpdate(block.timestamp, maturity, fixedPools[maturity].unassignedEarnings);\\n }\\n\\n /// @notice Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially\\n /// providing liquidity.\\n /// @param backupFeeRate_ percentage amount represented with 18 decimals.\\n function setBackupFeeRate(uint256 backupFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n backupFeeRate = backupFeeRate_;\\n emit BackupFeeRateSet(backupFeeRate_);\\n }\\n\\n /// @notice Sets the damp speed used to update the floatingAssetsAverage.\\n /// @param up damp speed up, represented with 18 decimals.\\n /// @param down damp speed down, represented with 18 decimals.\\n function setDampSpeed(uint256 up, uint256 down) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n updateFloatingAssetsAverage();\\n dampSpeedUp = up;\\n dampSpeedDown = down;\\n emit DampSpeedSet(up, down);\\n }\\n\\n /// @notice Sets the factor used when smoothly accruing earnings to the floating pool.\\n /// @param earningsAccumulatorSmoothFactor_ represented with 18 decimals.\\n function setEarningsAccumulatorSmoothFactor(\\n uint128 earningsAccumulatorSmoothFactor_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n floatingAssets += accrueAccumulatedEarnings();\\n emitMarketUpdate();\\n earningsAccumulatorSmoothFactor = earningsAccumulatorSmoothFactor_;\\n emit EarningsAccumulatorSmoothFactorSet(earningsAccumulatorSmoothFactor_);\\n }\\n\\n /// @notice Sets the interest rate model to be used to calculate rates.\\n /// @param interestRateModel_ new interest rate model.\\n function setInterestRateModel(InterestRateModel interestRateModel_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(interestRateModel) != address(0)) depositToTreasury(updateFloatingDebt());\\n\\n interestRateModel = interestRateModel_;\\n emitMarketUpdate();\\n emit InterestRateModelSet(interestRateModel_);\\n }\\n\\n /// @notice Sets the rewards controller to update account rewards when operating with the Market.\\n /// @param rewardsController_ new rewards controller.\\n function setRewardsController(RewardsController rewardsController_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n rewardsController = rewardsController_;\\n emit RewardsControllerSet(rewardsController_);\\n }\\n\\n /// @notice Sets the protocol's max future pools for fixed borrowing and lending.\\n /// @dev If value is decreased, VALID maturities will become NOT_READY.\\n /// @param futurePools number of pools to be active at the same time.\\n function setMaxFuturePools(uint8 futurePools) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n maxFuturePools = futurePools;\\n emit MaxFuturePoolsSet(futurePools);\\n }\\n\\n /// @notice Sets the penalty rate per second.\\n /// @param penaltyRate_ percentage represented with 18 decimals.\\n function setPenaltyRate(uint256 penaltyRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n penaltyRate = penaltyRate_;\\n emit PenaltyRateSet(penaltyRate_);\\n }\\n\\n /// @notice Sets the percentage that represents the liquidity reserves that can't be borrowed.\\n /// @param reserveFactor_ parameter represented with 18 decimals.\\n function setReserveFactor(uint128 reserveFactor_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n reserveFactor = reserveFactor_;\\n emit ReserveFactorSet(reserveFactor_);\\n }\\n\\n /// @notice Sets the treasury variables.\\n /// @param treasury_ address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate_ represented with 18 decimals.\\n function setTreasury(address treasury_, uint256 treasuryFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n depositToTreasury(updateFloatingDebt());\\n treasury = treasury_;\\n treasuryFeeRate = treasuryFeeRate_;\\n emit TreasurySet(treasury_, treasuryFeeRate_);\\n }\\n\\n /// @notice Sets the pause state to true in case of emergency, triggered by an authorized account.\\n function pause() external onlyRole(PAUSER_ROLE) {\\n _pause();\\n }\\n\\n /// @notice Sets the pause state to false when threat is gone, triggered by an authorized account.\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @notice Event emitted when an account borrows amount of assets from a floating pool.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of assets that were borrowed.\\n /// @param shares amount of borrow shares assigned to the account.\\n event Borrow(\\n address indexed caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /// @notice Emitted when an account repays amount of assets to a floating pool.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of assets that was repaid.\\n /// @param shares amount of borrow shares that were subtracted from the account's accountability.\\n event Repay(address indexed caller, address indexed borrower, uint256 assets, uint256 shares);\\n\\n /// @notice Emitted when an account deposits an amount of an asset to a certain fixed rate pool,\\n /// collecting fees at the end of the period.\\n /// @param maturity maturity at which the account will be able to collect his deposit + his fee.\\n /// @param caller address which deposited the assets.\\n /// @param owner address that will be able to withdraw the deposited assets.\\n /// @param assets amount of the asset that were deposited.\\n /// @param fee is the extra amount that it will be collected at maturity.\\n event DepositAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed owner,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account withdraws from a fixed rate pool.\\n /// @param maturity maturity where the account withdraw its deposits.\\n /// @param caller address which withdraw the asset.\\n /// @param receiver address which will be collecting the assets.\\n /// @param owner address which had the assets withdrawn.\\n /// @param positionAssets position size reduced.\\n /// @param assets amount of assets withdrawn (can include a discount for early withdraw).\\n event WithdrawAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 positionAssets,\\n uint256 assets\\n );\\n\\n /// @notice Emitted when an account borrows amount of an asset from a certain maturity date.\\n /// @param maturity maturity in which the account will have to repay the loan.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of the asset that were borrowed.\\n /// @param fee extra amount that will need to be paid at maturity.\\n event BorrowAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account repays its borrows after maturity.\\n /// @param maturity maturity where the account repaid its borrowed amounts.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount that was repaid.\\n /// @param positionAssets amount of the debt that was covered in this repayment (penalties could have been repaid).\\n event RepayAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed borrower,\\n uint256 assets,\\n uint256 positionAssets\\n );\\n\\n /// @notice Emitted when an account's position had a liquidation.\\n /// @param receiver address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of the asset that were repaid.\\n /// @param lendersAssets incentive paid to lenders.\\n /// @param seizeMarket address of the asset that were seized by the liquidator.\\n /// @param seizedAssets amount seized of the collateral.\\n event Liquidate(\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 lendersAssets,\\n Market indexed seizeMarket,\\n uint256 seizedAssets\\n );\\n\\n /// @notice Emitted when an account's collateral has been seized.\\n /// @param liquidator address which seized this collateral.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount seized of the collateral.\\n event Seize(address indexed liquidator, address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when an account is cleared from bad debt.\\n /// @param borrower address which was cleared from bad debt.\\n /// @param assets amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\\n event SpreadBadDebt(address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when the backupFeeRate parameter is changed by admin.\\n /// @param backupFeeRate rate charged to the fixed pools to be accrued by the floating depositors.\\n event BackupFeeRateSet(uint256 backupFeeRate);\\n\\n /// @notice Emitted when the damp speeds are changed by admin.\\n /// @param dampSpeedUp represented with 18 decimals.\\n /// @param dampSpeedDown represented with 18 decimals.\\n event DampSpeedSet(uint256 dampSpeedUp, uint256 dampSpeedDown);\\n\\n /// @notice Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\\n /// @param earningsAccumulatorSmoothFactor factor represented with 18 decimals.\\n event EarningsAccumulatorSmoothFactorSet(uint256 earningsAccumulatorSmoothFactor);\\n\\n /// @notice Emitted when the interestRateModel is changed by admin.\\n /// @param interestRateModel new interest rate model to be used to calculate rates.\\n event InterestRateModelSet(InterestRateModel indexed interestRateModel);\\n\\n /// @notice Emitted when the maxFuturePools is changed by admin.\\n /// @param maxFuturePools represented with 0 decimals.\\n event MaxFuturePoolsSet(uint256 maxFuturePools);\\n\\n /// @notice Emitted when the penaltyRate is changed by admin.\\n /// @param penaltyRate penaltyRate percentage per second represented with 18 decimals.\\n event PenaltyRateSet(uint256 penaltyRate);\\n\\n /// @notice Emitted when the reserveFactor is changed by admin.\\n /// @param reserveFactor reserveFactor percentage.\\n event ReserveFactorSet(uint256 reserveFactor);\\n\\n /// @notice Emitted when the treasury variables are changed by admin.\\n /// @param treasury address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate represented with 18 decimals.\\n event TreasurySet(address indexed treasury, uint256 treasuryFeeRate);\\n\\n /// @notice Emitted when the rewardsController is changed by admin.\\n /// @param rewardsController new rewards controller to update account rewards when operating with the Market.\\n event RewardsControllerSet(RewardsController indexed rewardsController);\\n\\n /// @notice Emitted when market state is updated.\\n /// @param timestamp current timestamp.\\n /// @param floatingDepositShares total floating supply shares.\\n /// @param floatingAssets total floating supply assets.\\n /// @param floatingBorrowShares total floating borrow shares.\\n /// @param floatingDebt total floating borrow assets.\\n /// @param earningsAccumulator earnings accumulator.\\n event MarketUpdate(\\n uint256 timestamp,\\n uint256 floatingDepositShares,\\n uint256 floatingAssets,\\n uint256 floatingBorrowShares,\\n uint256 floatingDebt,\\n uint256 earningsAccumulator\\n );\\n\\n /// @notice Emitted when the earnings of a maturity are updated.\\n /// @param timestamp current timestamp.\\n /// @param maturity maturity date where the earnings were updated.\\n /// @param unassignedEarnings pending unassigned earnings.\\n event FixedEarningsUpdate(uint256 timestamp, uint256 indexed maturity, uint256 unassignedEarnings);\\n\\n /// @notice Emitted when accumulator distributes earnings.\\n /// @param timestamp current timestamp.\\n event AccumulatorAccrual(uint256 timestamp);\\n\\n /// @notice Emitted when the floating debt is updated.\\n /// @param timestamp current timestamp.\\n /// @param utilization new floating utilization.\\n event FloatingDebtUpdate(uint256 timestamp, uint256 utilization);\\n\\n /// @notice Stores fixed deposits and fixed borrows map and floating borrow shares of an account.\\n /// @param fixedDeposits encoded map maturity dates where the account supplied to.\\n /// @param fixedBorrows encoded map maturity dates where the account borrowed from.\\n /// @param floatingBorrowShares number of floating borrow shares assigned to the account.\\n struct Account {\\n uint256 fixedDeposits;\\n uint256 fixedBorrows;\\n uint256 floatingBorrowShares;\\n }\\n}\\n\\nerror Disagreement();\\nerror InsufficientProtocolLiquidity();\\nerror NotAuditor();\\nerror SelfLiquidation();\\nerror ZeroBorrow();\\nerror ZeroDeposit();\\nerror ZeroRepay();\\nerror ZeroWithdraw();\\n\",\"keccak256\":\"0x94894ef0aeac99df31979475878d006fb676a9d795d9cfc3b3b1ed321ed672d8\",\"license\":\"BUSL-1.1\"},\"contracts/RewardsController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { SafeTransferLib } from \\\"solmate/src/utils/SafeTransferLib.sol\\\";\\nimport { ERC20 } from \\\"solmate/src/tokens/ERC20.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Auditor } from \\\"./Auditor.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract RewardsController is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint64;\\n using FixedPointMathLib for int256;\\n using SafeTransferLib for ERC20;\\n\\n /// @notice Max utilization supported by the sigmoid function not to cause a division by zero (1e18 = WAD).\\n uint256 public constant UTILIZATION_CAP = 1e18 - 1;\\n /// @notice Tracks the reward distribution data for a given market.\\n mapping(Market => Distribution) public distribution;\\n /// @notice Tracks enabled asset rewards.\\n mapping(ERC20 => bool) public rewardEnabled;\\n /// @notice Stores registered asset rewards.\\n ERC20[] public rewardList;\\n /// @notice Stores Markets with distributions set.\\n Market[] public marketList;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev Can only be called once.\\n function initialize() external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded deposit.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleDeposit(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n ops[0] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n update(account, market, dist.availableRewards[r], ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded borrow.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleBorrow(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n (, , uint256 accountFloatingBorrowShares) = market.accounts(account);\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n ERC20 reward = dist.availableRewards[r];\\n ops[0] = AccountOperation({\\n operation: true,\\n balance: accountFloatingBorrowShares + accountFixedBorrowShares(market, account, dist.rewards[reward].start)\\n });\\n update(account, Market(msg.sender), reward, ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Claims all `msg.sender` rewards to the given account.\\n /// @param to The address to send the rewards to.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claimAll(address to) external returns (ERC20[] memory rewardsList, uint256[] memory claimedAmounts) {\\n return claim(allMarketsOperations(), to, rewardList);\\n }\\n\\n /// @notice Claims `msg.sender` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param to The address to send the rewards to.\\n /// @param rewardsList The list of rewards assets to claim.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n address to,\\n ERC20[] memory rewardsList\\n ) public claimSender returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n uint256 rewardsCount = rewardsList.length;\\n claimedAmounts = new uint256[](rewardsCount);\\n address sender = _claimSender;\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n uint256 availableRewards = dist.availableRewardsCount;\\n for (uint128 r = 0; r < availableRewards; ) {\\n update(\\n sender,\\n marketOperation.market,\\n dist.availableRewards[r],\\n accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n sender,\\n dist.rewards[dist.availableRewards[r]].start\\n )\\n );\\n unchecked {\\n ++r;\\n }\\n }\\n for (uint256 r = 0; r < rewardsCount; ) {\\n RewardData storage rewardData = dist.rewards[rewardsList[r]];\\n for (uint256 o = 0; o < marketOperation.operations.length; ) {\\n uint256 rewardAmount = rewardData.accounts[sender][marketOperation.operations[o]].accrued;\\n if (rewardAmount != 0) {\\n claimedAmounts[r] += rewardAmount;\\n rewardData.accounts[sender][marketOperation.operations[o]].accrued = 0;\\n }\\n unchecked {\\n ++o;\\n }\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 r = 0; r < rewardsList.length; ) {\\n uint256 claimedAmount = claimedAmounts[r];\\n if (claimedAmount > 0) {\\n rewardsList[r].safeTransfer(to, claimedAmount);\\n emit Claim(sender, rewardsList[r], to, claimedAmount);\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n return (rewardsList, claimedAmounts);\\n }\\n\\n /// @notice Claims `permit.owner` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param permit Arguments and signature from `permit.owner`.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n ClaimPermit calldata permit\\n ) external permitSender(permit) returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n return claim(marketOps, msg.sender, permit.assets);\\n }\\n\\n /// @notice Gets the configuration of a given distribution.\\n /// @param market The market to get the distribution configuration for.\\n /// @param reward The reward asset.\\n /// @return The distribution configuration.\\n function rewardConfig(Market market, ERC20 reward) external view returns (Config memory) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return\\n Config({\\n market: market,\\n reward: reward,\\n priceFeed: rewardData.priceFeed,\\n start: rewardData.start,\\n distributionPeriod: rewardData.end - rewardData.start,\\n targetDebt: rewardData.targetDebt,\\n totalDistribution: rewardData.totalDistribution,\\n undistributedFactor: rewardData.undistributedFactor,\\n flipSpeed: rewardData.flipSpeed,\\n compensationFactor: rewardData.compensationFactor,\\n transitionFactor: rewardData.transitionFactor,\\n borrowAllocationWeightFactor: rewardData.borrowAllocationWeightFactor,\\n depositAllocationWeightAddend: rewardData.depositAllocationWeightAddend,\\n depositAllocationWeightFactor: rewardData.depositAllocationWeightFactor\\n });\\n }\\n\\n /// @notice Gets the amount of reward assets that are being distributed for a Market.\\n /// @param market Market to get the number of available rewards to distribute.\\n /// @return The amount reward assets set to a Market.\\n function availableRewardsCount(Market market) external view returns (uint256) {\\n return distribution[market].availableRewardsCount;\\n }\\n\\n /// @notice Gets the account data of a given account, Market, operation and reward asset.\\n /// @param account The account to get the operation data from.\\n /// @param market The market in which the operation was made.\\n /// @param operation True if the operation was a borrow, false if it was a deposit.\\n /// @param reward The reward asset.\\n /// @return accrued The accrued amount.\\n /// @return index The account index.\\n function accountOperation(\\n address account,\\n Market market,\\n bool operation,\\n ERC20 reward\\n ) external view returns (uint256, uint256) {\\n Account storage operationAccount = distribution[market].rewards[reward].accounts[account][operation];\\n return (operationAccount.accrued, operationAccount.index);\\n }\\n\\n /// @notice Gets the distribution `start`, `end` and `lastUpdate` value of a given market and reward.\\n /// @param market The market to get the distribution times.\\n /// @param reward The reward asset.\\n /// @return The distribution `start`, `end` and `lastUpdate` time.\\n function distributionTime(Market market, ERC20 reward) external view returns (uint32, uint32, uint32) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.start, rewardData.end, rewardData.lastUpdate);\\n }\\n\\n /// @notice Retrieves all rewards addresses.\\n function allRewards() external view returns (ERC20[] memory) {\\n return rewardList;\\n }\\n\\n /// @notice Gets all market and operations.\\n /// @return marketOps The list of market operations.\\n function allMarketsOperations() public view returns (MarketOperation[] memory marketOps) {\\n Market[] memory markets = marketList;\\n marketOps = new MarketOperation[](markets.length);\\n for (uint256 m = 0; m < markets.length; ) {\\n bool[] memory ops = new bool[](2);\\n ops[0] = true;\\n ops[1] = false;\\n marketOps[m] = MarketOperation({ market: markets[m], operations: ops });\\n unchecked {\\n ++m;\\n }\\n }\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account and reward asset.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function allClaimable(address account, ERC20 reward) external view returns (uint256 unclaimedRewards) {\\n return claimable(allMarketsOperations(), account, reward);\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account, Market operations and reward asset.\\n /// @param marketOps The list of Market operations to get the accrued and pending rewards from.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function claimable(\\n MarketOperation[] memory marketOps,\\n address account,\\n ERC20 reward\\n ) public view returns (uint256 unclaimedRewards) {\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n RewardData storage rewardData = dist.rewards[reward];\\n if (dist.availableRewardsCount == 0) {\\n unchecked {\\n ++i;\\n }\\n continue;\\n }\\n\\n AccountOperation[] memory ops = accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n account,\\n rewardData.start\\n );\\n uint256 balance;\\n for (uint256 o = 0; o < ops.length; ) {\\n unclaimedRewards += rewardData.accounts[account][ops[o].operation].accrued;\\n balance += ops[o].balance;\\n unchecked {\\n ++o;\\n }\\n }\\n if (balance > 0) {\\n unclaimedRewards += pendingRewards(\\n account,\\n reward,\\n AccountMarketOperation({ market: marketOperation.market, accountOperations: ops })\\n );\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Iterates and accrues all rewards for the operations of the given account in the given market.\\n /// @param account The account to accrue the rewards for.\\n /// @param market The Market in which the operations where made.\\n /// @param reward The reward asset.\\n /// @param ops The operations to accrue the rewards for.\\n function update(address account, Market market, ERC20 reward, AccountOperation[] memory ops) internal {\\n uint256 baseUnit = distribution[market].baseUnit;\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n {\\n uint256 lastUpdate = rewardData.lastUpdate;\\n // `lastUpdate` can be greater than `block.timestamp` if distribution is set to start on a future date\\n if (block.timestamp > lastUpdate) {\\n (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) = previewAllocation(\\n rewardData,\\n market,\\n block.timestamp - lastUpdate\\n );\\n if (borrowIndex > type(uint128).max || depositIndex > type(uint128).max) revert IndexOverflow();\\n rewardData.borrowIndex = uint128(borrowIndex);\\n rewardData.depositIndex = uint128(depositIndex);\\n rewardData.lastUpdate = uint32(block.timestamp);\\n rewardData.lastUndistributed = newUndistributed;\\n emit IndexUpdate(market, reward, borrowIndex, depositIndex, newUndistributed, block.timestamp);\\n }\\n }\\n\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 i = 0; i < ops.length; ) {\\n AccountOperation memory op = ops[i];\\n Account storage accountData = operationAccount[op.operation];\\n uint256 accountIndex = accountData.index;\\n uint256 newAccountIndex;\\n if (op.operation) {\\n newAccountIndex = rewardData.borrowIndex;\\n } else {\\n newAccountIndex = rewardData.depositIndex;\\n }\\n if (accountIndex != newAccountIndex) {\\n accountData.index = uint128(newAccountIndex);\\n if (op.balance != 0) {\\n uint256 rewardsAccrued = accountRewards(op.balance, newAccountIndex, accountIndex, baseUnit);\\n accountData.accrued += uint128(rewardsAccrued);\\n emit Accrue(market, reward, account, op.operation, accountIndex, newAccountIndex, rewardsAccrued);\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the equivalent of borrow shares from fixed pool principal borrows of an account.\\n /// @param market The Market to get the fixed borrows from.\\n /// @param account The account that borrowed from fixed pools.\\n /// @return fixedDebt The fixed borrow shares.\\n function accountFixedBorrowShares(\\n Market market,\\n address account,\\n uint32 start\\n ) internal view returns (uint256 fixedDebt) {\\n uint256 firstMaturity = start - (start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 principal, ) = market.fixedBorrowPositions(maturity, account);\\n fixedDebt += principal;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n fixedDebt = market.previewRepay(fixedDebt);\\n }\\n\\n /// @notice Gets the reward indexes and last amount of undistributed rewards for a given market and reward asset.\\n /// @param market The market to get the reward indexes for.\\n /// @param reward The reward asset to get the reward indexes for.\\n /// @return borrowIndex The index for the floating and fixed borrow operation.\\n /// @return depositIndex The index for the floating deposit operation.\\n /// @return lastUndistributed The last amount of undistributed rewards.\\n function rewardIndexes(Market market, ERC20 reward) external view returns (uint256, uint256, uint256) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.borrowIndex, rewardData.depositIndex, rewardData.lastUndistributed);\\n }\\n\\n /// @notice Calculates the rewards not accrued yet for the given operations of a given account and reward asset.\\n /// @param account The account to get the pending rewards for.\\n /// @param reward The reward asset to get the pending rewards for.\\n /// @param ops The operations to get the pending rewards for.\\n /// @return rewards The pending rewards for the given operations.\\n function pendingRewards(\\n address account,\\n ERC20 reward,\\n AccountMarketOperation memory ops\\n ) internal view returns (uint256 rewards) {\\n RewardData storage rewardData = distribution[ops.market].rewards[reward];\\n uint256 baseUnit = distribution[ops.market].baseUnit;\\n uint256 lastUpdate = rewardData.lastUpdate;\\n (uint256 borrowIndex, uint256 depositIndex, ) = previewAllocation(\\n rewardData,\\n ops.market,\\n block.timestamp > lastUpdate ? block.timestamp - lastUpdate : 0\\n );\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 o = 0; o < ops.accountOperations.length; ) {\\n uint256 nextIndex;\\n if (ops.accountOperations[o].operation) {\\n nextIndex = borrowIndex;\\n } else {\\n nextIndex = depositIndex;\\n }\\n\\n rewards += accountRewards(\\n ops.accountOperations[o].balance,\\n nextIndex,\\n operationAccount[ops.accountOperations[o].operation].index,\\n baseUnit\\n );\\n unchecked {\\n ++o;\\n }\\n }\\n }\\n\\n /// @notice Calculates and returns the new amount of rewards given by the difference between the `accountIndex` and\\n /// the `globalIndex`.\\n /// @param balance The account's balance in the operation's pool.\\n /// @param globalIndex Current index of the distribution.\\n /// @param accountIndex Last index stored for the account.\\n /// @param baseUnit One unit of the Market's asset (10**decimals).\\n /// @return The amount of new rewards to be accrued by the account.\\n function accountRewards(\\n uint256 balance,\\n uint256 globalIndex,\\n uint256 accountIndex,\\n uint256 baseUnit\\n ) internal pure returns (uint256) {\\n return balance.mulDivDown(globalIndex - accountIndex, baseUnit);\\n }\\n\\n /// @notice Retrieves projected distribution indexes and new undistributed amount for a given `deltaTime`.\\n /// @param market The market to calculate the indexes for.\\n /// @param reward The reward asset to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n Market market,\\n ERC20 reward,\\n uint256 deltaTime\\n ) external view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n return previewAllocation(distribution[market].rewards[reward], market, deltaTime);\\n }\\n\\n /// @notice Calculates and returns the distribution indexes and new undistributed tokens for a given `rewardData`.\\n /// @param rewardData The distribution's data.\\n /// @param market The market to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n RewardData storage rewardData,\\n Market market,\\n uint256 deltaTime\\n ) internal view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n TotalMarketBalance memory m;\\n m.debt = market.totalFloatingBorrowAssets();\\n m.supply = market.totalAssets();\\n TimeVars memory t;\\n t.start = rewardData.start;\\n t.end = rewardData.end;\\n {\\n uint256 firstMaturity = t.start - (t.start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n uint256 fixedDebt;\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 borrowed, uint256 supplied) = market.fixedPoolBalance(maturity);\\n fixedDebt += borrowed;\\n m.supply += supplied;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n m.debt += fixedDebt;\\n m.fixedBorrowShares = market.previewRepay(fixedDebt);\\n }\\n uint256 target;\\n {\\n uint256 targetDebt = rewardData.targetDebt;\\n target = m.debt < targetDebt ? m.debt.divWadDown(targetDebt) : 1e18;\\n }\\n uint256 rewards;\\n {\\n uint256 releaseRate = rewardData.releaseRate;\\n uint256 lastUndistributed = rewardData.lastUndistributed;\\n t.period = t.end - t.start;\\n uint256 distributionFactor = t.period > 0\\n ? rewardData.undistributedFactor.mulDivDown(target, t.period * 1e18)\\n : 0;\\n if (block.timestamp <= t.end) {\\n if (distributionFactor > 0) {\\n uint256 exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n } else if (rewardData.lastUpdate > t.end) {\\n newUndistributed =\\n lastUndistributed -\\n lastUndistributed.mulWadUp(1e18 - uint256((-int256(distributionFactor * deltaTime)).expWad()));\\n rewards = uint256(-(int256(newUndistributed) - int256(lastUndistributed)));\\n } else {\\n uint256 exponential;\\n deltaTime = t.end - rewardData.lastUpdate;\\n if (distributionFactor > 0) {\\n exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n exponential = uint256((-int256(distributionFactor * (block.timestamp - t.end))).expWad());\\n newUndistributed = newUndistributed - newUndistributed.mulWadUp(1e18 - exponential);\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n }\\n if (rewards == 0) return (rewardData.borrowIndex, rewardData.depositIndex, newUndistributed);\\n }\\n {\\n AllocationVars memory v;\\n v.utilization = m.supply > 0 ? Math.min(m.debt.divWadDown(m.supply), UTILIZATION_CAP) : 0;\\n v.transitionFactor = rewardData.transitionFactor;\\n v.flipSpeed = rewardData.flipSpeed;\\n v.borrowAllocationWeightFactor = rewardData.borrowAllocationWeightFactor;\\n v.sigmoid = v.utilization > 0\\n ? uint256(1e18).divWadDown(\\n 1e18 +\\n uint256(\\n (-(v.flipSpeed *\\n (int256(v.utilization.divWadDown(1e18 - v.utilization)).lnWad() -\\n int256(v.transitionFactor.divWadDown(1e18 - v.transitionFactor)).lnWad())) / 1e18).expWad()\\n )\\n )\\n : 0;\\n v.borrowRewardRule = rewardData\\n .compensationFactor\\n .mulWadDown(\\n market.interestRateModel().floatingRate(v.utilization).mulWadDown(\\n 1e18 - v.utilization.mulWadUp(1e18 - market.treasuryFeeRate())\\n ) + v.borrowAllocationWeightFactor\\n )\\n .mulWadDown(1e18 - v.sigmoid);\\n v.depositRewardRule =\\n rewardData.depositAllocationWeightAddend.mulWadDown(1e18 - v.sigmoid) +\\n rewardData.depositAllocationWeightFactor.mulWadDown(v.sigmoid);\\n v.borrowAllocation = v.borrowRewardRule.divWadDown(v.borrowRewardRule + v.depositRewardRule);\\n v.depositAllocation = 1e18 - v.borrowAllocation;\\n {\\n uint256 totalDepositSupply = market.totalSupply();\\n uint256 totalBorrowSupply = market.totalFloatingBorrowShares() + m.fixedBorrowShares;\\n uint256 baseUnit = distribution[market].baseUnit;\\n borrowIndex =\\n rewardData.borrowIndex +\\n (totalBorrowSupply > 0 ? rewards.mulWadDown(v.borrowAllocation).mulDivDown(baseUnit, totalBorrowSupply) : 0);\\n depositIndex =\\n rewardData.depositIndex +\\n (\\n totalDepositSupply > 0\\n ? rewards.mulWadDown(v.depositAllocation).mulDivDown(baseUnit, totalDepositSupply)\\n : 0\\n );\\n }\\n }\\n }\\n\\n /// @notice Get account balances of the given Market operations.\\n /// @param market The address of the Market.\\n /// @param ops List of operations to retrieve account balance.\\n /// @param account Account to get the balance from.\\n /// @param distributionStart Timestamp of the start of the distribution to correctly get the rewarded fixed pools.\\n /// @return accountBalanceOps contains a list with account balance per each operation.\\n function accountBalanceOperations(\\n Market market,\\n bool[] memory ops,\\n address account,\\n uint32 distributionStart\\n ) internal view returns (AccountOperation[] memory accountBalanceOps) {\\n accountBalanceOps = new AccountOperation[](ops.length);\\n for (uint256 i = 0; i < ops.length; ) {\\n if (ops[i]) {\\n (, , uint256 floatingBorrowShares) = market.accounts(account);\\n accountBalanceOps[i] = AccountOperation({\\n operation: true,\\n balance: floatingBorrowShares + accountFixedBorrowShares(market, account, distributionStart)\\n });\\n } else {\\n accountBalanceOps[i] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Withdraws the contract's balance of the given asset to the given address.\\n /// @param asset The asset to withdraw.\\n /// @param to The address to withdraw the asset to.\\n function withdraw(ERC20 asset, address to) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n asset.safeTransfer(to, asset.balanceOf(address(this)));\\n }\\n\\n /// @notice Enables or updates the reward distribution for the given markets and rewards.\\n /// @param configs The configurations to update each RewardData with.\\n function config(Config[] memory configs) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n for (uint256 i = 0; i < configs.length; ) {\\n // transitionFactor cannot be eq or higher than 1e18 to avoid division by zero or underflow\\n if (configs[i].transitionFactor >= 1e18) revert InvalidConfig();\\n // depositAllocationWeightFactor cannot be zero to avoid division by zero when sigmoid equals 1e18\\n if (configs[i].depositAllocationWeightFactor == 0) revert InvalidConfig();\\n\\n Distribution storage dist = distribution[configs[i].market];\\n RewardData storage rewardData = dist.rewards[configs[i].reward];\\n\\n if (dist.baseUnit == 0) {\\n // never initialized before, adding to the list of markets\\n marketList.push(configs[i].market);\\n }\\n if (!rewardEnabled[configs[i].reward]) {\\n // add reward address to global rewards list if still not enabled\\n rewardEnabled[configs[i].reward] = true;\\n rewardList.push(configs[i].reward);\\n }\\n if (rewardData.lastUpdate == 0) {\\n // add reward address to distribution data's available rewards if distribution is new\\n dist.availableRewards[dist.availableRewardsCount++] = configs[i].reward;\\n dist.baseUnit = 10 ** configs[i].market.decimals();\\n // set initial parameters if distribution is new\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n } else {\\n uint32 start = rewardData.start;\\n uint32 end = rewardData.end;\\n // update global indexes before updating distribution values\\n bool[] memory ops = new bool[](1);\\n ops[0] = true;\\n update(\\n address(0),\\n configs[i].market,\\n configs[i].reward,\\n accountBalanceOperations(configs[i].market, ops, address(0), start)\\n );\\n // properly update release rate\\n if (block.timestamp < end) {\\n uint256 released = 0;\\n uint256 elapsed = 0;\\n if (block.timestamp > start) {\\n released =\\n rewardData.lastConfigReleased +\\n rewardData.releaseRate *\\n (block.timestamp - rewardData.lastConfig);\\n elapsed = block.timestamp - start;\\n if (configs[i].totalDistribution <= released || configs[i].distributionPeriod <= elapsed) {\\n revert InvalidConfig();\\n }\\n rewardData.lastConfigReleased = released;\\n }\\n\\n rewardData.releaseRate =\\n (configs[i].totalDistribution - released) /\\n (configs[i].distributionPeriod - elapsed);\\n } else if (rewardData.start != configs[i].start) {\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n rewardData.lastConfigReleased = 0;\\n }\\n }\\n rewardData.lastConfig = uint32(block.timestamp);\\n rewardData.end = rewardData.start + uint32(configs[i].distributionPeriod);\\n rewardData.priceFeed = configs[i].priceFeed;\\n // set emission and distribution parameters\\n rewardData.totalDistribution = configs[i].totalDistribution;\\n rewardData.targetDebt = configs[i].targetDebt;\\n rewardData.undistributedFactor = configs[i].undistributedFactor;\\n rewardData.flipSpeed = configs[i].flipSpeed;\\n rewardData.compensationFactor = configs[i].compensationFactor;\\n rewardData.borrowAllocationWeightFactor = configs[i].borrowAllocationWeightFactor;\\n rewardData.depositAllocationWeightAddend = configs[i].depositAllocationWeightAddend;\\n rewardData.transitionFactor = configs[i].transitionFactor;\\n rewardData.depositAllocationWeightFactor = configs[i].depositAllocationWeightFactor;\\n\\n emit DistributionSet(configs[i].market, configs[i].reward, configs[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n mapping(address => uint256) public nonces;\\n\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(\\\"RewardsController\\\"),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n address private _claimSender;\\n modifier claimSender() {\\n if (_claimSender == address(0)) _claimSender = msg.sender;\\n _;\\n delete _claimSender;\\n }\\n\\n modifier permitSender(ClaimPermit calldata permit) {\\n assert(_claimSender == address(0));\\n assert(permit.deadline >= block.timestamp);\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\\"ClaimPermit(address owner,address spender,address[] assets,uint256 deadline)\\\"),\\n permit.owner,\\n msg.sender,\\n permit.assets,\\n nonces[permit.owner]++,\\n permit.deadline\\n )\\n )\\n )\\n ),\\n permit.v,\\n permit.r,\\n permit.s\\n );\\n assert(recoveredAddress != address(0) && recoveredAddress == permit.owner);\\n _claimSender = permit.owner;\\n }\\n _;\\n assert(_claimSender == address(0));\\n }\\n\\n struct TotalMarketBalance {\\n uint256 debt;\\n uint256 supply;\\n uint256 fixedBorrowShares;\\n }\\n\\n struct TimeVars {\\n uint256 start;\\n uint256 end;\\n uint256 period;\\n }\\n\\n struct AllocationVars {\\n uint256 utilization;\\n uint256 sigmoid;\\n uint256 borrowRewardRule;\\n uint256 depositRewardRule;\\n uint256 borrowAllocation;\\n uint256 depositAllocation;\\n uint256 transitionFactor;\\n int256 flipSpeed;\\n uint256 borrowAllocationWeightFactor;\\n }\\n\\n struct AccountOperation {\\n bool operation;\\n uint256 balance;\\n }\\n\\n struct MarketOperation {\\n Market market;\\n bool[] operations;\\n }\\n\\n struct AccountMarketOperation {\\n Market market;\\n AccountOperation[] accountOperations;\\n }\\n\\n struct Account {\\n // liquidity index of the reward distribution for the account\\n uint128 index;\\n // amount of accrued rewards for the account since last account index update\\n uint128 accrued;\\n }\\n\\n struct Config {\\n Market market;\\n ERC20 reward;\\n IPriceFeed priceFeed;\\n uint32 start;\\n uint256 distributionPeriod;\\n uint256 targetDebt;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n }\\n\\n struct RewardData {\\n // distribution model\\n uint256 targetDebt;\\n uint256 releaseRate;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n uint256 lastUndistributed;\\n // allocation model\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n // liquidity indexes of the reward distribution\\n uint128 borrowIndex;\\n uint128 depositIndex;\\n // distribution timestamps\\n uint32 start;\\n uint32 end;\\n uint32 lastUpdate;\\n // config helpers\\n uint32 lastConfig;\\n uint256 lastConfigReleased;\\n // price feed\\n IPriceFeed priceFeed;\\n // account addresses and their rewards data (index & accrued)\\n mapping(address => mapping(bool => Account)) accounts;\\n }\\n\\n struct Distribution {\\n // reward assets and their data\\n mapping(ERC20 => RewardData) rewards;\\n // list of reward asset addresses for the market\\n mapping(uint128 => ERC20) availableRewards;\\n // count of reward tokens for the market\\n uint8 availableRewardsCount;\\n // base unit of the market\\n uint256 baseUnit;\\n }\\n\\n /// @notice Emitted when rewards are accrued by an account.\\n /// @param market Market where the operation was made.\\n /// @param reward reward asset.\\n /// @param account account that accrued the rewards.\\n /// @param operation true if the operation was a borrow, false if it was a deposit.\\n /// @param accountIndex previous account index.\\n /// @param operationIndex new operation index that is assigned to the `accountIndex`.\\n /// @param rewardsAccrued amount of rewards accrued.\\n event Accrue(\\n Market indexed market,\\n ERC20 indexed reward,\\n address indexed account,\\n bool operation,\\n uint256 accountIndex,\\n uint256 operationIndex,\\n uint256 rewardsAccrued\\n );\\n\\n /// @notice Emitted when rewards are claimed by an account.\\n /// @param account account that claimed the rewards.\\n /// @param reward reward asset.\\n /// @param to account that received the rewards.\\n /// @param amount amount of rewards claimed.\\n event Claim(address indexed account, ERC20 indexed reward, address indexed to, uint256 amount);\\n\\n /// @notice Emitted when a distribution is set.\\n /// @param market Market whose distribution was set.\\n /// @param reward reward asset to be distributed when operating with the Market.\\n /// @param config configuration struct containing the distribution parameters.\\n event DistributionSet(Market indexed market, ERC20 indexed reward, Config config);\\n\\n /// @notice Emitted when the distribution indexes are updated.\\n /// @param market Market of the distribution.\\n /// @param reward reward asset.\\n /// @param borrowIndex index of the borrow operations of a distribution.\\n /// @param depositIndex index of the deposit operations of a distribution.\\n /// @param newUndistributed amount of undistributed rewards.\\n /// @param lastUpdate current timestamp.\\n event IndexUpdate(\\n Market indexed market,\\n ERC20 indexed reward,\\n uint256 borrowIndex,\\n uint256 depositIndex,\\n uint256 newUndistributed,\\n uint256 lastUpdate\\n );\\n}\\n\\nerror IndexOverflow();\\nerror InvalidConfig();\\n\\nstruct ClaimPermit {\\n address owner;\\n ERC20[] assets;\\n uint256 deadline;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n}\\n\",\"keccak256\":\"0x6665130d5a65a5b86a031f11804f5e5b04605d25b35822dca3ddba134188954f\",\"license\":\"BUSL-1.1\"},\"contracts/utils/FixedLib.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\nlibrary FixedLib {\\n using FixedPointMathLib for uint256;\\n\\n uint256 internal constant INTERVAL = 4 weeks;\\n\\n /// @notice Gets the amount of revenue sharing between the backup supplier and the new fixed pool supplier.\\n /// @param pool fixed rate pool.\\n /// @param amount amount being provided by the fixed pool supplier.\\n /// @param backupFeeRate rate charged to the fixed pool supplier to be accrued by the backup supplier.\\n /// @return yield amount to be offered to the fixed pool supplier.\\n /// @return backupFee yield to be accrued by the backup supplier for initially providing the liquidity.\\n function calculateDeposit(\\n Pool memory pool,\\n uint256 amount,\\n uint256 backupFeeRate\\n ) internal pure returns (uint256 yield, uint256 backupFee) {\\n uint256 memBackupSupplied = backupSupplied(pool);\\n if (memBackupSupplied != 0) {\\n yield = pool.unassignedEarnings.mulDivDown(Math.min(amount, memBackupSupplied), memBackupSupplied);\\n backupFee = yield.mulWadDown(backupFeeRate);\\n yield -= backupFee;\\n }\\n }\\n\\n /// @notice Registers an operation to add supply to a fixed rate pool and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be added to the supply.\\n /// @param amount amount to be added to the supply.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function deposit(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.supplied = supplied + amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to reduce borrowed amount from a fixed rate pool\\n /// and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be repaid.\\n /// @param amount amount to be added to the fixed rate pool.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function repay(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.borrowed = borrowed - amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to increase borrowed amount of a fixed rate pool\\n /// and potentially increase backup debt.\\n /// @param pool fixed rate pool where an amount will be borrowed.\\n /// @param amount amount to be borrowed from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function borrow(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 newBorrowed = borrowed + amount;\\n\\n backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, pool.supplied), newBorrowed);\\n pool.borrowed = newBorrowed;\\n }\\n\\n /// @notice Registers an operation to reduce supply from a fixed rate pool and potentially increase backup debt.\\n /// @param pool fixed rate pool where amount will be withdrawn.\\n /// @param amountToDiscount amount to be withdrawn from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function withdraw(Pool storage pool, uint256 amountToDiscount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n uint256 newSupply = supplied - amountToDiscount;\\n\\n backupDebtAddition = Math.min(supplied, borrowed) - Math.min(newSupply, borrowed);\\n pool.supplied = newSupply;\\n }\\n\\n /// @notice Accrues backup earnings from `unassignedEarnings` based on the `lastAccrual` time.\\n /// @param pool fixed rate pool where earnings will be accrued.\\n /// @param maturity maturity date of the pool.\\n /// @return backupEarnings amount of earnings to be distributed to the backup supplier.\\n function accrueEarnings(Pool storage pool, uint256 maturity) internal returns (uint256 backupEarnings) {\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (block.timestamp < maturity) {\\n uint256 unassignedEarnings = pool.unassignedEarnings;\\n pool.lastAccrual = block.timestamp;\\n backupEarnings = unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual);\\n pool.unassignedEarnings = unassignedEarnings - backupEarnings;\\n } else if (lastAccrual == maturity) {\\n backupEarnings = 0;\\n } else {\\n pool.lastAccrual = maturity;\\n backupEarnings = pool.unassignedEarnings;\\n pool.unassignedEarnings = 0;\\n }\\n }\\n\\n /// @notice Calculates the amount that a fixed rate pool borrowed from the backup supplier.\\n /// @param pool fixed rate pool.\\n /// @return amount borrowed from the fixed rate pool.\\n function backupSupplied(Pool memory pool) internal pure returns (uint256) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n return borrowed - Math.min(borrowed, supplied);\\n }\\n\\n /// @notice Modify positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it. Needs for the amount to be less than the principal and the fee\\n /// @param position original position to be scaled.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return scaled position.\\n function scaleProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 principal = amount.mulDivDown(position.principal, position.principal + position.fee);\\n position.principal = principal;\\n position.fee = amount - principal;\\n return position;\\n }\\n\\n /// @notice Reduce positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it.\\n /// @param position original position to be reduced.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return reduced position.\\n function reduceProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 positionAssets = position.principal + position.fee;\\n uint256 newPositionAssets = positionAssets - amount;\\n position.principal = newPositionAssets.mulDivDown(position.principal, positionAssets);\\n position.fee = newPositionAssets - position.principal;\\n return position;\\n }\\n\\n /// @notice Calculates what proportion of earnings would `borrowAmount` represent considering `backupSupplied`.\\n /// @param earnings amount to be distributed.\\n /// @param borrowAmount amount that will be checked if came from the backup supplier or fixed rate pool.\\n /// @return unassignedEarnings earnings to be added to `unassignedEarnings`.\\n /// @return backupEarnings earnings to be distributed to the backup supplier.\\n function distributeEarnings(\\n Pool memory pool,\\n uint256 earnings,\\n uint256 borrowAmount\\n ) internal pure returns (uint256 unassignedEarnings, uint256 backupEarnings) {\\n backupEarnings = borrowAmount == 0\\n ? 0\\n : earnings.mulDivDown(borrowAmount - Math.min(backupSupplied(pool), borrowAmount), borrowAmount);\\n unassignedEarnings = earnings - backupEarnings;\\n }\\n\\n /// @notice Adds a maturity date to the borrow or supply positions of the account.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity the new maturity where the account will borrow or supply to.\\n /// @return updated encoded maturity dates.\\n function setMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n // initialize the maturity with also the 1st bit on the 33th position set\\n if (encoded == 0) return maturity | (1 << 32);\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n if (maturity < baseMaturity) {\\n // if the new maturity is lower than the base, set it as the new base\\n // wipe clean the last 32 bits, shift the amount of `INTERVAL` and set the new value with the 33rd bit set\\n uint256 range = (baseMaturity - maturity) / INTERVAL;\\n if (encoded >> (256 - range) != 0) revert MaturityOverflow();\\n encoded = ((encoded >> 32) << (32 + range));\\n return maturity | encoded | (1 << 32);\\n } else {\\n uint256 range = (maturity - baseMaturity) / INTERVAL;\\n if (range > 223) revert MaturityOverflow();\\n return encoded | (1 << (32 + range));\\n }\\n }\\n\\n /// @notice Remove maturity from account's borrow or supplied positions.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity maturity date to be removed.\\n /// @return updated encoded maturity dates.\\n function clearMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n if (encoded == 0 || encoded == maturity | (1 << 32)) return 0;\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n // if the baseMaturity is the one being cleaned\\n if (maturity == baseMaturity) {\\n // wipe 32 bytes + 1 for the old base flag\\n uint256 packed = encoded >> 33;\\n uint256 range = 1;\\n while ((packed & 1) == 0 && packed != 0) {\\n unchecked {\\n ++range;\\n }\\n packed >>= 1;\\n }\\n encoded = ((encoded >> (32 + range)) << 32);\\n return (maturity + (range * INTERVAL)) | encoded;\\n } else {\\n // otherwise just clear the bit\\n return encoded & ~(1 << (32 + ((maturity - baseMaturity) / INTERVAL)));\\n }\\n }\\n\\n /// @notice Verifies that a maturity is `VALID`, `MATURED`, `NOT_READY` or `INVALID`.\\n /// @dev if expected state doesn't match the calculated one, it reverts with a custom error `UnmatchedPoolState`.\\n /// @param maturity timestamp of the maturity date to be verified.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param requiredState state required by the caller to be verified (see `State` for description).\\n /// @param alternativeState state required by the caller to be verified (see `State` for description).\\n function checkPoolState(uint256 maturity, uint8 maxPools, State requiredState, State alternativeState) internal view {\\n State state;\\n if (maturity % INTERVAL != 0) {\\n state = State.INVALID;\\n } else if (maturity <= block.timestamp) {\\n state = State.MATURED;\\n } else if (maturity > block.timestamp - (block.timestamp % INTERVAL) + (INTERVAL * maxPools)) {\\n state = State.NOT_READY;\\n } else {\\n state = State.VALID;\\n }\\n\\n if (state != requiredState && state != alternativeState) {\\n if (alternativeState == State.NONE) revert UnmatchedPoolState(uint8(state), uint8(requiredState));\\n\\n revert UnmatchedPoolStates(uint8(state), uint8(requiredState), uint8(alternativeState));\\n }\\n }\\n\\n /// @notice Stores the accountability of a fixed interest rate pool.\\n /// @param borrowed total amount borrowed from the pool.\\n /// @param supplied total amount supplied to the pool.\\n /// @param unassignedEarnings total amount of earnings not yet distributed and accrued.\\n /// @param lastAccrual timestamp for the last time that some earnings have been distributed to the backup supplier.\\n struct Pool {\\n uint256 borrowed;\\n uint256 supplied;\\n uint256 unassignedEarnings;\\n uint256 lastAccrual;\\n }\\n\\n /// @notice Stores principal and fee of a borrow or a supply position of a account in a fixed rate pool.\\n /// @param principal amount borrowed or supplied to the fixed rate pool.\\n /// @param fee amount of fees to be repaid or earned at the maturity of the fixed rate pool.\\n struct Position {\\n uint256 principal;\\n uint256 fee;\\n }\\n\\n enum State {\\n NONE,\\n INVALID,\\n MATURED,\\n VALID,\\n NOT_READY\\n }\\n}\\n\\nerror MaturityOverflow();\\nerror UnmatchedPoolState(uint8 state, uint8 requiredState);\\nerror UnmatchedPoolStates(uint8 state, uint8 requiredState, uint8 alternativeState);\\n\",\"keccak256\":\"0x34f461426e416de7b4d38263269571d0274dda55df2e580e920196096b166c01\",\"license\":\"BUSL-1.1\"},\"contracts/utils/IPriceFeed.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.17;\\n\\ninterface IPriceFeed {\\n function decimals() external view returns (uint8);\\n\\n function latestAnswer() external view returns (int256);\\n}\\n\",\"keccak256\":\"0xce1b3c2ebe700449e2e3c7637ffaf85e574eed3f79925feee22426b2c43fc667\",\"license\":\"BUSL-1.1\"},\"solmate/src/mixins/ERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\nimport {SafeTransferLib} from \\\"../utils/SafeTransferLib.sol\\\";\\nimport {FixedPointMathLib} from \\\"../utils/FixedPointMathLib.sol\\\";\\n\\n/// @notice Minimal ERC4626 tokenized Vault implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)\\nabstract contract ERC4626 is ERC20 {\\n using SafeTransferLib for ERC20;\\n using FixedPointMathLib for uint256;\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /*//////////////////////////////////////////////////////////////\\n IMMUTABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n ERC20 public immutable asset;\\n\\n constructor(\\n ERC20 _asset,\\n string memory _name,\\n string memory _symbol\\n ) ERC20(_name, _symbol, _asset.decimals()) {\\n asset = _asset;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {\\n // Check for rounding error since we round down in previewDeposit.\\n require((shares = previewDeposit(assets)) != 0, \\\"ZERO_SHARES\\\");\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {\\n assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up.\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 shares) {\\n shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up.\\n\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 assets) {\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n // Check for rounding error since we round down in previewRedeem.\\n require((assets = previewRedeem(shares)) != 0, \\\"ZERO_ASSETS\\\");\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ACCOUNTING LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function totalAssets() public view virtual returns (uint256);\\n\\n function convertToShares(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets());\\n }\\n\\n function convertToAssets(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply);\\n }\\n\\n function previewDeposit(uint256 assets) public view virtual returns (uint256) {\\n return convertToShares(assets);\\n }\\n\\n function previewMint(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply);\\n }\\n\\n function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\\n }\\n\\n function previewRedeem(uint256 shares) public view virtual returns (uint256) {\\n return convertToAssets(shares);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LIMIT LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function maxDeposit(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxMint(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxWithdraw(address owner) public view virtual returns (uint256) {\\n return convertToAssets(balanceOf[owner]);\\n }\\n\\n function maxRedeem(address owner) public view virtual returns (uint256) {\\n return balanceOf[owner];\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL HOOKS LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {}\\n\\n function afterDeposit(uint256 assets, uint256 shares) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\"},\"solmate/src/tokens/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\\nabstract contract ERC20 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n uint8 public immutable decimals;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) public balanceOf;\\n\\n mapping(address => mapping(address => uint256)) public allowance;\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal immutable INITIAL_CHAIN_ID;\\n\\n bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\\n\\n mapping(address => uint256) public nonces;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint8 _decimals\\n ) {\\n name = _name;\\n symbol = _symbol;\\n decimals = _decimals;\\n\\n INITIAL_CHAIN_ID = block.chainid;\\n INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 amount) public virtual returns (bool) {\\n allowance[msg.sender][spender] = amount;\\n\\n emit Approval(msg.sender, spender, amount);\\n\\n return true;\\n }\\n\\n function transfer(address to, uint256 amount) public virtual returns (bool) {\\n balanceOf[msg.sender] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(msg.sender, to, amount);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual returns (bool) {\\n uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\\n\\n balanceOf[from] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n return true;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 LOGIC\\n //////////////////////////////////////////////////////////////*/\\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 ) public virtual {\\n require(deadline >= block.timestamp, \\\"PERMIT_DEADLINE_EXPIRED\\\");\\n\\n // Unchecked because the only math done is incrementing\\n // the owner's nonce which cannot realistically overflow.\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\n \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n ),\\n owner,\\n spender,\\n value,\\n nonces[owner]++,\\n deadline\\n )\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"INVALID_SIGNER\\\");\\n\\n allowance[recoveredAddress][spender] = value;\\n }\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\\n return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\\n }\\n\\n function computeDomainSeparator() internal view virtual returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 amount) internal virtual {\\n totalSupply += amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(address(0), to, amount);\\n }\\n\\n function _burn(address from, uint256 amount) internal virtual {\\n balanceOf[from] -= amount;\\n\\n // Cannot underflow because a user's balance\\n // will never be larger than the total supply.\\n unchecked {\\n totalSupply -= amount;\\n }\\n\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\"},\"solmate/src/utils/FixedPointMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Arithmetic library with operations for fixed-point numbers.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)\\nlibrary FixedPointMathLib {\\n /*//////////////////////////////////////////////////////////////\\n SIMPLIFIED FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.\\n\\n function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.\\n }\\n\\n function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.\\n }\\n\\n function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.\\n }\\n\\n function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.\\n }\\n\\n function powWad(int256 x, int256 y) internal pure returns (int256) {\\n // Equivalent to x to the power of y because x ** y = (e ** ln(x)) ** y = e ** (ln(x) * y)\\n return expWad((lnWad(x) * y) / int256(WAD)); // Using ln(x) means x must be greater than 0.\\n }\\n\\n function expWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n // When the result is < 0.5 we return zero. This happens when\\n // x <= floor(log(0.5e18) * 1e18) ~ -42e18\\n if (x <= -42139678854452767551) return 0;\\n\\n // When the result is > (2**255 - 1) / 1e18 we can not represent it as an\\n // int. This happens when x >= floor(log((2**255 - 1) / 1e18) * 1e18) ~ 135.\\n if (x >= 135305999368893231589) revert(\\\"EXP_OVERFLOW\\\");\\n\\n // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96\\n // for more intermediate precision and a binary basis. This base conversion\\n // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.\\n x = (x << 78) / 5**18;\\n\\n // Reduce range of x to (-\\u00bd ln 2, \\u00bd ln 2) * 2**96 by factoring out powers\\n // of two such that exp(x) = exp(x') * 2**k, where k is an integer.\\n // Solving this gives k = round(x / log(2)) and x' = x - k * log(2).\\n int256 k = ((x << 96) / 54916777467707473351141471128 + 2**95) >> 96;\\n x = x - k * 54916777467707473351141471128;\\n\\n // k is in the range [-61, 195].\\n\\n // Evaluate using a (6, 7)-term rational approximation.\\n // p is made monic, we'll multiply by a scale factor later.\\n int256 y = x + 1346386616545796478920950773328;\\n y = ((y * x) >> 96) + 57155421227552351082224309758442;\\n int256 p = y + x - 94201549194550492254356042504812;\\n p = ((p * y) >> 96) + 28719021644029726153956944680412240;\\n p = p * x + (4385272521454847904659076985693276 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n int256 q = x - 2855989394907223263936484059900;\\n q = ((q * x) >> 96) + 50020603652535783019961831881945;\\n q = ((q * x) >> 96) - 533845033583426703283633433725380;\\n q = ((q * x) >> 96) + 3604857256930695427073651918091429;\\n q = ((q * x) >> 96) - 14423608567350463180887372962807573;\\n q = ((q * x) >> 96) + 26449188498355588339934803723976023;\\n\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial won't have zeros in the domain as all its roots are complex.\\n // No scaling is necessary because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r should be in the range (0.09, 0.25) * 2**96.\\n\\n // We now need to multiply r by:\\n // * the scale factor s = ~6.031367120.\\n // * the 2**k factor from the range reduction.\\n // * the 1e18 / 2**96 factor for base conversion.\\n // We do this all at once, with an intermediate result in 2**213\\n // basis, so the final right shift is always by a positive amount.\\n r = int256((uint256(r) * 3822833074963236453042738258902158003155416615667) >> uint256(195 - k));\\n }\\n }\\n\\n function lnWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n // We want to convert x from 10**18 fixed point to 2**96 fixed point.\\n // We do this by multiplying by 2**96 / 10**18. But since\\n // ln(x * C) = ln(x) + ln(C), we can simply do nothing here\\n // and add ln(2**96 / 10**18) at the end.\\n\\n // Reduce range of x to (1, 2) * 2**96\\n // ln(2^k * x) = k * ln(2) + ln(x)\\n int256 k = int256(log2(uint256(x))) - 96;\\n x <<= uint256(159 - k);\\n x = int256(uint256(x) >> 159);\\n\\n // Evaluate using a (8, 8)-term rational approximation.\\n // p is made monic, we will multiply by a scale factor later.\\n int256 p = x + 3273285459638523848632254066296;\\n p = ((p * x) >> 96) + 24828157081833163892658089445524;\\n p = ((p * x) >> 96) + 43456485725739037958740375743393;\\n p = ((p * x) >> 96) - 11111509109440967052023855526967;\\n p = ((p * x) >> 96) - 45023709667254063763336534515857;\\n p = ((p * x) >> 96) - 14706773417378608786704636184526;\\n p = p * x - (795164235651350426258249787498 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n // q is monic by convention.\\n int256 q = x + 5573035233440673466300451813936;\\n q = ((q * x) >> 96) + 71694874799317883764090561454958;\\n q = ((q * x) >> 96) + 283447036172924575727196451306956;\\n q = ((q * x) >> 96) + 401686690394027663651624208769553;\\n q = ((q * x) >> 96) + 204048457590392012362485061816622;\\n q = ((q * x) >> 96) + 31853899698501571402653359427138;\\n q = ((q * x) >> 96) + 909429971244387300277376558375;\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial is known not to have zeros in the domain.\\n // No scaling required because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r is in the range (0, 0.125) * 2**96\\n\\n // Finalization, we need to:\\n // * multiply by the scale factor s = 5.549\\u2026\\n // * add ln(2**96 / 10**18)\\n // * add k * ln(2)\\n // * multiply by 10**18 / 2**96 = 5**18 >> 78\\n\\n // mul s * 5e18 * 2**96, base is now 5**18 * 2**192\\n r *= 1677202110996718588342820967067443963516166;\\n // add ln(2) * k * 5e18 * 2**192\\n r += 16597577552685614221487285958193947469193820559219878177908093499208371 * k;\\n // add ln(2**96 / 10**18) * 5e18 * 2**192\\n r += 600920179829731861736702779321621459595472258049074101567377883020018308;\\n // base conversion: mul 2**18 / 2**192\\n r >>= 174;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n LOW LEVEL FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function mulDivDown(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // Divide z by the denominator.\\n z := div(z, denominator)\\n }\\n }\\n\\n function mulDivUp(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // First, divide z - 1 by the denominator and add 1.\\n // We allow z - 1 to underflow if z is 0, because we multiply the\\n // end result by 0 if z is zero, ensuring we return 0 if z is zero.\\n z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1))\\n }\\n }\\n\\n function rpow(\\n uint256 x,\\n uint256 n,\\n uint256 scalar\\n ) internal pure returns (uint256 z) {\\n assembly {\\n switch x\\n case 0 {\\n switch n\\n case 0 {\\n // 0 ** 0 = 1\\n z := scalar\\n }\\n default {\\n // 0 ** n = 0\\n z := 0\\n }\\n }\\n default {\\n switch mod(n, 2)\\n case 0 {\\n // If n is even, store scalar in z for now.\\n z := scalar\\n }\\n default {\\n // If n is odd, store x in z for now.\\n z := x\\n }\\n\\n // Shifting right by 1 is like dividing by 2.\\n let half := shr(1, scalar)\\n\\n for {\\n // Shift n right by 1 before looping to halve it.\\n n := shr(1, n)\\n } n {\\n // Shift n right by 1 each iteration to halve it.\\n n := shr(1, n)\\n } {\\n // Revert immediately if x ** 2 would overflow.\\n // Equivalent to iszero(eq(div(xx, x), x)) here.\\n if shr(128, x) {\\n revert(0, 0)\\n }\\n\\n // Store x squared.\\n let xx := mul(x, x)\\n\\n // Round to the nearest number.\\n let xxRound := add(xx, half)\\n\\n // Revert if xx + half overflowed.\\n if lt(xxRound, xx) {\\n revert(0, 0)\\n }\\n\\n // Set x to scaled xxRound.\\n x := div(xxRound, scalar)\\n\\n // If n is even:\\n if mod(n, 2) {\\n // Compute z * x.\\n let zx := mul(z, x)\\n\\n // If z * x overflowed:\\n if iszero(eq(div(zx, x), z)) {\\n // Revert if x is non-zero.\\n if iszero(iszero(x)) {\\n revert(0, 0)\\n }\\n }\\n\\n // Round to the nearest number.\\n let zxRound := add(zx, half)\\n\\n // Revert if zx + half overflowed.\\n if lt(zxRound, zx) {\\n revert(0, 0)\\n }\\n\\n // Return properly scaled zxRound.\\n z := div(zxRound, scalar)\\n }\\n }\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n GENERAL NUMBER UTILITIES\\n //////////////////////////////////////////////////////////////*/\\n\\n function sqrt(uint256 x) internal pure returns (uint256 z) {\\n assembly {\\n let y := x // We start y at x, which will help us make our initial estimate.\\n\\n z := 181 // The \\\"correct\\\" value is 1, but this saves a multiplication later.\\n\\n // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad\\n // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.\\n\\n // We check y >= 2^(k + 8) but shift right by k bits\\n // each branch to ensure that if x >= 256, then y >= 256.\\n if iszero(lt(y, 0x10000000000000000000000000000000000)) {\\n y := shr(128, y)\\n z := shl(64, z)\\n }\\n if iszero(lt(y, 0x1000000000000000000)) {\\n y := shr(64, y)\\n z := shl(32, z)\\n }\\n if iszero(lt(y, 0x10000000000)) {\\n y := shr(32, y)\\n z := shl(16, z)\\n }\\n if iszero(lt(y, 0x1000000)) {\\n y := shr(16, y)\\n z := shl(8, z)\\n }\\n\\n // Goal was to get z*z*y within a small factor of x. More iterations could\\n // get y in a tighter range. Currently, we will have y in [256, 256*2^16).\\n // We ensured y >= 256 so that the relative difference between y and y+1 is small.\\n // That's not possible if x < 256 but we can just verify those cases exhaustively.\\n\\n // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.\\n // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.\\n // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.\\n\\n // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range\\n // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.\\n\\n // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate\\n // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.\\n\\n // There is no overflow risk here since y < 2^136 after the first branch above.\\n z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.\\n\\n // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n\\n // If x+1 is a perfect square, the Babylonian method cycles between\\n // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.\\n // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\\n // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.\\n // If you don't care whether the floor or ceil square root is returned, you can remove this statement.\\n z := sub(z, lt(div(x, z), z))\\n }\\n }\\n\\n function log2(uint256 x) internal pure returns (uint256 r) {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n assembly {\\n r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))\\n r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))\\n r := or(r, shl(5, lt(0xffffffff, shr(r, x))))\\n r := or(r, shl(4, lt(0xffff, shr(r, x))))\\n r := or(r, shl(3, lt(0xff, shr(r, x))))\\n r := or(r, shl(2, lt(0xf, shr(r, x))))\\n r := or(r, shl(1, lt(0x3, shr(r, x))))\\n r := or(r, lt(0x1, shr(r, x)))\\n }\\n }\\n\\n function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := mod(x, y)\\n }\\n }\\n\\n function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := div(x, y)\\n }\\n }\\n\\n /// @dev Will return 0 instead of reverting if y is zero.\\n function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // Add 1 to x * y if x % y > 0.\\n z := add(gt(mod(x, y), 0), div(x, y))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\"},\"solmate/src/utils/SafeTransferLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\n\\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)\\n/// @dev Caution! This library won't check that a token has code, responsibility is delegated to the caller.\\nlibrary SafeTransferLib {\\n /*//////////////////////////////////////////////////////////////\\n ETH OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n bool success;\\n\\n assembly {\\n // Transfer the ETH and store if it succeeded or not.\\n success := call(gas(), to, amount, 0, 0, 0, 0)\\n }\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferFrom(\\n ERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\\n mstore(4, from) // Append the \\\"from\\\" argument.\\n mstore(36, to) // Append the \\\"to\\\" argument.\\n mstore(68, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 100 because that's the total length of our calldata (4 + 32 * 3)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 100, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x095ea7b300000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"APPROVE_FAILED\\\");\\n }\\n}\\n\",\"keccak256\":\"0x5f2e1158c68c1f3d15b80e8a7dd92b6849f873066969562ad33c0abb80e536ff\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b506200001c62000022565b6200008c565b600054610100900460ff16156200003857600080fd5b60005460ff908116146200008a576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b614d21806200009c6000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80638129fc1c1161010f578063d219f395116100a2578063e9c50ff711610071578063e9c50ff7146105d8578063f2426f9a146105fb578063f940e3851461061b578063fc1960681461062e57600080fd5b8063d219f39514610590578063d547741f146105a3578063d681afb5146105b6578063de7ea7c6146105c557600080fd5b8063a361654a116100de578063a361654a146104ee578063b658e67314610503578063b7eec41314610532578063c2db09c11461054757600080fd5b80638129fc1c146104b85780638acbf3de146104c057806391d14854146104d3578063a217fddf146104e657600080fd5b806336568abe116101875780635dadb2dc116101565780635dadb2dc146104515780636c912dad1461047257806377329f35146104855780637ecebe001461049857600080fd5b806336568abe14610337578063382e85ad1461034a57806344e250f81461035d5780635684aa46146103d057600080fd5b8063248a9ca3116101c3578063248a9ca314610270578063249e6d9c146102a15780632f2ff15d1461031c5780633644e5151461032f57600080fd5b80630149e46f146101f557806301ffc9a71461020a57806310d6667714610232578063232b956c1461025d575b600080fd5b610208610203366004613f00565b610641565b005b61021d610218366004613f1d565b6107a1565b60405190151581526020015b60405180910390f35b610245610240366004613f47565b6107d8565b6040516001600160a01b039091168152602001610229565b61024561026b366004613f47565b610802565b61029361027e366004613f47565b60009081526065602052604090206001015490565b604051908152602001610229565b6103076102af366004613f80565b6001600160a01b0392831660009081526097602090815260408083209386168352928152828220959094168152600b9094018352808420911515845291529020546001600160801b03600160801b8204811692911690565b60408051928352602083019190915201610229565b61020861032a366004613fda565b610812565b61029361083c565b610208610345366004613fda565b6108e1565b6102936103583660046141f8565b610904565b6103b561036b36600461425b565b6001600160a01b039182166000908152609760209081526040808320939094168252919091522060078101546004909101546001600160801b0380831693600160801b9093041691565b60408051938452602084019290925290820152606001610229565b61042a6103de36600461425b565b6001600160a01b03918216600090815260976020908152604080832093909416825291909152206008015463ffffffff808216926401000000008304821692600160401b900490911690565b6040805163ffffffff94851681529284166020840152921691810191909152606001610229565b61046461045f366004614289565b610aa2565b60405161022992919061432c565b610208610480366004613f00565b610d11565b610464610493366004613f00565b610e9b565b6102936104a6366004613f00565b609b6020526000908152604090205481565b610208610f13565b6102936104ce36600461425b565b610fd5565b61021d6104e1366004613fda565b610ff0565b610293600081565b6104f661101b565b6040516102299190614376565b610293610511366004613f00565b6001600160a01b031660009081526097602052604090206002015460ff1690565b61053a6111bb565b6040516102299190614421565b610577610555366004613f00565b6097602052600090815260409020600281015460039091015460ff9091169082565b6040805160ff9093168352602083019190915201610229565b61046461059e366004614434565b61121d565b6102086105b1366004613fda565b6115ee565b610293670de0b6b3a763ffff81565b6102086105d3366004614546565b611613565b61021d6105e6366004613f00565b60986020526000908152604090205460ff1681565b61060e61060936600461425b565b61214f565b60405161022991906146be565b61020861062936600461425b565b6122bf565b6103b561063c3660046147b0565b612349565b604080516001808252818301909252339160009190816020015b604080518082019091526000808252602082015281526020019060019003908161065b579050506040805180820182526000815290516370a0823160e01b81526001600160a01b03868116600483015292935090916020830191908516906370a0823190602401602060405180830381865afa1580156106df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070391906147f1565b815250816000815181106107195761071961480a565b6020908102919091018101919091526001600160a01b03831660009081526097909152604081206002810154909160ff909116905b81816001600160801b03161015610799576001600160801b038116600090815260018401602052604090205461079190879087906001600160a01b03168761238f565b60010161074e565b505050505050565b60006001600160e01b03198216637965db0b60e01b14806107d257506301ffc9a760e01b6001600160e01b03198316145b92915050565b609981815481106107e857600080fd5b6000918252602090912001546001600160a01b0316905081565b609a81815481106107e857600080fd5b60008281526065602052604090206001015461082d81612695565b610837838361269f565b505050565b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f2c55a9465497be0b743b67bd2d3ee61e8212e4c4aa51feb7beee992dcf383117918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6001600160a01b03811633146108f657600080fd5b6109008282612725565b5050565b6000805b8451811015610a9a5760008582815181106109255761092561480a565b60209081029190910181015180516001600160a01b03908116600090815260978452604080822092891682529382905292832060028201549294509092909160ff16900361097b57836001019350505050610908565b82516020840151600883015460009261099d9290918b9063ffffffff1661278c565b90506000805b8251811015610a4a576001600160a01b038a166000908152600b85016020526040812084519091908590849081106109dd576109dd61480a565b602090810291909101810151511515825281019190915260400160002054610a1590600160801b90046001600160801b031689614836565b9750828181518110610a2957610a2961480a565b60200260200101516020015182610a409190614836565b91506001016109a3565b508015610a8a57610a7d8989604051806040016040528089600001516001600160a01b0316815260200186815250612989565b610a879088614836565b96505b8560010195505050505050610908565b509392505050565b609c54606090819083906001600160a01b031615610ac257610ac2614849565b4281604001351015610ad657610ad6614849565b60006001610ae261083c565b7f8b66e7894ecc5180298853ab3de30e198ac84d63bc1587efdff2eaa728ec269e610b106020860186613f00565b33610b1e602088018861485f565b609b6000610b2f60208c018c613f00565b6001600160a01b0316815260208082019290925260409081016000208054600181019091558151610b6b98979695949391928d013591016148af565b60405160208183030381529060405280519060200120604051602001610ba892919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181529190528051602090910120610bd06080850160608601614938565b6040805160008152602081018083529390935260ff90911690820152608080850135606083015260a08086013591830191909152016020604051602081039080840390855afa158015610c27573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610c695750610c546020830183613f00565b6001600160a01b0316816001600160a01b0316145b610c7557610c75614849565b610c826020830183613f00565b609c80546001600160a01b0319166001600160a01b039290921691909117905550610cec8533610cb5602088018861485f565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061121d92505050565b92509250609c546001600160a01b031615610d0957610d09614849565b509250929050565b604080516001808252818301909252339160009190816020015b6040805180820190915260008082526020820152815260200190600190039081610d2b57905050604051632f2e037160e11b81526001600160a01b038581166004830152919250600091841690635e5c06e290602401606060405180830381865afa158015610d9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc29190614955565b6001600160a01b03861660009081526097602052604081206002810154929550935060ff90911691505b81816001600160801b03161015610e92576001600160801b038116600090815260018085016020908152604080842054815180830183529384526001600160a01b031680855287835293206008015490820190610e52908a908c9063ffffffff16612aed565b610e5c9088614836565b81525086600081518110610e7257610e7261480a565b6020026020010181905250610e898833838961238f565b50600101610dec565b50505050505050565b606080610f0a610ea961101b565b846099805480602002602001604051908101604052809291908181526020018280548015610f0057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ee2575b505050505061121d565b91509150915091565b600054610100900460ff1615808015610f335750600054600160ff909116105b80610f4d5750303b158015610f4d575060005460ff166001145b610f5657600080fd5b6000805460ff191660011790558015610f79576000805461ff0019166101001790555b610f81612cc2565b610f8c60003361269f565b8015610fd2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000610fe9610fe261101b565b8484610904565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606000609a80548060200260200160405190810160405280929190818152602001828054801561107557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611057575b5050505050905080516001600160401b038111156110955761109561400a565b6040519080825280602002602001820160405280156110db57816020015b6040805180820190915260008152606060208201528152602001906001900390816110b35790505b50915060005b81518110156111b6576040805160028082526060820183526000926020830190803683370190505090506001816000815181106111205761112061480a565b6020026020010190151590811515815250506000816001815181106111475761114761480a565b60200260200101901515908115158152505060405180604001604052808484815181106111765761117661480a565b60200260200101516001600160a01b03168152602001828152508483815181106111a2576111a261480a565b6020908102919091010152506001016110e1565b505090565b6060609980548060200260200160405190810160405280929190818152602001828054801561121357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116111f5575b5050505050905090565b609c5460609081906001600160a01b031661124557609c80546001600160a01b031916331790555b8251806001600160401b0381111561125f5761125f61400a565b604051908082528060200260200182016040528015611288578160200160208202803683370190505b50609c549092506001600160a01b031660005b87518110156114eb5760008882815181106112b8576112b861480a565b60209081029190910181015180516001600160a01b0316600090815260979092526040822060028101549193509160ff909116905b81816001600160801b031610156113685783516001600160801b03821660009081526001850160209081526040808320548851838a01516001600160a01b03909216808652938990529190932060080154611360948b9490939261135b92909190869063ffffffff1661278c565b61238f565b6001016112ed565b5060005b868110156114dc5760008360000160008c848151811061138e5761138e61480a565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020905060005b8560200151518110156114d2576001600160a01b0388166000908152600b8301602090815260408220908801518051839190859081106113fd576113fd61480a565b6020908102919091018101511515825281019190915260400160002054600160801b90046001600160801b0316905080156114c957808b85815181106114455761144561480a565b602002602001018181516114599190614836565b9052506001600160a01b0389166000908152600b8401602090815260408220908901518051839190869081106114915761149161480a565b6020908102919091018101511515825281019190915260400160002080546001600160801b03928316600160801b0292169190911790555b506001016113bb565b505060010161136c565b5083600101935050505061129b565b5060005b85518110156115d057600084828151811061150c5761150c61480a565b6020026020010151905060008111156115c75761155688828985815181106115365761153661480a565b60200260200101516001600160a01b0316612cd89092919063ffffffff16565b876001600160a01b03168783815181106115725761157261480a565b60200260200101516001600160a01b0316846001600160a01b03167fc1405953cccdad6b442e266c84d66ad671e2534c6584f8e6ef92802f7ad294d5846040516115be91815260200190565b60405180910390a45b506001016114ef565b5050609c80546001600160a01b031916905550919491935090915050565b60008281526065602052604090206001015461160981612695565b6108378383612725565b600061161e81612695565b60005b825181101561083757670de0b6b3a76400008382815181106116455761164561480a565b602002602001015161014001516001600160401b031610611679576040516306b7c75960e31b815260040160405180910390fd5b82818151811061168b5761168b61480a565b60200260200101516101a001516001600160401b03166000036116c1576040516306b7c75960e31b815260040160405180910390fd5b6000609760008584815181106116d9576116d961480a565b6020026020010151600001516001600160a01b03166001600160a01b03168152602001908152602001600020905060008160000160008685815181106117215761172161480a565b6020026020010151602001516001600160a01b03166001600160a01b03168152602001908152602001600020905081600301546000036117ac57609a85848151811061176f5761176f61480a565b6020908102919091018101515182546001810184556000938452919092200180546001600160a01b0319166001600160a01b039092169190911790555b609860008685815181106117c2576117c261480a565b6020908102919091018101518101516001600160a01b031682528101919091526040016000205460ff1661189e576001609860008786815181106118085761180861480a565b6020026020010151602001516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550609985848151811061185f5761185f61480a565b60209081029190910181015181015182546001810184556000938452919092200180546001600160a01b0319166001600160a01b039092169190911790555b6008810154600160401b900463ffffffff16600003611aaa578483815181106118c9576118c961480a565b6020908102919091018101510151600283018054600185019160009160ff1690826118f383614983565b91906101000a81548160ff021916908360ff16021790555060ff166001600160801b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555084838151811061195b5761195b61480a565b6020026020010151600001516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c891906149a2565b6119d390600a614a9b565b600383015584518590849081106119ec576119ec61480a565b6020026020010151606001518160080160006101000a81548163ffffffff021916908363ffffffff160217905550848381518110611a2c57611a2c61480a565b6020026020010151606001518160080160086101000a81548163ffffffff021916908363ffffffff160217905550848381518110611a6c57611a6c61480a565b602002602001015160800151858481518110611a8a57611a8a61480a565b602002602001015160c00151611aa09190614ac0565b6001820155611dc8565b600881015460408051600180825281830190925263ffffffff80841693640100000000900416916000919060208083019080368337019050509050600181600081518110611afa57611afa61480a565b602002602001019015159081151581525050611b776000898881518110611b2357611b2361480a565b6020026020010151600001518a8981518110611b4157611b4161480a565b60200260200101516020015161135b8c8b81518110611b6257611b6261480a565b6020026020010151600001518660008a61278c565b8163ffffffff16421015611cbc576000808463ffffffff16421115611c53576008860154611bb290600160601b900463ffffffff1642614ad4565b8660010154611bc19190614ae7565b8660090154611bd09190614836565b9150611be263ffffffff861642614ad4565b9050818a8981518110611bf757611bf761480a565b602002602001015160c00151111580611c2d5750808a8981518110611c1e57611c1e61480a565b60200260200101516080015111155b15611c4b576040516306b7c75960e31b815260040160405180910390fd5b600986018290555b808a8981518110611c6657611c6661480a565b602002602001015160800151611c7c9190614ad4565b828b8a81518110611c8f57611c8f61480a565b602002602001015160c00151611ca59190614ad4565b611caf9190614ac0565b600187015550611dc49050565b878681518110611cce57611cce61480a565b602090810291909101015160600151600885015463ffffffff908116911614611dc457878681518110611d0357611d0361480a565b6020026020010151606001518460080160006101000a81548163ffffffff021916908363ffffffff160217905550878681518110611d4357611d4361480a565b6020026020010151606001518460080160086101000a81548163ffffffff021916908363ffffffff160217905550878681518110611d8357611d8361480a565b602002602001015160800151888781518110611da157611da161480a565b602002602001015160c00151611db79190614ac0565b6001850155600060098501555b5050505b60088101805463ffffffff60601b1916600160601b4263ffffffff16021790558451859084908110611dfc57611dfc61480a565b6020908102919091010151608001516008820154611e20919063ffffffff16614afe565b8160080160046101000a81548163ffffffff021916908363ffffffff160217905550848381518110611e5457611e5461480a565b60200260200101516040015181600a0160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550848381518110611e9a57611e9a61480a565b602002602001015160c001518160020181905550848381518110611ec057611ec061480a565b602002602001015160a001518160000181905550848381518110611ee657611ee661480a565b602002602001015160e001518160030181905550848381518110611f0c57611f0c61480a565b602002602001015161010001518160050160006101000a8154816001600160801b030219169083600f0b6001600160801b03160217905550848381518110611f5657611f5661480a565b602002602001015161012001518160050160106101000a8154816001600160401b0302191690836001600160401b03160217905550848381518110611f9d57611f9d61480a565b602002602001015161016001518160060160006101000a8154816001600160401b0302191690836001600160401b03160217905550848381518110611fe457611fe461480a565b602002602001015161018001518160060160086101000a8154816001600160401b0302191690836001600160401b0316021790555084838151811061202b5761202b61480a565b602002602001015161014001518160050160186101000a8154816001600160401b0302191690836001600160401b031602179055508483815181106120725761207261480a565b60200260200101516101a001518160060160106101000a8154816001600160401b0302191690836001600160401b031602179055508483815181106120b9576120b961480a565b6020026020010151602001516001600160a01b03168584815181106120e0576120e061480a565b6020026020010151600001516001600160a01b03167fbb1f0f9f2e246d18022362060458bdfde9ab9b4e4eb514b800b155df7ea8ecac8786815181106121285761212861480a565b602002602001015160405161213d91906146be565b60405180910390a35050600101611621565b604080516101c081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a08101919091526001600160a01b0380841660008181526097602090815260408083208786168085529083529281902081516101c08101835294855291840192909252600a81015490931690820152600882015463ffffffff8082166060840181905260808401926122349264010000000090910416614b22565b63ffffffff1681528254602082015260028301546040820152600383015460608201526005830154600f81900b60808301526001600160401b03600160801b808304821660a0850152600160c01b909204811660c084015260069094015480851660e0840152600160401b810485166101008401520490921661012090920191909152905092915050565b60006122ca81612695565b6040516370a0823160e01b81523060048201526108379083906001600160a01b038616906370a0823190602401602060405180830381865afa158015612314573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061233891906147f1565b6001600160a01b0386169190612cd8565b6001600160a01b03808416600090815260976020908152604080832093861683529290529081208190819061237f908786612d27565b9250925092505b93509350939050565b6001600160a01b0383811660009081526097602090815260408083206003810154948716845290915290206008810154600160401b900463ffffffff16428110156124d757600080806123ec858a6123e78742614ad4565b612d27565b919450925090506001600160801b0383118061240e57506001600160801b0382115b1561242c57604051637decd25760e01b815260040160405180910390fd5b6001600160801b03828116600160801b0290841617600786015560088501805463ffffffff42908116600160401b026bffffffff0000000000000000199092169190911790915560048601829055604080518581526020810185905290810183905260608101919091526001600160a01b0389811691908b16907f1be815035b13056fba0f0dcbaec5d30add5d95e5f1b6990581607fbccdc930509060800160405180910390a35050505b506001600160a01b0386166000908152600b820160205260408120905b845181101561268b5760008582815181106125115761251161480a565b60209081029190910181015180511515600090815291859052604082208054825192945090926001600160801b03909116911561255c575060078601546001600160801b0316612573565b506007860154600160801b90046001600160801b03165b80821461267c5782546fffffffffffffffffffffffffffffffff19166001600160801b03821617835560208401511561267c5760006125b8856020015183858c6138ea565b8454909150819085906010906125df908490600160801b90046001600160801b0316614b3f565b92506101000a8154816001600160801b0302191690836001600160801b031602179055508c6001600160a01b03168b6001600160a01b03168d6001600160a01b03167fc4278cd1497fedb2697092108a0141a0cbecdd1472913b6e803010998aa6353788600001518787876040516126729493929190931515845260208401929092526040830152606082015260800190565b60405180910390a4505b846001019450505050506124f4565b5050505050505050565b610fd2813361390a565b6126a98282610ff0565b6109005760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556126e13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61272f8282610ff0565b156109005760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606083516001600160401b038111156127a7576127a761400a565b6040519080825280602002602001820160405280156127ec57816020015b60408051808201909152600080825260208201528152602001906001900390816127c55790505b50905060005b84518110156129805784818151811061280d5761280d61480a565b6020026020010151156128db57604051632f2e037160e11b81526001600160a01b03858116600483015260009190881690635e5c06e290602401606060405180830381865afa158015612864573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128889190614955565b9250505060405180604001604052806001151581526020016128ab898888612aed565b6128b59084614836565b8152508383815181106128ca576128ca61480a565b602002602001018190525050612978565b6040805180820182526000815290516370a0823160e01b81526001600160a01b0386811660048301526020830191908916906370a0823190602401602060405180830381865afa158015612933573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061295791906147f1565b81525082828151811061296c5761296c61480a565b60200260200101819052505b6001016127f2565b50949350505050565b80516001600160a01b039081166000908152609760208181526040808420878616855282528084208651909516845291905281206003015460088301548451929392600160401b90910463ffffffff1690849081906129fc9086904286106129f2576000612d27565b6123e78642614ad4565b506001600160a01b038b166000908152600b8801602052604081209294509092505b886020015151811015612adf57600089602001518281518110612a4357612a4361480a565b60200260200101516000015115612a5b575083612a5e565b50825b612aca8a602001518381518110612a7757612a7761480a565b602002602001015160200151828560008e602001518781518110612a9d57612a9d61480a565b6020908102919091018101515115158252810191909152604001600020546001600160801b03168a6138ea565b612ad4908a614836565b985050600101612a1e565b505050505050509392505050565b6000806224ea00612b048163ffffffff8616614b5f565b612b149063ffffffff8616614ad4565b612b1e9190614836565b90506000856001600160a01b0316630e52dbec6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b8491906149a2565b612b949060ff166224ea00614ae7565b612ba16224ea0042614b5f565b612bab9042614ad4565b612bb59190614836565b9050815b818111612c4e5760405163d2681a0b60e01b8152600481018290526001600160a01b0387811660248301526000919089169063d2681a0b906044016040805180830381865afa158015612c10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c349190614b73565b509050612c418186614836565b9450506224ea0001612bb9565b50604051635fb9165160e11b8152600481018490526001600160a01b0387169063bf722ca290602401602060405180830381865afa158015612c94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cb891906147f1565b9695505050505050565b600054610100900460ff16612cd657600080fd5b565b600060405163a9059cbb60e01b6000528360045282602452602060006044600080895af13d15601f3d1160016000511416171691506000606052806040525080612d2157600080fd5b50505050565b6000806000612d5060405180606001604052806000815260200160008152602001600081525090565b856001600160a01b031663eee8c9e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015612d8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612db291906147f1565b816000018181525050856001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa158015612df9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e1d91906147f1565b816020018181525050612e4a60405180606001604052806000815260200160008152602001600081525090565b600888015463ffffffff8082168084526401000000009092041660208301526000906224ea0090612e7c908290614b5f565b8351612e889190614ad4565b612e929190614836565b90506000886001600160a01b0316630e52dbec6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ef891906149a2565b612f089060ff166224ea00614ae7565b612f156224ea0042614b5f565b612f1f9042614ad4565b612f299190614836565b90506000825b828111612fd557604051630156d37d60e31b81526004810182905260009081906001600160a01b038e1690630ab69be8906024016040805180830381865afa158015612f7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa39190614b73565b9092509050612fb28285614836565b93508088602001818151612fc69190614836565b90525050506224ea0001612f2f565b508085600001818151612fe89190614836565b905250604051635fb9165160e11b8152600481018290526001600160a01b038b169063bf722ca290602401602060405180830381865afa158015613030573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061305491906147f1565b604086015250508854835160009250811161307757670de0b6b3a7640000613083565b83516130839082613951565b60018b015460048c01548551602087015193955060009450919290916130a891614ad4565b604086018190526000906130bd5760006130ed565b6130ed858760400151670de0b6b3a76400006130d99190614ae7565b8f600301546139629092919063ffffffff16565b9050856020015142116131cc57801561317357600061311d61310f8d84614ae7565b61311890614b97565b613981565b905061315761313482670de0b6b3a7640000614ad4565b61315161314989670de0b6b3a7640000614ad4565b879086613962565b90613af8565b6131618483613b0d565b61316b9190614836565b9850506131a7565b8a61319061318987670de0b6b3a7640000614ad4565b8590613b0d565b61319a9190614ae7565b6131a49083614836565b97505b6131b18289614bb3565b6131bb8c85614ae7565b6131c59190614bb3565b935061333a565b602086015160088e0154600160401b900463ffffffff161115613231576132126131f961310f8d84614ae7565b61320b90670de0b6b3a7640000614ad4565b8390613af8565b61321c9083614ad4565b97506132288289614bb3565b6131c590614b97565b60088d0154602087015160009161325691600160401b90910463ffffffff1690614ad4565b9b50811561329d5761326b61310f8d84614ae7565b905061328261313482670de0b6b3a7640000614ad4565b61328c8483613b0d565b6132969190614836565b98506132d1565b8b6132ba6132b388670de0b6b3a7640000614ad4565b8690613b0d565b6132c49190614ae7565b6132ce9084614836565b98505b6132ee8760200151426132e49190614ad4565b61310f9084614ae7565b905061330c61330582670de0b6b3a7640000614ad4565b8a90613af8565b613316908a614ad4565b9850613322838a614bb3565b61332c8d86614ae7565b6133369190614bb3565b9450505b8360000361336c5750505060078a01546001600160801b038082169850600160801b9091041695506123869350505050565b5050506133be6040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b60008560200151116133d15760006133f4565b602085015185516133f4916133e69190613951565b670de0b6b3a763ffff613b22565b80825260058c01546001600160401b03600160c01b8204811660c0850152600f9190910b60e084015260068d0154166101008301526134345760006134e2565b6134e26134c1670de0b6b3a764000061347161346c8560c00151670de0b6b3a76400006134619190614ad4565b60c087015190613951565b613b38565b84516134959061346c9061348d90670de0b6b3a7640000614ad4565b875190613951565b61349f9190614bb3565b8460e001516134ae9190614bd3565b6134b790614b97565b6131189190614c03565b6134d390670de0b6b3a7640000614836565b670de0b6b3a764000090613951565b6020820181905261369c906134ff90670de0b6b3a7640000614ad4565b61367183610100015161367761358a8f6001600160a01b031663666010326040518163ffffffff1660e01b8152600401602060405180830381865afa15801561354c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061357091906147f1565b61358290670de0b6b3a7640000614ad4565b875190613af8565b61359c90670de0b6b3a7640000614ad4565b8f6001600160a01b031663f3fdb15a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156135da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135fe9190614c31565b87516040516342543a3360e11b81526001600160a01b0392909216916384a87466916136309160040190815260200190565b602060405180830381865afa15801561364d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061367191906147f1565b90613b0d565b6136819190614836565b60058f0154600160801b90046001600160401b031690613b0d565b6040820152602081015160068c01546136c691600160801b9091046001600160401b031690613b0d565b6136fc8260200151670de0b6b3a76400006136e19190614ad4565b60068e0154600160401b90046001600160401b031690613b0d565b6137069190614836565b60608201819052604082015161372a9161371f91614836565b604083015190613951565b6080820181905261374390670de0b6b3a7640000614ad4565b8160a001818152505060008a6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561378c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137b091906147f1565b9050600086604001518c6001600160a01b0316638d0e5f026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156137f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061381b91906147f1565b6138259190614836565b6001600160a01b038d1660009081526097602052604090206003015490915081613850576000613873565b613873818361386c876080015189613b0d90919063ffffffff16565b9190613962565b60078f015461388b91906001600160801b0316614836565b9a506000831161389c5760006138b8565b6138b8818461386c8760a0015189613b0d90919063ffffffff16565b60078f01546138d79190600160801b90046001600160801b0316614836565b9950505050505050505093509350939050565b60006139016138f98486614ad4565b869084613962565b95945050505050565b6139148282610ff0565b6109005761392181613ce4565b61392c836020613cf6565b60405160200161393d929190614c7e565b604051602081830303815290604052600080fd5b6000610fe983670de0b6b3a7640000845b82820281151584158583048514171661397a57600080fd5b0492915050565b6000680248ce36a70cb26b3e19821361399c57506000919050565b680755bf798b4a1bf1e582126139b157600080fd5b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b6000610fe98383670de0b6b3a7640000613e4e565b6000610fe98383670de0b6b3a7640000613962565b6000818310613b315781610fe9565b5090919050565b6000808213613b4657600080fd5b60006060613b5384613e7c565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d6c8c3f38e95a6b1ff2ab1c3b343619018302821d6d02384773bdf1ac5676facced60901901830290911d6cb9a025d814b29c212b8b1a07cd1901909102780a09507084cc699bb0e71ea869ffffffffffffffffffffffff190105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60606107d26001600160a01b03831660145b60606000613d05836002614ae7565b613d10906002614836565b6001600160401b03811115613d2757613d2761400a565b6040519080825280601f01601f191660200182016040528015613d51576020820181803683370190505b509050600360fc1b81600081518110613d6c57613d6c61480a565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613d9b57613d9b61480a565b60200101906001600160f81b031916908160001a9053506000613dbf846002614ae7565b613dca906001614836565b90505b6001811115613e42576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613dfe57613dfe61480a565b1a60f81b828281518110613e1457613e1461480a565b60200101906001600160f81b031916908160001a90535060049490941c93613e3b81614cd4565b9050613dcd565b508315610fe957600080fd5b828202811515841585830485141716613e6657600080fd5b6001826001830304018115150290509392505050565b6000808211613e8a57600080fd5b5060016001600160801b03821160071b82811c6001600160401b031060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b6001600160a01b0381168114610fd257600080fd5b600060208284031215613f1257600080fd5b8135610fe981613eeb565b600060208284031215613f2f57600080fd5b81356001600160e01b031981168114610fe957600080fd5b600060208284031215613f5957600080fd5b5035919050565b8035613f6b81613eeb565b919050565b80358015158114613f6b57600080fd5b60008060008060808587031215613f9657600080fd5b8435613fa181613eeb565b93506020850135613fb181613eeb565b9250613fbf60408601613f70565b91506060850135613fcf81613eeb565b939692955090935050565b60008060408385031215613fed57600080fd5b823591506020830135613fff81613eeb565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156140425761404261400a565b60405290565b6040516101c081016001600160401b03811182821017156140425761404261400a565b604051601f8201601f191681016001600160401b03811182821017156140935761409361400a565b604052919050565b60006001600160401b038211156140b4576140b461400a565b5060051b60200190565b600082601f8301126140cf57600080fd5b813560206140e46140df8361409b565b61406b565b828152600592831b850182019282820191908785111561410357600080fd5b8387015b858110156141eb5780356001600160401b03808211156141275760008081fd5b908901906040828c03601f19018113156141415760008081fd5b614149614020565b8884013561415681613eeb565b8152838201358381111561416a5760008081fd5b8085019450508c603f85011261418257600092508283fd5b8884013592506141946140df8461409b565b83815292861b8401820192898101908e8511156141b15760008081fd5b948301945b848610156141d6576141c786613f70565b8252948a0194908a01906141b6565b828b0152508752505050928401928401614107565b5090979650505050505050565b60008060006060848603121561420d57600080fd5b83356001600160401b0381111561422357600080fd5b61422f868287016140be565b935050602084013561424081613eeb565b9150604084013561425081613eeb565b809150509250925092565b6000806040838503121561426e57600080fd5b823561427981613eeb565b91506020830135613fff81613eeb565b6000806040838503121561429c57600080fd5b82356001600160401b03808211156142b357600080fd5b6142bf868387016140be565b935060208501359150808211156142d557600080fd5b50830160c08186031215613fff57600080fd5b600081518084526020808501945080840160005b838110156143215781516001600160a01b0316875295820195908201906001016142fc565b509495945050505050565b60408152600061433f60408301856142e8565b82810360208481019190915284518083528582019282019060005b818110156141eb5784518352938301939183019160010161435a565b60006020808301818452808551808352604092508286019150828160051b8701018488016000805b8481101561441257898403603f19018652825180516001600160a01b03168552880151888501889052805188860181905290890190839060608701905b808310156143fd57835115158252928b019260019290920191908b01906143db565b50978a0197955050509187019160010161439e565b50919998505050505050505050565b602081526000610fe960208301846142e8565b60008060006060848603121561444957600080fd5b83356001600160401b038082111561446057600080fd5b61446c878388016140be565b9450602091508186013561447f81613eeb565b935060408601358181111561449357600080fd5b86019050601f810187136144a657600080fd5b80356144b46140df8261409b565b81815260059190911b820183019083810190898311156144d357600080fd5b928401925b828410156144fa5783356144eb81613eeb565b825292840192908401906144d8565b80955050505050509250925092565b803563ffffffff81168114613f6b57600080fd5b8035600f81900b8114613f6b57600080fd5b80356001600160401b0381168114613f6b57600080fd5b6000602080838503121561455957600080fd5b82356001600160401b0381111561456f57600080fd5b8301601f8101851361458057600080fd5b803561458e6140df8261409b565b8181526101c091820283018401918482019190888411156145ae57600080fd5b938501935b838510156146b25780858a0312156145cb5760008081fd5b6145d3614048565b6145dc86613f60565b81526145e9878701613f60565b8782015260406145fa818801613f60565b90820152606061460b878201614509565b908201526080868101359082015260a0808701359082015260c0808701359082015260e0808701359082015261010061464581880161451d565b9082015261012061465787820161452f565b9082015261014061466987820161452f565b9082015261016061467b87820161452f565b9082015261018061468d87820161452f565b908201526101a061469f87820161452f565b90820152835293840193918501916145b3565b50979650505050505050565b81516001600160a01b031681526101c0810160208301516146ea60208401826001600160a01b03169052565b50604083015161470560408401826001600160a01b03169052565b50606083015161471d606084018263ffffffff169052565b506080830151608083015260a083015160a083015260c083015160c083015260e083015160e08301526101008084015161475b82850182600f0b9052565b5050610120838101516001600160401b03908116918401919091526101408085015182169084015261016080850151821690840152610180808501518216908401526101a09384015116929091019190915290565b6000806000606084860312156147c557600080fd5b83356147d081613eeb565b925060208401356147e081613eeb565b929592945050506040919091013590565b60006020828403121561480357600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156107d2576107d2614820565b634e487b7160e01b600052600160045260246000fd5b6000808335601e1984360301811261487657600080fd5b8301803591506001600160401b0382111561489057600080fd5b6020019150600581901b36038213156148a857600080fd5b9250929050565b8781526001600160a01b03878116602080840191909152878216604084015260c060608401819052830186905260009187919060e08501845b8981101561490f5784356148fb81613eeb565b8316825293830193908301906001016148e8565b5060808601979097525050505060a0015295945050505050565b60ff81168114610fd257600080fd5b60006020828403121561494a57600080fd5b8135610fe981614929565b60008060006060848603121561496a57600080fd5b8351925060208401519150604084015190509250925092565b600060ff821660ff810361499957614999614820565b60010192915050565b6000602082840312156149b457600080fd5b8151610fe981614929565b600181815b80851115610d095781600019048211156149e0576149e0614820565b808516156149ed57918102915b93841c93908002906149c4565b600082614a09575060016107d2565b81614a16575060006107d2565b8160018114614a2c5760028114614a3657614a52565b60019150506107d2565b60ff841115614a4757614a47614820565b50506001821b6107d2565b5060208310610133831016604e8410600b8410161715614a75575081810a6107d2565b614a7f83836149bf565b8060001904821115614a9357614a93614820565b029392505050565b6000610fe960ff8416836149fa565b634e487b7160e01b600052601260045260246000fd5b600082614acf57614acf614aaa565b500490565b818103818111156107d2576107d2614820565b80820281158282048414176107d2576107d2614820565b63ffffffff818116838216019080821115614b1b57614b1b614820565b5092915050565b63ffffffff828116828216039080821115614b1b57614b1b614820565b6001600160801b03818116838216019080821115614b1b57614b1b614820565b600082614b6e57614b6e614aaa565b500690565b60008060408385031215614b8657600080fd5b505080516020909101519092909150565b6000600160ff1b8201614bac57614bac614820565b5060000390565b8181036000831280158383131683831282161715614b1b57614b1b614820565b80820260008212600160ff1b84141615614bef57614bef614820565b81810583148215176107d2576107d2614820565b600082614c1257614c12614aaa565b600160ff1b821460001984141615614c2c57614c2c614820565b500590565b600060208284031215614c4357600080fd5b8151610fe981613eeb565b6000815160005b81811015614c6f5760208185018101518683015201614c55565b50600093019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000614cb06017830185614c4e565b7001034b99036b4b9b9b4b733903937b6329607d1b81526139016011820185614c4e565b600081614ce357614ce3614820565b50600019019056fea264697066735822122073ece8fd9b7970695cb8613edb16c440a004eb8c6d7e5da9296b12bebc4db07d64736f6c63430008110033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101f05760003560e01c80638129fc1c1161010f578063d219f395116100a2578063e9c50ff711610071578063e9c50ff7146105d8578063f2426f9a146105fb578063f940e3851461061b578063fc1960681461062e57600080fd5b8063d219f39514610590578063d547741f146105a3578063d681afb5146105b6578063de7ea7c6146105c557600080fd5b8063a361654a116100de578063a361654a146104ee578063b658e67314610503578063b7eec41314610532578063c2db09c11461054757600080fd5b80638129fc1c146104b85780638acbf3de146104c057806391d14854146104d3578063a217fddf146104e657600080fd5b806336568abe116101875780635dadb2dc116101565780635dadb2dc146104515780636c912dad1461047257806377329f35146104855780637ecebe001461049857600080fd5b806336568abe14610337578063382e85ad1461034a57806344e250f81461035d5780635684aa46146103d057600080fd5b8063248a9ca3116101c3578063248a9ca314610270578063249e6d9c146102a15780632f2ff15d1461031c5780633644e5151461032f57600080fd5b80630149e46f146101f557806301ffc9a71461020a57806310d6667714610232578063232b956c1461025d575b600080fd5b610208610203366004613f00565b610641565b005b61021d610218366004613f1d565b6107a1565b60405190151581526020015b60405180910390f35b610245610240366004613f47565b6107d8565b6040516001600160a01b039091168152602001610229565b61024561026b366004613f47565b610802565b61029361027e366004613f47565b60009081526065602052604090206001015490565b604051908152602001610229565b6103076102af366004613f80565b6001600160a01b0392831660009081526097602090815260408083209386168352928152828220959094168152600b9094018352808420911515845291529020546001600160801b03600160801b8204811692911690565b60408051928352602083019190915201610229565b61020861032a366004613fda565b610812565b61029361083c565b610208610345366004613fda565b6108e1565b6102936103583660046141f8565b610904565b6103b561036b36600461425b565b6001600160a01b039182166000908152609760209081526040808320939094168252919091522060078101546004909101546001600160801b0380831693600160801b9093041691565b60408051938452602084019290925290820152606001610229565b61042a6103de36600461425b565b6001600160a01b03918216600090815260976020908152604080832093909416825291909152206008015463ffffffff808216926401000000008304821692600160401b900490911690565b6040805163ffffffff94851681529284166020840152921691810191909152606001610229565b61046461045f366004614289565b610aa2565b60405161022992919061432c565b610208610480366004613f00565b610d11565b610464610493366004613f00565b610e9b565b6102936104a6366004613f00565b609b6020526000908152604090205481565b610208610f13565b6102936104ce36600461425b565b610fd5565b61021d6104e1366004613fda565b610ff0565b610293600081565b6104f661101b565b6040516102299190614376565b610293610511366004613f00565b6001600160a01b031660009081526097602052604090206002015460ff1690565b61053a6111bb565b6040516102299190614421565b610577610555366004613f00565b6097602052600090815260409020600281015460039091015460ff9091169082565b6040805160ff9093168352602083019190915201610229565b61046461059e366004614434565b61121d565b6102086105b1366004613fda565b6115ee565b610293670de0b6b3a763ffff81565b6102086105d3366004614546565b611613565b61021d6105e6366004613f00565b60986020526000908152604090205460ff1681565b61060e61060936600461425b565b61214f565b60405161022991906146be565b61020861062936600461425b565b6122bf565b6103b561063c3660046147b0565b612349565b604080516001808252818301909252339160009190816020015b604080518082019091526000808252602082015281526020019060019003908161065b579050506040805180820182526000815290516370a0823160e01b81526001600160a01b03868116600483015292935090916020830191908516906370a0823190602401602060405180830381865afa1580156106df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070391906147f1565b815250816000815181106107195761071961480a565b6020908102919091018101919091526001600160a01b03831660009081526097909152604081206002810154909160ff909116905b81816001600160801b03161015610799576001600160801b038116600090815260018401602052604090205461079190879087906001600160a01b03168761238f565b60010161074e565b505050505050565b60006001600160e01b03198216637965db0b60e01b14806107d257506301ffc9a760e01b6001600160e01b03198316145b92915050565b609981815481106107e857600080fd5b6000918252602090912001546001600160a01b0316905081565b609a81815481106107e857600080fd5b60008281526065602052604090206001015461082d81612695565b610837838361269f565b505050565b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f2c55a9465497be0b743b67bd2d3ee61e8212e4c4aa51feb7beee992dcf383117918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6001600160a01b03811633146108f657600080fd5b6109008282612725565b5050565b6000805b8451811015610a9a5760008582815181106109255761092561480a565b60209081029190910181015180516001600160a01b03908116600090815260978452604080822092891682529382905292832060028201549294509092909160ff16900361097b57836001019350505050610908565b82516020840151600883015460009261099d9290918b9063ffffffff1661278c565b90506000805b8251811015610a4a576001600160a01b038a166000908152600b85016020526040812084519091908590849081106109dd576109dd61480a565b602090810291909101810151511515825281019190915260400160002054610a1590600160801b90046001600160801b031689614836565b9750828181518110610a2957610a2961480a565b60200260200101516020015182610a409190614836565b91506001016109a3565b508015610a8a57610a7d8989604051806040016040528089600001516001600160a01b0316815260200186815250612989565b610a879088614836565b96505b8560010195505050505050610908565b509392505050565b609c54606090819083906001600160a01b031615610ac257610ac2614849565b4281604001351015610ad657610ad6614849565b60006001610ae261083c565b7f8b66e7894ecc5180298853ab3de30e198ac84d63bc1587efdff2eaa728ec269e610b106020860186613f00565b33610b1e602088018861485f565b609b6000610b2f60208c018c613f00565b6001600160a01b0316815260208082019290925260409081016000208054600181019091558151610b6b98979695949391928d013591016148af565b60405160208183030381529060405280519060200120604051602001610ba892919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181529190528051602090910120610bd06080850160608601614938565b6040805160008152602081018083529390935260ff90911690820152608080850135606083015260a08086013591830191909152016020604051602081039080840390855afa158015610c27573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610c695750610c546020830183613f00565b6001600160a01b0316816001600160a01b0316145b610c7557610c75614849565b610c826020830183613f00565b609c80546001600160a01b0319166001600160a01b039290921691909117905550610cec8533610cb5602088018861485f565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061121d92505050565b92509250609c546001600160a01b031615610d0957610d09614849565b509250929050565b604080516001808252818301909252339160009190816020015b6040805180820190915260008082526020820152815260200190600190039081610d2b57905050604051632f2e037160e11b81526001600160a01b038581166004830152919250600091841690635e5c06e290602401606060405180830381865afa158015610d9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc29190614955565b6001600160a01b03861660009081526097602052604081206002810154929550935060ff90911691505b81816001600160801b03161015610e92576001600160801b038116600090815260018085016020908152604080842054815180830183529384526001600160a01b031680855287835293206008015490820190610e52908a908c9063ffffffff16612aed565b610e5c9088614836565b81525086600081518110610e7257610e7261480a565b6020026020010181905250610e898833838961238f565b50600101610dec565b50505050505050565b606080610f0a610ea961101b565b846099805480602002602001604051908101604052809291908181526020018280548015610f0057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ee2575b505050505061121d565b91509150915091565b600054610100900460ff1615808015610f335750600054600160ff909116105b80610f4d5750303b158015610f4d575060005460ff166001145b610f5657600080fd5b6000805460ff191660011790558015610f79576000805461ff0019166101001790555b610f81612cc2565b610f8c60003361269f565b8015610fd2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000610fe9610fe261101b565b8484610904565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606000609a80548060200260200160405190810160405280929190818152602001828054801561107557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611057575b5050505050905080516001600160401b038111156110955761109561400a565b6040519080825280602002602001820160405280156110db57816020015b6040805180820190915260008152606060208201528152602001906001900390816110b35790505b50915060005b81518110156111b6576040805160028082526060820183526000926020830190803683370190505090506001816000815181106111205761112061480a565b6020026020010190151590811515815250506000816001815181106111475761114761480a565b60200260200101901515908115158152505060405180604001604052808484815181106111765761117661480a565b60200260200101516001600160a01b03168152602001828152508483815181106111a2576111a261480a565b6020908102919091010152506001016110e1565b505090565b6060609980548060200260200160405190810160405280929190818152602001828054801561121357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116111f5575b5050505050905090565b609c5460609081906001600160a01b031661124557609c80546001600160a01b031916331790555b8251806001600160401b0381111561125f5761125f61400a565b604051908082528060200260200182016040528015611288578160200160208202803683370190505b50609c549092506001600160a01b031660005b87518110156114eb5760008882815181106112b8576112b861480a565b60209081029190910181015180516001600160a01b0316600090815260979092526040822060028101549193509160ff909116905b81816001600160801b031610156113685783516001600160801b03821660009081526001850160209081526040808320548851838a01516001600160a01b03909216808652938990529190932060080154611360948b9490939261135b92909190869063ffffffff1661278c565b61238f565b6001016112ed565b5060005b868110156114dc5760008360000160008c848151811061138e5761138e61480a565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020905060005b8560200151518110156114d2576001600160a01b0388166000908152600b8301602090815260408220908801518051839190859081106113fd576113fd61480a565b6020908102919091018101511515825281019190915260400160002054600160801b90046001600160801b0316905080156114c957808b85815181106114455761144561480a565b602002602001018181516114599190614836565b9052506001600160a01b0389166000908152600b8401602090815260408220908901518051839190869081106114915761149161480a565b6020908102919091018101511515825281019190915260400160002080546001600160801b03928316600160801b0292169190911790555b506001016113bb565b505060010161136c565b5083600101935050505061129b565b5060005b85518110156115d057600084828151811061150c5761150c61480a565b6020026020010151905060008111156115c75761155688828985815181106115365761153661480a565b60200260200101516001600160a01b0316612cd89092919063ffffffff16565b876001600160a01b03168783815181106115725761157261480a565b60200260200101516001600160a01b0316846001600160a01b03167fc1405953cccdad6b442e266c84d66ad671e2534c6584f8e6ef92802f7ad294d5846040516115be91815260200190565b60405180910390a45b506001016114ef565b5050609c80546001600160a01b031916905550919491935090915050565b60008281526065602052604090206001015461160981612695565b6108378383612725565b600061161e81612695565b60005b825181101561083757670de0b6b3a76400008382815181106116455761164561480a565b602002602001015161014001516001600160401b031610611679576040516306b7c75960e31b815260040160405180910390fd5b82818151811061168b5761168b61480a565b60200260200101516101a001516001600160401b03166000036116c1576040516306b7c75960e31b815260040160405180910390fd5b6000609760008584815181106116d9576116d961480a565b6020026020010151600001516001600160a01b03166001600160a01b03168152602001908152602001600020905060008160000160008685815181106117215761172161480a565b6020026020010151602001516001600160a01b03166001600160a01b03168152602001908152602001600020905081600301546000036117ac57609a85848151811061176f5761176f61480a565b6020908102919091018101515182546001810184556000938452919092200180546001600160a01b0319166001600160a01b039092169190911790555b609860008685815181106117c2576117c261480a565b6020908102919091018101518101516001600160a01b031682528101919091526040016000205460ff1661189e576001609860008786815181106118085761180861480a565b6020026020010151602001516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550609985848151811061185f5761185f61480a565b60209081029190910181015181015182546001810184556000938452919092200180546001600160a01b0319166001600160a01b039092169190911790555b6008810154600160401b900463ffffffff16600003611aaa578483815181106118c9576118c961480a565b6020908102919091018101510151600283018054600185019160009160ff1690826118f383614983565b91906101000a81548160ff021916908360ff16021790555060ff166001600160801b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555084838151811061195b5761195b61480a565b6020026020010151600001516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c891906149a2565b6119d390600a614a9b565b600383015584518590849081106119ec576119ec61480a565b6020026020010151606001518160080160006101000a81548163ffffffff021916908363ffffffff160217905550848381518110611a2c57611a2c61480a565b6020026020010151606001518160080160086101000a81548163ffffffff021916908363ffffffff160217905550848381518110611a6c57611a6c61480a565b602002602001015160800151858481518110611a8a57611a8a61480a565b602002602001015160c00151611aa09190614ac0565b6001820155611dc8565b600881015460408051600180825281830190925263ffffffff80841693640100000000900416916000919060208083019080368337019050509050600181600081518110611afa57611afa61480a565b602002602001019015159081151581525050611b776000898881518110611b2357611b2361480a565b6020026020010151600001518a8981518110611b4157611b4161480a565b60200260200101516020015161135b8c8b81518110611b6257611b6261480a565b6020026020010151600001518660008a61278c565b8163ffffffff16421015611cbc576000808463ffffffff16421115611c53576008860154611bb290600160601b900463ffffffff1642614ad4565b8660010154611bc19190614ae7565b8660090154611bd09190614836565b9150611be263ffffffff861642614ad4565b9050818a8981518110611bf757611bf761480a565b602002602001015160c00151111580611c2d5750808a8981518110611c1e57611c1e61480a565b60200260200101516080015111155b15611c4b576040516306b7c75960e31b815260040160405180910390fd5b600986018290555b808a8981518110611c6657611c6661480a565b602002602001015160800151611c7c9190614ad4565b828b8a81518110611c8f57611c8f61480a565b602002602001015160c00151611ca59190614ad4565b611caf9190614ac0565b600187015550611dc49050565b878681518110611cce57611cce61480a565b602090810291909101015160600151600885015463ffffffff908116911614611dc457878681518110611d0357611d0361480a565b6020026020010151606001518460080160006101000a81548163ffffffff021916908363ffffffff160217905550878681518110611d4357611d4361480a565b6020026020010151606001518460080160086101000a81548163ffffffff021916908363ffffffff160217905550878681518110611d8357611d8361480a565b602002602001015160800151888781518110611da157611da161480a565b602002602001015160c00151611db79190614ac0565b6001850155600060098501555b5050505b60088101805463ffffffff60601b1916600160601b4263ffffffff16021790558451859084908110611dfc57611dfc61480a565b6020908102919091010151608001516008820154611e20919063ffffffff16614afe565b8160080160046101000a81548163ffffffff021916908363ffffffff160217905550848381518110611e5457611e5461480a565b60200260200101516040015181600a0160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550848381518110611e9a57611e9a61480a565b602002602001015160c001518160020181905550848381518110611ec057611ec061480a565b602002602001015160a001518160000181905550848381518110611ee657611ee661480a565b602002602001015160e001518160030181905550848381518110611f0c57611f0c61480a565b602002602001015161010001518160050160006101000a8154816001600160801b030219169083600f0b6001600160801b03160217905550848381518110611f5657611f5661480a565b602002602001015161012001518160050160106101000a8154816001600160401b0302191690836001600160401b03160217905550848381518110611f9d57611f9d61480a565b602002602001015161016001518160060160006101000a8154816001600160401b0302191690836001600160401b03160217905550848381518110611fe457611fe461480a565b602002602001015161018001518160060160086101000a8154816001600160401b0302191690836001600160401b0316021790555084838151811061202b5761202b61480a565b602002602001015161014001518160050160186101000a8154816001600160401b0302191690836001600160401b031602179055508483815181106120725761207261480a565b60200260200101516101a001518160060160106101000a8154816001600160401b0302191690836001600160401b031602179055508483815181106120b9576120b961480a565b6020026020010151602001516001600160a01b03168584815181106120e0576120e061480a565b6020026020010151600001516001600160a01b03167fbb1f0f9f2e246d18022362060458bdfde9ab9b4e4eb514b800b155df7ea8ecac8786815181106121285761212861480a565b602002602001015160405161213d91906146be565b60405180910390a35050600101611621565b604080516101c081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a08101919091526001600160a01b0380841660008181526097602090815260408083208786168085529083529281902081516101c08101835294855291840192909252600a81015490931690820152600882015463ffffffff8082166060840181905260808401926122349264010000000090910416614b22565b63ffffffff1681528254602082015260028301546040820152600383015460608201526005830154600f81900b60808301526001600160401b03600160801b808304821660a0850152600160c01b909204811660c084015260069094015480851660e0840152600160401b810485166101008401520490921661012090920191909152905092915050565b60006122ca81612695565b6040516370a0823160e01b81523060048201526108379083906001600160a01b038616906370a0823190602401602060405180830381865afa158015612314573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061233891906147f1565b6001600160a01b0386169190612cd8565b6001600160a01b03808416600090815260976020908152604080832093861683529290529081208190819061237f908786612d27565b9250925092505b93509350939050565b6001600160a01b0383811660009081526097602090815260408083206003810154948716845290915290206008810154600160401b900463ffffffff16428110156124d757600080806123ec858a6123e78742614ad4565b612d27565b919450925090506001600160801b0383118061240e57506001600160801b0382115b1561242c57604051637decd25760e01b815260040160405180910390fd5b6001600160801b03828116600160801b0290841617600786015560088501805463ffffffff42908116600160401b026bffffffff0000000000000000199092169190911790915560048601829055604080518581526020810185905290810183905260608101919091526001600160a01b0389811691908b16907f1be815035b13056fba0f0dcbaec5d30add5d95e5f1b6990581607fbccdc930509060800160405180910390a35050505b506001600160a01b0386166000908152600b820160205260408120905b845181101561268b5760008582815181106125115761251161480a565b60209081029190910181015180511515600090815291859052604082208054825192945090926001600160801b03909116911561255c575060078601546001600160801b0316612573565b506007860154600160801b90046001600160801b03165b80821461267c5782546fffffffffffffffffffffffffffffffff19166001600160801b03821617835560208401511561267c5760006125b8856020015183858c6138ea565b8454909150819085906010906125df908490600160801b90046001600160801b0316614b3f565b92506101000a8154816001600160801b0302191690836001600160801b031602179055508c6001600160a01b03168b6001600160a01b03168d6001600160a01b03167fc4278cd1497fedb2697092108a0141a0cbecdd1472913b6e803010998aa6353788600001518787876040516126729493929190931515845260208401929092526040830152606082015260800190565b60405180910390a4505b846001019450505050506124f4565b5050505050505050565b610fd2813361390a565b6126a98282610ff0565b6109005760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556126e13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61272f8282610ff0565b156109005760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606083516001600160401b038111156127a7576127a761400a565b6040519080825280602002602001820160405280156127ec57816020015b60408051808201909152600080825260208201528152602001906001900390816127c55790505b50905060005b84518110156129805784818151811061280d5761280d61480a565b6020026020010151156128db57604051632f2e037160e11b81526001600160a01b03858116600483015260009190881690635e5c06e290602401606060405180830381865afa158015612864573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128889190614955565b9250505060405180604001604052806001151581526020016128ab898888612aed565b6128b59084614836565b8152508383815181106128ca576128ca61480a565b602002602001018190525050612978565b6040805180820182526000815290516370a0823160e01b81526001600160a01b0386811660048301526020830191908916906370a0823190602401602060405180830381865afa158015612933573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061295791906147f1565b81525082828151811061296c5761296c61480a565b60200260200101819052505b6001016127f2565b50949350505050565b80516001600160a01b039081166000908152609760208181526040808420878616855282528084208651909516845291905281206003015460088301548451929392600160401b90910463ffffffff1690849081906129fc9086904286106129f2576000612d27565b6123e78642614ad4565b506001600160a01b038b166000908152600b8801602052604081209294509092505b886020015151811015612adf57600089602001518281518110612a4357612a4361480a565b60200260200101516000015115612a5b575083612a5e565b50825b612aca8a602001518381518110612a7757612a7761480a565b602002602001015160200151828560008e602001518781518110612a9d57612a9d61480a565b6020908102919091018101515115158252810191909152604001600020546001600160801b03168a6138ea565b612ad4908a614836565b985050600101612a1e565b505050505050509392505050565b6000806224ea00612b048163ffffffff8616614b5f565b612b149063ffffffff8616614ad4565b612b1e9190614836565b90506000856001600160a01b0316630e52dbec6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b8491906149a2565b612b949060ff166224ea00614ae7565b612ba16224ea0042614b5f565b612bab9042614ad4565b612bb59190614836565b9050815b818111612c4e5760405163d2681a0b60e01b8152600481018290526001600160a01b0387811660248301526000919089169063d2681a0b906044016040805180830381865afa158015612c10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c349190614b73565b509050612c418186614836565b9450506224ea0001612bb9565b50604051635fb9165160e11b8152600481018490526001600160a01b0387169063bf722ca290602401602060405180830381865afa158015612c94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cb891906147f1565b9695505050505050565b600054610100900460ff16612cd657600080fd5b565b600060405163a9059cbb60e01b6000528360045282602452602060006044600080895af13d15601f3d1160016000511416171691506000606052806040525080612d2157600080fd5b50505050565b6000806000612d5060405180606001604052806000815260200160008152602001600081525090565b856001600160a01b031663eee8c9e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015612d8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612db291906147f1565b816000018181525050856001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa158015612df9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e1d91906147f1565b816020018181525050612e4a60405180606001604052806000815260200160008152602001600081525090565b600888015463ffffffff8082168084526401000000009092041660208301526000906224ea0090612e7c908290614b5f565b8351612e889190614ad4565b612e929190614836565b90506000886001600160a01b0316630e52dbec6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ef891906149a2565b612f089060ff166224ea00614ae7565b612f156224ea0042614b5f565b612f1f9042614ad4565b612f299190614836565b90506000825b828111612fd557604051630156d37d60e31b81526004810182905260009081906001600160a01b038e1690630ab69be8906024016040805180830381865afa158015612f7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa39190614b73565b9092509050612fb28285614836565b93508088602001818151612fc69190614836565b90525050506224ea0001612f2f565b508085600001818151612fe89190614836565b905250604051635fb9165160e11b8152600481018290526001600160a01b038b169063bf722ca290602401602060405180830381865afa158015613030573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061305491906147f1565b604086015250508854835160009250811161307757670de0b6b3a7640000613083565b83516130839082613951565b60018b015460048c01548551602087015193955060009450919290916130a891614ad4565b604086018190526000906130bd5760006130ed565b6130ed858760400151670de0b6b3a76400006130d99190614ae7565b8f600301546139629092919063ffffffff16565b9050856020015142116131cc57801561317357600061311d61310f8d84614ae7565b61311890614b97565b613981565b905061315761313482670de0b6b3a7640000614ad4565b61315161314989670de0b6b3a7640000614ad4565b879086613962565b90613af8565b6131618483613b0d565b61316b9190614836565b9850506131a7565b8a61319061318987670de0b6b3a7640000614ad4565b8590613b0d565b61319a9190614ae7565b6131a49083614836565b97505b6131b18289614bb3565b6131bb8c85614ae7565b6131c59190614bb3565b935061333a565b602086015160088e0154600160401b900463ffffffff161115613231576132126131f961310f8d84614ae7565b61320b90670de0b6b3a7640000614ad4565b8390613af8565b61321c9083614ad4565b97506132288289614bb3565b6131c590614b97565b60088d0154602087015160009161325691600160401b90910463ffffffff1690614ad4565b9b50811561329d5761326b61310f8d84614ae7565b905061328261313482670de0b6b3a7640000614ad4565b61328c8483613b0d565b6132969190614836565b98506132d1565b8b6132ba6132b388670de0b6b3a7640000614ad4565b8690613b0d565b6132c49190614ae7565b6132ce9084614836565b98505b6132ee8760200151426132e49190614ad4565b61310f9084614ae7565b905061330c61330582670de0b6b3a7640000614ad4565b8a90613af8565b613316908a614ad4565b9850613322838a614bb3565b61332c8d86614ae7565b6133369190614bb3565b9450505b8360000361336c5750505060078a01546001600160801b038082169850600160801b9091041695506123869350505050565b5050506133be6040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b60008560200151116133d15760006133f4565b602085015185516133f4916133e69190613951565b670de0b6b3a763ffff613b22565b80825260058c01546001600160401b03600160c01b8204811660c0850152600f9190910b60e084015260068d0154166101008301526134345760006134e2565b6134e26134c1670de0b6b3a764000061347161346c8560c00151670de0b6b3a76400006134619190614ad4565b60c087015190613951565b613b38565b84516134959061346c9061348d90670de0b6b3a7640000614ad4565b875190613951565b61349f9190614bb3565b8460e001516134ae9190614bd3565b6134b790614b97565b6131189190614c03565b6134d390670de0b6b3a7640000614836565b670de0b6b3a764000090613951565b6020820181905261369c906134ff90670de0b6b3a7640000614ad4565b61367183610100015161367761358a8f6001600160a01b031663666010326040518163ffffffff1660e01b8152600401602060405180830381865afa15801561354c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061357091906147f1565b61358290670de0b6b3a7640000614ad4565b875190613af8565b61359c90670de0b6b3a7640000614ad4565b8f6001600160a01b031663f3fdb15a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156135da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135fe9190614c31565b87516040516342543a3360e11b81526001600160a01b0392909216916384a87466916136309160040190815260200190565b602060405180830381865afa15801561364d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061367191906147f1565b90613b0d565b6136819190614836565b60058f0154600160801b90046001600160401b031690613b0d565b6040820152602081015160068c01546136c691600160801b9091046001600160401b031690613b0d565b6136fc8260200151670de0b6b3a76400006136e19190614ad4565b60068e0154600160401b90046001600160401b031690613b0d565b6137069190614836565b60608201819052604082015161372a9161371f91614836565b604083015190613951565b6080820181905261374390670de0b6b3a7640000614ad4565b8160a001818152505060008a6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561378c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137b091906147f1565b9050600086604001518c6001600160a01b0316638d0e5f026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156137f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061381b91906147f1565b6138259190614836565b6001600160a01b038d1660009081526097602052604090206003015490915081613850576000613873565b613873818361386c876080015189613b0d90919063ffffffff16565b9190613962565b60078f015461388b91906001600160801b0316614836565b9a506000831161389c5760006138b8565b6138b8818461386c8760a0015189613b0d90919063ffffffff16565b60078f01546138d79190600160801b90046001600160801b0316614836565b9950505050505050505093509350939050565b60006139016138f98486614ad4565b869084613962565b95945050505050565b6139148282610ff0565b6109005761392181613ce4565b61392c836020613cf6565b60405160200161393d929190614c7e565b604051602081830303815290604052600080fd5b6000610fe983670de0b6b3a7640000845b82820281151584158583048514171661397a57600080fd5b0492915050565b6000680248ce36a70cb26b3e19821361399c57506000919050565b680755bf798b4a1bf1e582126139b157600080fd5b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b6000610fe98383670de0b6b3a7640000613e4e565b6000610fe98383670de0b6b3a7640000613962565b6000818310613b315781610fe9565b5090919050565b6000808213613b4657600080fd5b60006060613b5384613e7c565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d6c8c3f38e95a6b1ff2ab1c3b343619018302821d6d02384773bdf1ac5676facced60901901830290911d6cb9a025d814b29c212b8b1a07cd1901909102780a09507084cc699bb0e71ea869ffffffffffffffffffffffff190105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60606107d26001600160a01b03831660145b60606000613d05836002614ae7565b613d10906002614836565b6001600160401b03811115613d2757613d2761400a565b6040519080825280601f01601f191660200182016040528015613d51576020820181803683370190505b509050600360fc1b81600081518110613d6c57613d6c61480a565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613d9b57613d9b61480a565b60200101906001600160f81b031916908160001a9053506000613dbf846002614ae7565b613dca906001614836565b90505b6001811115613e42576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613dfe57613dfe61480a565b1a60f81b828281518110613e1457613e1461480a565b60200101906001600160f81b031916908160001a90535060049490941c93613e3b81614cd4565b9050613dcd565b508315610fe957600080fd5b828202811515841585830485141716613e6657600080fd5b6001826001830304018115150290509392505050565b6000808211613e8a57600080fd5b5060016001600160801b03821160071b82811c6001600160401b031060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b6001600160a01b0381168114610fd257600080fd5b600060208284031215613f1257600080fd5b8135610fe981613eeb565b600060208284031215613f2f57600080fd5b81356001600160e01b031981168114610fe957600080fd5b600060208284031215613f5957600080fd5b5035919050565b8035613f6b81613eeb565b919050565b80358015158114613f6b57600080fd5b60008060008060808587031215613f9657600080fd5b8435613fa181613eeb565b93506020850135613fb181613eeb565b9250613fbf60408601613f70565b91506060850135613fcf81613eeb565b939692955090935050565b60008060408385031215613fed57600080fd5b823591506020830135613fff81613eeb565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156140425761404261400a565b60405290565b6040516101c081016001600160401b03811182821017156140425761404261400a565b604051601f8201601f191681016001600160401b03811182821017156140935761409361400a565b604052919050565b60006001600160401b038211156140b4576140b461400a565b5060051b60200190565b600082601f8301126140cf57600080fd5b813560206140e46140df8361409b565b61406b565b828152600592831b850182019282820191908785111561410357600080fd5b8387015b858110156141eb5780356001600160401b03808211156141275760008081fd5b908901906040828c03601f19018113156141415760008081fd5b614149614020565b8884013561415681613eeb565b8152838201358381111561416a5760008081fd5b8085019450508c603f85011261418257600092508283fd5b8884013592506141946140df8461409b565b83815292861b8401820192898101908e8511156141b15760008081fd5b948301945b848610156141d6576141c786613f70565b8252948a0194908a01906141b6565b828b0152508752505050928401928401614107565b5090979650505050505050565b60008060006060848603121561420d57600080fd5b83356001600160401b0381111561422357600080fd5b61422f868287016140be565b935050602084013561424081613eeb565b9150604084013561425081613eeb565b809150509250925092565b6000806040838503121561426e57600080fd5b823561427981613eeb565b91506020830135613fff81613eeb565b6000806040838503121561429c57600080fd5b82356001600160401b03808211156142b357600080fd5b6142bf868387016140be565b935060208501359150808211156142d557600080fd5b50830160c08186031215613fff57600080fd5b600081518084526020808501945080840160005b838110156143215781516001600160a01b0316875295820195908201906001016142fc565b509495945050505050565b60408152600061433f60408301856142e8565b82810360208481019190915284518083528582019282019060005b818110156141eb5784518352938301939183019160010161435a565b60006020808301818452808551808352604092508286019150828160051b8701018488016000805b8481101561441257898403603f19018652825180516001600160a01b03168552880151888501889052805188860181905290890190839060608701905b808310156143fd57835115158252928b019260019290920191908b01906143db565b50978a0197955050509187019160010161439e565b50919998505050505050505050565b602081526000610fe960208301846142e8565b60008060006060848603121561444957600080fd5b83356001600160401b038082111561446057600080fd5b61446c878388016140be565b9450602091508186013561447f81613eeb565b935060408601358181111561449357600080fd5b86019050601f810187136144a657600080fd5b80356144b46140df8261409b565b81815260059190911b820183019083810190898311156144d357600080fd5b928401925b828410156144fa5783356144eb81613eeb565b825292840192908401906144d8565b80955050505050509250925092565b803563ffffffff81168114613f6b57600080fd5b8035600f81900b8114613f6b57600080fd5b80356001600160401b0381168114613f6b57600080fd5b6000602080838503121561455957600080fd5b82356001600160401b0381111561456f57600080fd5b8301601f8101851361458057600080fd5b803561458e6140df8261409b565b8181526101c091820283018401918482019190888411156145ae57600080fd5b938501935b838510156146b25780858a0312156145cb5760008081fd5b6145d3614048565b6145dc86613f60565b81526145e9878701613f60565b8782015260406145fa818801613f60565b90820152606061460b878201614509565b908201526080868101359082015260a0808701359082015260c0808701359082015260e0808701359082015261010061464581880161451d565b9082015261012061465787820161452f565b9082015261014061466987820161452f565b9082015261016061467b87820161452f565b9082015261018061468d87820161452f565b908201526101a061469f87820161452f565b90820152835293840193918501916145b3565b50979650505050505050565b81516001600160a01b031681526101c0810160208301516146ea60208401826001600160a01b03169052565b50604083015161470560408401826001600160a01b03169052565b50606083015161471d606084018263ffffffff169052565b506080830151608083015260a083015160a083015260c083015160c083015260e083015160e08301526101008084015161475b82850182600f0b9052565b5050610120838101516001600160401b03908116918401919091526101408085015182169084015261016080850151821690840152610180808501518216908401526101a09384015116929091019190915290565b6000806000606084860312156147c557600080fd5b83356147d081613eeb565b925060208401356147e081613eeb565b929592945050506040919091013590565b60006020828403121561480357600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156107d2576107d2614820565b634e487b7160e01b600052600160045260246000fd5b6000808335601e1984360301811261487657600080fd5b8301803591506001600160401b0382111561489057600080fd5b6020019150600581901b36038213156148a857600080fd5b9250929050565b8781526001600160a01b03878116602080840191909152878216604084015260c060608401819052830186905260009187919060e08501845b8981101561490f5784356148fb81613eeb565b8316825293830193908301906001016148e8565b5060808601979097525050505060a0015295945050505050565b60ff81168114610fd257600080fd5b60006020828403121561494a57600080fd5b8135610fe981614929565b60008060006060848603121561496a57600080fd5b8351925060208401519150604084015190509250925092565b600060ff821660ff810361499957614999614820565b60010192915050565b6000602082840312156149b457600080fd5b8151610fe981614929565b600181815b80851115610d095781600019048211156149e0576149e0614820565b808516156149ed57918102915b93841c93908002906149c4565b600082614a09575060016107d2565b81614a16575060006107d2565b8160018114614a2c5760028114614a3657614a52565b60019150506107d2565b60ff841115614a4757614a47614820565b50506001821b6107d2565b5060208310610133831016604e8410600b8410161715614a75575081810a6107d2565b614a7f83836149bf565b8060001904821115614a9357614a93614820565b029392505050565b6000610fe960ff8416836149fa565b634e487b7160e01b600052601260045260246000fd5b600082614acf57614acf614aaa565b500490565b818103818111156107d2576107d2614820565b80820281158282048414176107d2576107d2614820565b63ffffffff818116838216019080821115614b1b57614b1b614820565b5092915050565b63ffffffff828116828216039080821115614b1b57614b1b614820565b6001600160801b03818116838216019080821115614b1b57614b1b614820565b600082614b6e57614b6e614aaa565b500690565b60008060408385031215614b8657600080fd5b505080516020909101519092909150565b6000600160ff1b8201614bac57614bac614820565b5060000390565b8181036000831280158383131683831282161715614b1b57614b1b614820565b80820260008212600160ff1b84141615614bef57614bef614820565b81810583148215176107d2576107d2614820565b600082614c1257614c12614aaa565b600160ff1b821460001984141615614c2c57614c2c614820565b500590565b600060208284031215614c4357600080fd5b8151610fe981613eeb565b6000815160005b81811015614c6f5760208185018101518683015201614c55565b50600093019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000614cb06017830185614c4e565b7001034b99036b4b9b9b4b733903937b6329607d1b81526139016011820185614c4e565b600081614ce357614ce3614820565b50600019019056fea264697066735822122073ece8fd9b7970695cb8613edb16c440a004eb8c6d7e5da9296b12bebc4db07d64736f6c63430008110033", + "numDeployments": 4, + "solcInputHash": "6a557ee70d62b80968609ef7922ee609", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"IndexOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotKeeper\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"operation\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"operationIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rewardsAccrued\",\"type\":\"uint256\"}],\"name\":\"Accrue\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"contract IPriceFeed\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"start\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"distributionPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"targetDebt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalDistribution\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"undistributedFactor\",\"type\":\"uint256\"},{\"internalType\":\"int128\",\"name\":\"flipSpeed\",\"type\":\"int128\"},{\"internalType\":\"uint64\",\"name\":\"compensationFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"transitionFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"borrowAllocationWeightFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositAllocationWeightAddend\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositAllocationWeightFactor\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct RewardsController.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DistributionSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newUndistributed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastUpdate\",\"type\":\"uint256\"}],\"name\":\"IndexUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UTILIZATION_CAP\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"operation\",\"type\":\"bool\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"accountOperation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"allClaimable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"unclaimedRewards\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allMarketsOperations\",\"outputs\":[{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"bool[]\",\"name\":\"operations\",\"type\":\"bool[]\"}],\"internalType\":\"struct RewardsController.MarketOperation[]\",\"name\":\"marketOps\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allRewards\",\"outputs\":[{\"internalType\":\"contract ERC20[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"}],\"name\":\"availableRewardsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"bool[]\",\"name\":\"operations\",\"type\":\"bool[]\"}],\"internalType\":\"struct RewardsController.MarketOperation[]\",\"name\":\"marketOps\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"contract ERC20[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct ClaimPermit\",\"name\":\"permit\",\"type\":\"tuple\"}],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"contract ERC20[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"claimedAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"bool[]\",\"name\":\"operations\",\"type\":\"bool[]\"}],\"internalType\":\"struct RewardsController.MarketOperation[]\",\"name\":\"marketOps\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract ERC20[]\",\"name\":\"rewardsList\",\"type\":\"address[]\"}],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"contract ERC20[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"claimAll\",\"outputs\":[{\"internalType\":\"contract ERC20[]\",\"name\":\"rewardsList\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"claimedAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"bool[]\",\"name\":\"operations\",\"type\":\"bool[]\"}],\"internalType\":\"struct RewardsController.MarketOperation[]\",\"name\":\"marketOps\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"contract ERC20[]\",\"name\":\"rewardsList\",\"type\":\"address[]\"}],\"name\":\"claimOnBehalfOf\",\"outputs\":[{\"internalType\":\"contract ERC20[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"bool[]\",\"name\":\"operations\",\"type\":\"bool[]\"}],\"internalType\":\"struct RewardsController.MarketOperation[]\",\"name\":\"marketOps\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"claimable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"unclaimedRewards\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"contract IPriceFeed\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"start\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"distributionPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"targetDebt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalDistribution\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"undistributedFactor\",\"type\":\"uint256\"},{\"internalType\":\"int128\",\"name\":\"flipSpeed\",\"type\":\"int128\"},{\"internalType\":\"uint64\",\"name\":\"compensationFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"transitionFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"borrowAllocationWeightFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositAllocationWeightAddend\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositAllocationWeightFactor\",\"type\":\"uint64\"}],\"internalType\":\"struct RewardsController.Config[]\",\"name\":\"configs\",\"type\":\"tuple[]\"}],\"name\":\"config\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Market\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"distribution\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"availableRewardsCount\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"baseUnit\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"distributionTime\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"handleBorrow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"handleDeposit\",\"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\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"keepers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"marketList\",\"outputs\":[{\"internalType\":\"contract Market\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deltaTime\",\"type\":\"uint256\"}],\"name\":\"previewAllocation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depositIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newUndistributed\",\"type\":\"uint256\"}],\"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\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"rewardConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"contract IPriceFeed\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"start\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"distributionPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"targetDebt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalDistribution\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"undistributedFactor\",\"type\":\"uint256\"},{\"internalType\":\"int128\",\"name\":\"flipSpeed\",\"type\":\"int128\"},{\"internalType\":\"uint64\",\"name\":\"compensationFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"transitionFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"borrowAllocationWeightFactor\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositAllocationWeightAddend\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositAllocationWeightFactor\",\"type\":\"uint64\"}],\"internalType\":\"struct RewardsController.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewardEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"rewardIndexes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rewardList\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"}],\"name\":\"setKeeper\",\"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\":[{\"internalType\":\"contract ERC20\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Accrue(address,address,address,bool,uint256,uint256,uint256)\":{\"params\":{\"account\":\"account that accrued the rewards.\",\"accountIndex\":\"previous account index.\",\"market\":\"Market where the operation was made.\",\"operation\":\"true if the operation was a borrow, false if it was a deposit.\",\"operationIndex\":\"new operation index that is assigned to the `accountIndex`.\",\"reward\":\"reward asset.\",\"rewardsAccrued\":\"amount of rewards accrued.\"}},\"Claim(address,address,address,uint256)\":{\"params\":{\"account\":\"account that claimed the rewards.\",\"amount\":\"amount of rewards claimed.\",\"reward\":\"reward asset.\",\"to\":\"account that received the rewards.\"}},\"DistributionSet(address,address,(address,address,address,uint32,uint256,uint256,uint256,uint256,int128,uint64,uint64,uint64,uint64,uint64))\":{\"params\":{\"config\":\"configuration struct containing the distribution parameters.\",\"market\":\"Market whose distribution was set.\",\"reward\":\"reward asset to be distributed when operating with the Market.\"}},\"IndexUpdate(address,address,uint256,uint256,uint256,uint256)\":{\"params\":{\"borrowIndex\":\"index of the borrow operations of a distribution.\",\"depositIndex\":\"index of the deposit operations of a distribution.\",\"lastUpdate\":\"current timestamp.\",\"market\":\"Market of the distribution.\",\"newUndistributed\":\"amount of undistributed rewards.\",\"reward\":\"reward asset.\"}},\"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\":{\"accountOperation(address,address,bool,address)\":{\"params\":{\"account\":\"The account to get the operation data from.\",\"market\":\"The market in which the operation was made.\",\"operation\":\"True if the operation was a borrow, false if it was a deposit.\",\"reward\":\"The reward asset.\"},\"returns\":{\"_0\":\"accrued The accrued amount.\",\"_1\":\"index The account index.\"}},\"allClaimable(address,address)\":{\"params\":{\"account\":\"The account to get the claimable amount for.\",\"reward\":\"The reward asset.\"},\"returns\":{\"unclaimedRewards\":\"The claimable amount for the given account.\"}},\"allMarketsOperations()\":{\"returns\":{\"marketOps\":\"The list of market operations.\"}},\"availableRewardsCount(address)\":{\"params\":{\"market\":\"Market to get the number of available rewards to distribute.\"},\"returns\":{\"_0\":\"The amount reward assets set to a Market.\"}},\"claim((address,bool[])[],(address,address[],uint256,uint8,bytes32,bytes32))\":{\"params\":{\"marketOps\":\"The operations to claim rewards for.\",\"permit\":\"Arguments and signature from `permit.owner`.\"},\"returns\":{\"_0\":\"rewardsList The list of rewards assets.\",\"claimedAmounts\":\"The list of claimed amounts.\"}},\"claim((address,bool[])[],address,address[])\":{\"params\":{\"marketOps\":\"The operations to claim rewards for.\",\"rewardsList\":\"The list of rewards assets to claim.\",\"to\":\"The address to send the rewards to.\"},\"returns\":{\"_0\":\"rewardsList The list of rewards assets.\",\"_1\":\"claimedAmounts The list of claimed amounts.\"}},\"claimAll(address)\":{\"params\":{\"to\":\"The address to send the rewards to.\"},\"returns\":{\"claimedAmounts\":\"The list of claimed amounts.\",\"rewardsList\":\"The list of rewards assets.\"}},\"claimOnBehalfOf((address,bool[])[],address,address[])\":{\"params\":{\"account\":\"The account to claim the rewards for.\",\"marketOps\":\"The operations to claim rewards for.\",\"rewardsList\":\"The list of rewards assets to claim.\"},\"returns\":{\"_0\":\"rewardsList The list of rewards assets.\",\"_1\":\"claimedAmounts The list of claimed amounts.\"}},\"claimable((address,bool[])[],address,address)\":{\"params\":{\"account\":\"The account to get the claimable amount for.\",\"marketOps\":\"The list of Market operations to get the accrued and pending rewards from.\",\"reward\":\"The reward asset.\"},\"returns\":{\"unclaimedRewards\":\"The claimable amount for the given account.\"}},\"config((address,address,address,uint32,uint256,uint256,uint256,uint256,int128,uint64,uint64,uint64,uint64,uint64)[])\":{\"params\":{\"configs\":\"The configurations to update each RewardData with.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"distributionTime(address,address)\":{\"params\":{\"market\":\"The market to get the distribution times.\",\"reward\":\"The reward asset.\"},\"returns\":{\"_0\":\"The distribution `start`, `end` and `lastUpdate` time.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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.\"},\"handleBorrow(address)\":{\"details\":\"There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\",\"params\":{\"account\":\"The account to which the index is updated.\"}},\"handleDeposit(address)\":{\"details\":\"There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\",\"params\":{\"account\":\"The account to which the index is updated.\"}},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize()\":{\"details\":\"Can only be called once.\"},\"previewAllocation(address,address,uint256)\":{\"params\":{\"deltaTime\":\"The elapsed time since the last update.\",\"market\":\"The market to calculate the indexes for.\",\"reward\":\"The reward asset to calculate the indexes for.\"},\"returns\":{\"borrowIndex\":\"The index for the borrow operation.\",\"depositIndex\":\"The index for the deposit operation.\",\"newUndistributed\":\"The new undistributed rewards of the distribution.\"}},\"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.\"},\"rewardConfig(address,address)\":{\"params\":{\"market\":\"The market to get the distribution configuration for.\",\"reward\":\"The reward asset.\"},\"returns\":{\"_0\":\"The distribution configuration.\"}},\"rewardIndexes(address,address)\":{\"params\":{\"market\":\"The market to get the reward indexes for.\",\"reward\":\"The reward asset to get the reward indexes for.\"},\"returns\":{\"_0\":\"borrowIndex The index for the floating and fixed borrow operation.\",\"_1\":\"depositIndex The index for the floating deposit operation.\",\"_2\":\"lastUndistributed The last amount of undistributed rewards.\"}},\"setKeeper(address,address)\":{\"params\":{\"account\":\"The account to set the `keeper` for.\",\"keeper\":\"The address to set as the `keeper`.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"withdraw(address,address)\":{\"params\":{\"asset\":\"The asset to withdraw.\",\"to\":\"The address to withdraw the asset to.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"Accrue(address,address,address,bool,uint256,uint256,uint256)\":{\"notice\":\"Emitted when rewards are accrued by an account.\"},\"Claim(address,address,address,uint256)\":{\"notice\":\"Emitted when rewards are claimed by an account.\"},\"DistributionSet(address,address,(address,address,address,uint32,uint256,uint256,uint256,uint256,int128,uint64,uint64,uint64,uint64,uint64))\":{\"notice\":\"Emitted when a distribution is set.\"},\"IndexUpdate(address,address,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when the distribution indexes are updated.\"}},\"kind\":\"user\",\"methods\":{\"UTILIZATION_CAP()\":{\"notice\":\"Max utilization supported by the sigmoid function not to cause a division by zero (1e18 = WAD).\"},\"accountOperation(address,address,bool,address)\":{\"notice\":\"Gets the account data of a given account, Market, operation and reward asset.\"},\"allClaimable(address,address)\":{\"notice\":\"Gets the claimable amount of rewards for a given account and reward asset.\"},\"allMarketsOperations()\":{\"notice\":\"Gets all market and operations.\"},\"allRewards()\":{\"notice\":\"Retrieves all rewards addresses.\"},\"availableRewardsCount(address)\":{\"notice\":\"Gets the amount of reward assets that are being distributed for a Market.\"},\"claim((address,bool[])[],(address,address[],uint256,uint8,bytes32,bytes32))\":{\"notice\":\"Claims `permit.owner` rewards for the given operations and reward assets to the given account.\"},\"claim((address,bool[])[],address,address[])\":{\"notice\":\"Claims `msg.sender` rewards for the given operations and reward assets to the given account.\"},\"claimAll(address)\":{\"notice\":\"Claims all `msg.sender` rewards to the given account.\"},\"claimOnBehalfOf((address,bool[])[],address,address[])\":{\"notice\":\"Claims `account` rewards for the given operations and reward assets.\"},\"claimable((address,bool[])[],address,address)\":{\"notice\":\"Gets the claimable amount of rewards for a given account, Market operations and reward asset.\"},\"config((address,address,address,uint32,uint256,uint256,uint256,uint256,int128,uint64,uint64,uint64,uint64,uint64)[])\":{\"notice\":\"Enables or updates the reward distribution for the given markets and rewards.\"},\"distribution(address)\":{\"notice\":\"Tracks the reward distribution data for a given market.\"},\"distributionTime(address,address)\":{\"notice\":\"Gets the distribution `start`, `end` and `lastUpdate` value of a given market and reward.\"},\"handleBorrow(address)\":{\"notice\":\"Hook to be called by the Market to update the index of the account that made a rewarded borrow.\"},\"handleDeposit(address)\":{\"notice\":\"Hook to be called by the Market to update the index of the account that made a rewarded deposit.\"},\"initialize()\":{\"notice\":\"Initializes the contract.\"},\"keepers(address)\":{\"notice\":\"Tracks the allowed `keeper` to claim on behalf of `account`.\"},\"marketList(uint256)\":{\"notice\":\"Stores Markets with distributions set.\"},\"nonces(address)\":{\"notice\":\"Tracks the owner nonces for the claim permit.\"},\"previewAllocation(address,address,uint256)\":{\"notice\":\"Retrieves projected distribution indexes and new undistributed amount for a given `deltaTime`.\"},\"rewardConfig(address,address)\":{\"notice\":\"Gets the configuration of a given distribution.\"},\"rewardEnabled(address)\":{\"notice\":\"Tracks enabled asset rewards.\"},\"rewardIndexes(address,address)\":{\"notice\":\"Gets the reward indexes and last amount of undistributed rewards for a given market and reward asset.\"},\"rewardList(uint256)\":{\"notice\":\"Stores registered asset rewards.\"},\"setKeeper(address,address)\":{\"notice\":\"Sets the `keeper` address for the given `account`.\"},\"withdraw(address,address)\":{\"notice\":\"Withdraws the contract's balance of the given asset to the given address.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/RewardsController.sol\":\"RewardsController\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1111},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable-v4/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 {Initializable} from \\\"../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 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 function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_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(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\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-v4/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-v4/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-v4/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\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\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-v4/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-v4/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport {Initializable} from \\\"../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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\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\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-v4/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-v4/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 {Initializable} from \\\"../../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\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-v4/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-v4/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-v4/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-v4/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-v4/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\"},\"contracts/Auditor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract Auditor is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n\\n /// @notice Address that a market should have as price feed to consider as base price and avoid external price call.\\n address public constant BASE_FEED = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n /// @notice Target health factor that the account should have after it's liquidated to prevent cascade liquidations.\\n uint256 public constant TARGET_HEALTH = 1.25e18;\\n /// @notice Maximum value the liquidator can send and still have granular control of max assets.\\n /// Above this threshold, they should send `type(uint256).max`.\\n uint256 public constant ASSETS_THRESHOLD = type(uint256).max / 1e18;\\n\\n /// @notice Decimals that the answer of all price feeds should have.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 public immutable priceDecimals;\\n /// @notice Base factor to scale the price returned by the feed to 18 decimals.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable baseFactor;\\n /// @notice Base price used if the feed to fetch the price from is `BASE_FEED`.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable basePrice;\\n\\n /// @notice Tracks the markets' indexes that an account has entered as collateral.\\n mapping(address => uint256) public accountMarkets;\\n /// @notice Stores market parameters per each enabled market.\\n mapping(Market => MarketData) public markets;\\n /// @notice Array of all enabled markets.\\n Market[] public marketList;\\n\\n /// @notice Liquidation incentive factors for the liquidator and the lenders of the market where the debt is repaid.\\n LiquidationIncentive public liquidationIncentive;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(uint256 priceDecimals_) {\\n priceDecimals = priceDecimals_;\\n baseFactor = 10 ** (18 - priceDecimals_);\\n basePrice = 10 ** priceDecimals_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(LiquidationIncentive memory liquidationIncentive_) external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setLiquidationIncentive(liquidationIncentive_);\\n }\\n\\n /// @notice Allows assets of a certain market to be used as collateral for borrowing other assets.\\n /// @param market market to enabled as collateral.\\n function enterMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) != 0) return;\\n accountMarkets[msg.sender] = marketMap | marketMask;\\n\\n emit MarketEntered(market, msg.sender);\\n }\\n\\n /// @notice Removes market from sender's account liquidity calculation.\\n /// @dev Sender must not have an outstanding borrow balance in the asset, or be providing necessary collateral\\n /// for an outstanding borrow.\\n /// @param market market to be disabled as collateral.\\n function exitMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n (uint256 assets, uint256 debt) = market.accountSnapshot(msg.sender);\\n\\n // fail if the sender has a borrow balance\\n if (debt != 0) revert RemainingDebt();\\n\\n // fail if the sender is not permitted to redeem all of their assets\\n checkShortfall(market, msg.sender, assets);\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) == 0) return;\\n accountMarkets[msg.sender] = marketMap & ~marketMask;\\n\\n emit MarketExited(market, msg.sender);\\n }\\n\\n /// @notice Returns account's liquidity calculation.\\n /// @param account account in which the liquidity will be calculated.\\n /// @param marketToSimulate market in which to simulate withdraw operation.\\n /// @param withdrawAmount amount to simulate as withdraw.\\n /// @return sumCollateral sum of all collateral, already multiplied by each adjust factor (denominated in base).\\n /// @return sumDebtPlusEffects sum of all debt divided by adjust factor considering withdrawal (denominated in base).\\n function accountLiquidity(\\n address account,\\n Market marketToSimulate,\\n uint256 withdrawAmount\\n ) public view returns (uint256 sumCollateral, uint256 sumDebtPlusEffects) {\\n AccountLiquidity memory vars; // holds all our calculation results\\n\\n // for each asset the account is in\\n uint256 marketMap = accountMarkets[account];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 baseUnit = 10 ** m.decimals;\\n uint256 adjustFactor = m.adjustFactor;\\n\\n // read the balances\\n (vars.balance, vars.borrowBalance) = market.accountSnapshot(account);\\n\\n // get the normalized price of the asset (18 decimals)\\n vars.price = assetPrice(m.priceFeed);\\n\\n // sum all the collateral prices\\n sumCollateral += vars.balance.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n\\n // sum all the debt\\n sumDebtPlusEffects += vars.borrowBalance.mulDivUp(vars.price, baseUnit).divWadUp(adjustFactor);\\n\\n // simulate the effects of withdrawing from a pool\\n if (market == marketToSimulate) {\\n // calculate the effects of redeeming markets\\n // (having less collateral is the same as having more debt for this calculation)\\n if (withdrawAmount != 0) {\\n sumDebtPlusEffects += withdrawAmount.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n }\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Validates that the current state of the position and system are valid.\\n /// @dev To be called after adding the borrowed debt to the account position.\\n /// @param market address of the market where the borrow is made.\\n /// @param borrower address of the account that will repay the debt.\\n function checkBorrow(Market market, address borrower) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[borrower];\\n uint256 marketMask = 1 << m.index;\\n\\n // validate borrow state\\n if ((marketMap & marketMask) == 0) {\\n // only markets may call checkBorrow if borrower not in market\\n if (msg.sender != address(market)) revert NotMarket();\\n\\n accountMarkets[borrower] = marketMap | marketMask;\\n emit MarketEntered(market, borrower);\\n }\\n\\n // verify that current liquidity is not short\\n (uint256 collateral, uint256 debt) = accountLiquidity(borrower, Market(address(0)), 0);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Checks if the account has liquidity shortfall.\\n /// @param market address of the market where the operation will happen.\\n /// @param account address of the account to check for possible shortfall.\\n /// @param amount amount that the account wants to withdraw or transfer.\\n function checkShortfall(Market market, address account, uint256 amount) public view {\\n // if the account is not 'in' the market, bypass the liquidity check\\n if ((accountMarkets[account] & (1 << markets[market].index)) == 0) return;\\n\\n // otherwise, perform a hypothetical liquidity check to guard against shortfall\\n (uint256 collateral, uint256 debt) = accountLiquidity(account, market, amount);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Allows/rejects liquidation of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt is being repaid.\\n /// @param seizeMarket market from where the liquidator will seize assets.\\n /// @param borrower address in which the assets are being liquidated.\\n /// @param maxLiquidatorAssets maximum amount of debt the liquidator is willing to accept.\\n /// @return maxRepayAssets capped amount of debt the liquidator is allowed to repay.\\n function checkLiquidation(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 maxLiquidatorAssets\\n ) external view returns (uint256 maxRepayAssets) {\\n // if markets are listed, they have the same auditor\\n if (!markets[repayMarket].isListed || !markets[seizeMarket].isListed) revert MarketNotListed();\\n\\n MarketVars memory repay;\\n LiquidityVars memory base;\\n uint256 marketMap = accountMarkets[borrower];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage marketData = markets[market];\\n MarketVars memory m = MarketVars({\\n price: assetPrice(marketData.priceFeed),\\n adjustFactor: marketData.adjustFactor,\\n baseUnit: 10 ** marketData.decimals\\n });\\n\\n if (market == repayMarket) repay = m;\\n\\n (uint256 collateral, uint256 debt) = market.accountSnapshot(borrower);\\n\\n uint256 value = debt.mulDivUp(m.price, m.baseUnit);\\n base.totalDebt += value;\\n base.adjustedDebt += value.divWadUp(m.adjustFactor);\\n\\n value = collateral.mulDivDown(m.price, m.baseUnit);\\n base.totalCollateral += value;\\n base.adjustedCollateral += value.mulWadDown(m.adjustFactor);\\n if (market == seizeMarket) base.seizeAvailable = value;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (base.adjustedCollateral >= base.adjustedDebt) revert InsufficientShortfall();\\n\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n uint256 adjustFactor = base.adjustedCollateral.mulWadDown(base.totalDebt).divWadUp(\\n base.adjustedDebt.mulWadUp(base.totalCollateral)\\n );\\n uint256 closeFactor = (TARGET_HEALTH - base.adjustedCollateral.divWadUp(base.adjustedDebt)).divWadUp(\\n TARGET_HEALTH - adjustFactor.mulWadDown(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n );\\n maxRepayAssets = Math.min(\\n Math\\n .min(\\n base.totalDebt.mulWadUp(Math.min(1e18, closeFactor)),\\n base.seizeAvailable.divWadUp(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n )\\n .mulDivUp(repay.baseUnit, repay.price),\\n maxLiquidatorAssets < ASSETS_THRESHOLD\\n ? maxLiquidatorAssets.divWadDown(1e18 + memIncentive.lenders)\\n : maxLiquidatorAssets\\n );\\n }\\n\\n /// @notice Allow/rejects seizing of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market where the assets will be seized.\\n function checkSeize(Market repayMarket, Market seizeMarket) external view {\\n // if markets are listed, they also point to the same Auditor\\n if (!markets[seizeMarket].isListed || !markets[repayMarket].isListed) revert MarketNotListed();\\n }\\n\\n /// @notice Calculates the amount of collateral to be seized when a position is undercollateralized.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market from where the assets will be seized by the liquidator.\\n /// @param borrower account in which assets are being seized.\\n /// @param actualRepayAssets amount being repaid.\\n /// @return lendersAssets amount to be added for other lenders as a compensation of bad debt clearing.\\n /// @return seizeAssets amount that can be seized by the liquidator.\\n function calculateSeize(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 actualRepayAssets\\n ) external view returns (uint256 lendersAssets, uint256 seizeAssets) {\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n lendersAssets = actualRepayAssets.mulWadDown(memIncentive.lenders);\\n\\n // read prices for borrowed and collateral markets\\n uint256 priceBorrowed = assetPrice(markets[repayMarket].priceFeed);\\n uint256 priceCollateral = assetPrice(markets[seizeMarket].priceFeed);\\n uint256 baseAmount = actualRepayAssets.mulDivUp(priceBorrowed, 10 ** markets[repayMarket].decimals);\\n\\n seizeAssets = Math.min(\\n baseAmount.mulDivUp(10 ** markets[seizeMarket].decimals, priceCollateral).mulWadUp(\\n 1e18 + memIncentive.liquidator + memIncentive.lenders\\n ),\\n seizeMarket.maxWithdraw(borrower)\\n );\\n }\\n\\n /// @notice Checks if account has debt with no collateral, if so then call `clearBadDebt` from each market.\\n /// @dev Collateral is multiplied by price and adjust factor to be accurately evaluated as positive collateral asset.\\n /// @param account account in which debt is being checked.\\n function handleBadDebt(address account) external {\\n uint256 memMarketMap = accountMarkets[account];\\n uint256 marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 assets = market.maxWithdraw(account);\\n if (assets.mulDivDown(assetPrice(m.priceFeed), 10 ** m.decimals).mulWadDown(m.adjustFactor) > 0) return;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) marketList[i].clearBadDebt(account);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the asset price of a price feed.\\n /// @dev If Chainlink's asset price is <= 0 the call is reverted.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price.\\n /// @return The price of the asset scaled to 18-digit decimals.\\n function assetPrice(IPriceFeed priceFeed) public view returns (uint256) {\\n if (address(priceFeed) == BASE_FEED) return basePrice;\\n\\n int256 price = priceFeed.latestAnswer();\\n if (price <= 0) revert InvalidPrice();\\n return uint256(price) * baseFactor;\\n }\\n\\n /// @notice Retrieves all markets.\\n function allMarkets() external view returns (Market[] memory) {\\n return marketList;\\n }\\n\\n /// @notice Enables a certain market.\\n /// @dev Enabling more than 256 markets will cause an overflow when casting market index to uint8.\\n /// @param market market to add to the protocol.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n /// @param adjustFactor market's adjust factor for the underlying asset.\\n function enableMarket(\\n Market market,\\n IPriceFeed priceFeed,\\n uint128 adjustFactor\\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (market.auditor() != this) revert AuditorMismatch();\\n if (markets[market].isListed) revert MarketAlreadyListed();\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n\\n uint8 decimals = market.decimals();\\n markets[market] = MarketData({\\n isListed: true,\\n adjustFactor: adjustFactor,\\n decimals: decimals,\\n index: uint8(marketList.length),\\n priceFeed: priceFeed\\n });\\n\\n marketList.push(market);\\n\\n emit MarketListed(market, decimals);\\n emit PriceFeedSet(market, priceFeed);\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the adjust factor for a certain market.\\n /// @param market address of the market to change adjust factor for.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n function setAdjustFactor(Market market, uint128 adjustFactor) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (!markets[market].isListed) revert MarketNotListed();\\n\\n markets[market].adjustFactor = adjustFactor;\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the Chainlink Price Feed Aggregator source for a market.\\n /// @param market market address of the asset.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n function setPriceFeed(Market market, IPriceFeed priceFeed) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n markets[market].priceFeed = priceFeed;\\n emit PriceFeedSet(market, priceFeed);\\n }\\n\\n /// @notice Sets liquidation incentive (liquidator and lenders) for the whole ecosystem.\\n /// @param liquidationIncentive_ new liquidation incentive.\\n function setLiquidationIncentive(\\n LiquidationIncentive memory liquidationIncentive_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n liquidationIncentive = liquidationIncentive_;\\n emit LiquidationIncentiveSet(liquidationIncentive_);\\n }\\n\\n /// @notice Emitted when a new market is listed for borrow/lending.\\n /// @param market address of the market that was listed.\\n /// @param decimals decimals of the market's underlying asset.\\n event MarketListed(Market indexed market, uint8 decimals);\\n\\n /// @notice Emitted when an account enters a market to use his deposit as collateral for a loan.\\n /// @param market address of the market that the account entered.\\n /// @param account address of the account that just entered a market.\\n event MarketEntered(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when an account leaves a market.\\n /// Means that they would stop using their deposit as collateral and won't ask for any loans in this market.\\n /// @param market address of the market that the account just left.\\n /// @param account address of the account that just left a market.\\n event MarketExited(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when a adjust factor is changed by admin.\\n /// @param market address of the market that has a new adjust factor.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n event AdjustFactorSet(Market indexed market, uint256 adjustFactor);\\n\\n /// @notice Emitted when a new liquidationIncentive has been set.\\n /// @param liquidationIncentive represented with 18 decimals.\\n event LiquidationIncentiveSet(LiquidationIncentive liquidationIncentive);\\n\\n /// @notice Emitted when a market and prie feed is changed by admin.\\n /// @param market address of the asset used to get the price.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n event PriceFeedSet(Market indexed market, IPriceFeed indexed priceFeed);\\n\\n /// @notice Stores the market parameters used for liquidity calculations.\\n /// @param adjustFactor used to asses the lending power of the market's underlying asset.\\n /// @param decimals number of decimals of the market's underlying asset.\\n /// @param index index of the market in the `marketList`.\\n /// @param isListed true if the market is enabled.\\n /// @param priceFeed address of the price feed used to query the asset's price.\\n struct MarketData {\\n uint128 adjustFactor;\\n uint8 decimals;\\n uint8 index;\\n bool isListed;\\n IPriceFeed priceFeed;\\n }\\n\\n /// @notice Stores the liquidator and lenders factors used in liquidations to calculate the amount to seize.\\n /// @param liquidator factor used to calculate the extra bonus a liquidator can seize.\\n /// @param lenders factor used to calculate the bonus that the pool lenders receive.\\n struct LiquidationIncentive {\\n uint128 liquidator;\\n uint128 lenders;\\n }\\n\\n /// @notice Used as memory access to temporary store account liquidity data.\\n /// @param balance collateral balance of the account.\\n /// @param borrowBalance borrow balance of the account.\\n /// @param price asset price returned by the price feed with 18 decimals.\\n struct AccountLiquidity {\\n uint256 balance;\\n uint256 borrowBalance;\\n uint256 price;\\n }\\n}\\n\\nerror AuditorMismatch();\\nerror InsufficientAccountLiquidity();\\nerror InsufficientShortfall();\\nerror InvalidPrice();\\nerror InvalidPriceFeed();\\nerror MarketAlreadyListed();\\nerror MarketNotListed();\\nerror NotMarket();\\nerror RemainingDebt();\\n\\nstruct MarketVars {\\n uint256 price;\\n uint256 baseUnit;\\n uint128 adjustFactor;\\n}\\n\\nstruct LiquidityVars {\\n uint256 totalDebt;\\n uint256 totalCollateral;\\n uint256 adjustedDebt;\\n uint256 adjustedCollateral;\\n uint256 seizeAvailable;\\n}\\n\",\"keccak256\":\"0x5110a03bc02c12d47bc64ccb39250e2c9eaa4c4089e63ed143e0513bf7ede5d8\",\"license\":\"BUSL-1.1\"},\"contracts/InterestRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts-v4/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts-v4/utils/math/SafeCast.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract InterestRateModel {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for int256;\\n using SafeCast for uint256;\\n using SafeCast for int256;\\n\\n /// @notice Scale factor of the floating curve.\\n uint256 public immutable floatingCurveA;\\n /// @notice Origin intercept of the floating curve.\\n int256 public immutable floatingCurveB;\\n /// @notice Asymptote of the floating curve.\\n uint256 public immutable floatingMaxUtilization;\\n\\n /// @notice natural level of utilization, represented with 18 decimals.\\n uint256 public immutable naturalUtilization;\\n /// @notice speed of growth for the base rate, represented with 18 decimals.\\n int256 public immutable growthSpeed;\\n /// @notice speed of the sigmoid curve, represented with 18 decimals.\\n int256 public immutable sigmoidSpeed;\\n /// @notice spread factor for the fixed rate, represented with 18 decimals.\\n int256 public immutable spreadFactor;\\n /// @notice speed of maturity for the fixed rate, represented with 18 decimals.\\n int256 public immutable maturitySpeed;\\n /// @notice time preference for the fixed rate, represented with 18 decimals.\\n int256 public immutable timePreference;\\n /// @notice liquidity naturally designated to fixed pools, represented with 18 decimals.\\n uint256 public immutable fixedAllocation;\\n /// @notice maximum interest rate, represented with 18 decimals.\\n uint256 public immutable maxRate;\\n\\n /// @dev maximum input value for expWad, ~ln((2^255 - 1) / 1e18), represented with 18 decimals.\\n int256 internal constant EXP_THRESHOLD = 135305999368893231588;\\n /// @dev auxiliary variable to save an extra operation.\\n int256 internal immutable auxSigmoid;\\n\\n /// @notice set of parameters used to initialize the interest rate model.\\n Parameters internal _parameters;\\n\\n constructor(Parameters memory p, Market market_) {\\n assert(\\n p.minRate > 0 &&\\n p.naturalRate > 0 &&\\n p.maxUtilization > 1e18 &&\\n p.naturalUtilization > 0 &&\\n p.naturalUtilization < 1e18 &&\\n p.growthSpeed > 0 &&\\n p.sigmoidSpeed > 0 &&\\n p.spreadFactor > 0 &&\\n p.maturitySpeed > 0 &&\\n p.maxRate > 0 &&\\n p.maxRate <= 15_000e16\\n );\\n\\n _parameters = p;\\n growthSpeed = p.growthSpeed.toInt256();\\n sigmoidSpeed = p.sigmoidSpeed.toInt256();\\n spreadFactor = p.spreadFactor.toInt256();\\n maturitySpeed = p.maturitySpeed.toInt256();\\n floatingMaxUtilization = p.maxUtilization;\\n naturalUtilization = p.naturalUtilization;\\n\\n floatingCurveA =\\n ((p.naturalRate.mulWadUp(\\n uint256(((growthSpeed * (1e18 - int256(p.naturalUtilization / 2)).lnWad()) / 1e18).expWad())\\n ) - p.minRate) *\\n (p.maxUtilization - p.naturalUtilization) *\\n (p.maxUtilization)) /\\n (p.naturalUtilization * 1e18);\\n floatingCurveB = int256(p.minRate) - int256(floatingCurveA.divWadDown(p.maxUtilization));\\n\\n market = market_;\\n fixedCurveA = address(market_) != address(0) ? floatingCurveA : 0;\\n fixedCurveB = address(market_) != address(0) ? floatingCurveB : int256(0);\\n fixedMaxUtilization = address(market_) != address(0) ? p.maxUtilization : 0;\\n\\n timePreference = p.timePreference;\\n fixedAllocation = p.fixedAllocation;\\n maxRate = p.maxRate;\\n\\n auxSigmoid = int256(naturalUtilization.divWadDown(1e18 - naturalUtilization)).lnWad();\\n\\n // reverts if it's an invalid curve (such as one yielding a negative interest rate).\\n fixedRate(block.timestamp + FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL), 2, 1, 1, 2);\\n baseRate(1e18 - 1, 1e18 - 1);\\n }\\n\\n /// @notice fixed rate with given conditions, represented with 18 decimals.\\n /// @param maturity maturity of the pool.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param uFixed fixed utilization of the pool.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `base * spread` and `maxRate` with given conditions.\\n function fixedRate(\\n uint256 maturity,\\n uint256 maxPools,\\n uint256 uFixed,\\n uint256 uFloating,\\n uint256 uGlobal\\n ) public view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n if (uFixed > uGlobal) revert UtilizationExceeded();\\n if (uGlobal == 0) return baseRate(uFloating, 0);\\n\\n FixedVars memory v;\\n v.sqFNatPools = (maxPools * 1e18).divWadDown(fixedAllocation);\\n v.fNatPools = (v.sqFNatPools * 1e18).sqrt();\\n v.fixedFactor = (maxPools * uFixed).mulDivDown(1e36, uGlobal * fixedAllocation);\\n v.natPools =\\n ((2e18 - v.sqFNatPools.toInt256()) * 1e36) /\\n (v.fNatPools.toInt256() * (1e18 - v.fNatPools.toInt256()));\\n v.maturityFactor = (maturity - block.timestamp).divWadDown(maxPools * FixedLib.INTERVAL);\\n\\n uint256 spread = (1e18 +\\n (((maturitySpeed * (v.maturityFactor).toInt256().lnWad()) / 1e18).expWad() *\\n (timePreference +\\n (spreadFactor *\\n ((v.natPools * (v.fixedFactor * 1e18).sqrt().toInt256()) /\\n 1e18 +\\n ((1e18 - v.natPools) * v.fixedFactor.toInt256()) /\\n 1e18 -\\n 1e18)) /\\n 1e18)) /\\n 1e18).toUint256();\\n uint256 base = baseRate(uFloating, uGlobal);\\n\\n if (base >= maxRate.divWadDown(spread)) return maxRate;\\n return base.mulWadUp(spread);\\n }\\n\\n /// @notice base rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the base rate, without capping.\\n function baseRate(uint256 uFloating, uint256 uGlobal) internal view returns (uint256) {\\n if (uFloating > uGlobal) revert UtilizationExceeded();\\n if (uGlobal >= 1e18) return type(uint256).max;\\n\\n uint256 r = ((floatingCurveA.divWadDown(floatingMaxUtilization - uFloating)).toInt256() + floatingCurveB)\\n .toUint256();\\n\\n if (uGlobal == 0) return r;\\n\\n int256 x = -((sigmoidSpeed * (int256(uGlobal.divWadDown(1e18 - uGlobal)).lnWad() - auxSigmoid)) / 1e18);\\n uint256 sigmoid = x > EXP_THRESHOLD ? 0 : uint256(1e18).divWadDown(1e18 + x.expWad().toUint256());\\n x = (-growthSpeed * (1e18 - sigmoid.mulWadDown(uGlobal)).toInt256().lnWad()) / 1e18;\\n uint256 globalFactor = ((x > EXP_THRESHOLD ? EXP_THRESHOLD : x).expWad()).toUint256();\\n\\n if (globalFactor > type(uint256).max / r) return type(uint256).max;\\n\\n return r.mulWadUp(globalFactor);\\n }\\n\\n /// @notice floating rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `baseRate` and `maxRate` with given conditions.\\n function floatingRate(uint256 uFloating, uint256 uGlobal) public view returns (uint256) {\\n return Math.min(baseRate(uFloating, uGlobal), maxRate);\\n }\\n\\n function parameters() external view returns (Parameters memory) {\\n return _parameters;\\n }\\n\\n // Legacy interface, kept for compatibility.\\n\\n /// @notice Market where the interest rate model is used. Keeps compatibility with legacy interest rate model.\\n Market public immutable market;\\n uint256 public immutable fixedCurveA;\\n int256 public immutable fixedCurveB;\\n uint256 public immutable fixedMaxUtilization;\\n\\n /// @dev Deprecated in favor of `floatingRate(uFloating, uGlobal)`.\\n function floatingRate(uint256) public view returns (uint256) {\\n uint256 floatingAssets = market.floatingAssets();\\n uint256 floatingDebt = market.floatingDebt();\\n return\\n floatingRate(\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed())\\n );\\n }\\n\\n /// @dev Deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function fixedBorrowRate(\\n uint256 maturity,\\n uint256 amount,\\n uint256 borrowed,\\n uint256 supplied,\\n uint256\\n ) external view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n uint256 floatingAssets = previewFloatingAssetsAverage(maturity);\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n uint256 newBorrowed = borrowed + amount;\\n uint256 backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, supplied), newBorrowed);\\n\\n return\\n fixedRate(\\n maturity,\\n market.maxFuturePools(),\\n fixedUtilization(supplied, newBorrowed, floatingAssets),\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed() + backupDebtAddition)\\n ).mulDivDown(maturity - block.timestamp, 365 days);\\n }\\n\\n /// @dev deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function minFixedRate(uint256, uint256, uint256) external view returns (uint256 rate, uint256 utilization) {\\n uint256 floatingAssets = market.floatingAssetsAverage();\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n utilization = globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed());\\n rate = baseRate(floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0, utilization);\\n }\\n\\n function previewFloatingAssetsAverage(uint256 maturity) internal view returns (uint256) {\\n FixedLib.Pool memory pool;\\n (pool.borrowed, pool.supplied, pool.unassignedEarnings, pool.lastAccrual) = market.fixedPools(maturity);\\n uint256 memFloatingAssets = market.floatingAssets() +\\n pool.unassignedEarnings.mulDivDown(block.timestamp - pool.lastAccrual, maturity - pool.lastAccrual);\\n uint256 memFloatingAssetsAverage = market.floatingAssetsAverage();\\n uint256 averageFactor = (1e18 -\\n (\\n -int256(\\n memFloatingAssets < memFloatingAssetsAverage\\n ? market.dampSpeedDown()\\n : market.dampSpeedUp() * (block.timestamp - market.lastAverageUpdate())\\n )\\n ).expWad()).toUint256();\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n function globalUtilization(\\n uint256 floatingAssets,\\n uint256 floatingDebt,\\n uint256 backupBorrowed\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 ? (floatingDebt + backupBorrowed).divWadUp(floatingAssets) : 0;\\n }\\n\\n function fixedUtilization(\\n uint256 supplied,\\n uint256 borrowed,\\n uint256 floatingAssets\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(floatingAssets) : 0;\\n }\\n}\\n\\nerror AlreadyMatured();\\nerror UtilizationExceeded();\\n\\nstruct Parameters {\\n uint256 minRate;\\n uint256 naturalRate;\\n uint256 maxUtilization;\\n uint256 naturalUtilization;\\n uint256 growthSpeed;\\n uint256 sigmoidSpeed;\\n uint256 spreadFactor;\\n uint256 maturitySpeed;\\n int256 timePreference;\\n uint256 fixedAllocation;\\n uint256 maxRate;\\n}\\n\\nstruct FixedVars {\\n uint256 sqFNatPools;\\n uint256 fNatPools;\\n uint256 fixedFactor;\\n int256 natPools;\\n uint256 maturityFactor;\\n}\\n\",\"keccak256\":\"0x21b3897afb0da4e23559f3122f2292deb79516d8850a4995ece47b8c4d278004\",\"license\":\"BUSL-1.1\"},\"contracts/Market.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { PausableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\\\";\\nimport { ERC4626, ERC20, SafeTransferLib } from \\\"solmate/src/mixins/ERC4626.sol\\\";\\nimport { InterestRateModel } from \\\"./InterestRateModel.sol\\\";\\nimport { RewardsController } from \\\"./RewardsController.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Auditor } from \\\"./Auditor.sol\\\";\\n\\ncontract Market is Initializable, AccessControlUpgradeable, PausableUpgradeable, ERC4626 {\\n using FixedPointMathLib for int256;\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint128;\\n using SafeTransferLib for ERC20;\\n using FixedLib for FixedLib.Pool;\\n using FixedLib for FixedLib.Position;\\n using FixedLib for uint256;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant EMERGENCY_ADMIN_ROLE = keccak256(\\\"EMERGENCY_ADMIN_ROLE\\\");\\n\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n Auditor public immutable auditor;\\n\\n /// @notice Tracks account's fixed deposit positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedDepositPositions;\\n /// @notice Tracks account's fixed borrow positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedBorrowPositions;\\n /// @notice Tracks fixed pools state by maturity.\\n mapping(uint256 => FixedLib.Pool) public fixedPools;\\n\\n /// @notice Tracks fixed deposit and borrow map and floating borrow shares of an account.\\n mapping(address => Account) public accounts;\\n\\n /// @notice Amount of assets lent by the floating pool to the fixed pools.\\n uint256 public floatingBackupBorrowed;\\n /// @notice Amount of assets lent by the floating pool to accounts.\\n uint256 public floatingDebt;\\n\\n /// @notice Accumulated earnings from extraordinary sources to be gradually distributed.\\n uint256 public earningsAccumulator;\\n /// @notice Rate per second to be charged to delayed fixed pools borrowers after maturity.\\n uint256 public penaltyRate;\\n /// @notice Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\\n uint256 public backupFeeRate;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\\n uint256 public dampSpeedUp;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\\n uint256 public dampSpeedDown;\\n\\n /// @notice Number of fixed pools to be active at the same time.\\n uint8 public maxFuturePools;\\n /// @notice Last time the accumulator distributed earnings.\\n uint32 public lastAccumulatorAccrual;\\n /// @notice Last time the floating debt was updated.\\n uint32 public lastFloatingDebtUpdate;\\n /// @notice Last time the floating assets average was updated.\\n uint32 public lastAverageUpdate;\\n\\n /// @notice Interest rate model contract used to get the borrow rates.\\n InterestRateModel public interestRateModel;\\n\\n /// @notice Factor used for gradual accrual of earnings to the floating pool.\\n uint128 public earningsAccumulatorSmoothFactor;\\n /// @notice Percentage factor that represents the liquidity reserves that can't be borrowed.\\n uint128 public reserveFactor;\\n\\n /// @notice Amount of floating assets deposited to the pool.\\n uint256 public floatingAssets;\\n /// @notice Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\\n uint256 public floatingAssetsAverage;\\n\\n /// @notice Total amount of floating borrow shares assigned to floating borrow accounts.\\n uint256 public totalFloatingBorrowShares;\\n\\n /// @dev gap from deprecated state.\\n /// @custom:oz-renamed-from floatingUtilization\\n uint256 private __gap;\\n\\n /// @notice Address of the treasury that will receive the allocated earnings.\\n address public treasury;\\n /// @notice Rate to be charged by the treasury to floating and fixed borrows.\\n uint256 public treasuryFeeRate;\\n\\n /// @notice Address of the rewards controller that will accrue rewards for accounts operating with the Market.\\n RewardsController public rewardsController;\\n\\n /// @notice Flag to prevent new borrows and deposits.\\n bool public isFrozen;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(ERC20 asset_, Auditor auditor_) ERC4626(asset_, \\\"\\\", \\\"\\\") {\\n auditor = auditor_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(\\n string calldata assetSymbol,\\n uint8 maxFuturePools_,\\n uint128 earningsAccumulatorSmoothFactor_,\\n InterestRateModel interestRateModel_,\\n uint256 penaltyRate_,\\n uint256 backupFeeRate_,\\n uint128 reserveFactor_,\\n uint256 dampSpeedUp_,\\n uint256 dampSpeedDown_\\n ) external initializer {\\n __AccessControl_init();\\n __Pausable_init();\\n\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n lastAverageUpdate = uint32(block.timestamp);\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setAssetSymbol(assetSymbol);\\n setMaxFuturePools(maxFuturePools_);\\n setEarningsAccumulatorSmoothFactor(earningsAccumulatorSmoothFactor_);\\n setInterestRateModel(interestRateModel_);\\n setPenaltyRate(penaltyRate_);\\n setBackupFeeRate(backupFeeRate_);\\n setReserveFactor(reserveFactor_);\\n setDampSpeed(dampSpeedUp_, dampSpeedDown_);\\n }\\n\\n /// @notice Borrows a certain amount from the floating pool.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return borrowShares shares corresponding to the borrowed assets.\\n function borrow(\\n uint256 assets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 borrowShares) {\\n if (assets == 0) revert ZeroBorrow();\\n spendAllowance(borrower, assets);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n\\n borrowShares = previewBorrow(assets);\\n\\n uint256 newFloatingDebt = floatingDebt + assets;\\n floatingDebt = newFloatingDebt;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed, also considering the reserves\\n if (floatingBackupBorrowed + newFloatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n\\n totalFloatingBorrowShares += borrowShares;\\n accounts[borrower].floatingBorrowShares += borrowShares;\\n\\n emit Borrow(msg.sender, receiver, borrower, assets, borrowShares);\\n emitMarketUpdate();\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Repays a certain amount of assets to the floating pool.\\n /// @param assets assets to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepay the actual amount that should be transferred into the protocol.\\n /// @return borrowShares subtracted shares from the borrower's accountability.\\n function repay(\\n uint256 assets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepay, uint256 borrowShares) {\\n (actualRepay, borrowShares) = noTransferRefund(previewRepay(assets), borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), actualRepay);\\n }\\n\\n /// @notice Repays a certain amount of shares to the floating pool.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return assets subtracted assets from the borrower's accountability.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function refund(\\n uint256 borrowShares,\\n address borrower\\n ) external whenNotPaused returns (uint256 assets, uint256 actualShares) {\\n (assets, actualShares) = noTransferRefund(borrowShares, borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Allows to (partially) repay a floating borrow. It does not transfer assets.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower the address of the account that has the debt.\\n /// @return assets the actual amount that should be transferred into the protocol.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function noTransferRefund(\\n uint256 borrowShares,\\n address borrower\\n ) internal returns (uint256 assets, uint256 actualShares) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n Account storage account = accounts[borrower];\\n uint256 accountBorrowShares = account.floatingBorrowShares;\\n actualShares = Math.min(borrowShares, accountBorrowShares);\\n assets = previewRefund(actualShares);\\n\\n if (assets == 0) revert ZeroRepay();\\n\\n floatingDebt -= assets;\\n account.floatingBorrowShares = accountBorrowShares - actualShares;\\n totalFloatingBorrowShares -= actualShares;\\n\\n emit Repay(msg.sender, borrower, assets, actualShares);\\n }\\n\\n /// @notice Deposits a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be deposited.\\n /// @param assets amount to receive from the msg.sender.\\n /// @param minAssetsRequired minimum amount of assets required by the depositor for the transaction to be accepted.\\n /// @param receiver address that will be able to withdraw the deposited assets.\\n /// @return positionAssets total amount of assets (principal + fee) to be withdrawn at maturity.\\n function depositAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 minAssetsRequired,\\n address receiver\\n ) external whenNotPaused whenNotFrozen returns (uint256 positionAssets) {\\n if (assets == 0) revert ZeroDeposit();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n depositToTreasury(updateFloatingDebt());\\n floatingAssets += backupEarnings;\\n\\n (uint256 fee, uint256 backupFee) = pool.calculateDeposit(assets, backupFeeRate);\\n positionAssets = assets + fee;\\n if (positionAssets < minAssetsRequired) revert Disagreement();\\n\\n floatingBackupBorrowed -= pool.deposit(assets);\\n pool.unassignedEarnings -= fee + backupFee;\\n earningsAccumulator += backupFee;\\n\\n // update account's position\\n FixedLib.Position storage position = fixedDepositPositions[maturity][receiver];\\n\\n // if account doesn't have a current position, add it to the list\\n if (position.principal == 0) {\\n Account storage account = accounts[receiver];\\n account.fixedDeposits = account.fixedDeposits.setMaturity(maturity);\\n }\\n\\n position.principal += assets;\\n position.fee += fee;\\n\\n emit DepositAtMaturity(maturity, msg.sender, receiver, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Borrows a certain amount from a maturity.\\n /// @param maturity maturity date for repayment.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return assetsOwed total amount of assets (principal + fee) to be repaid at maturity.\\n function borrowAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 maxAssets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 assetsOwed) {\\n if (assets == 0) revert ZeroBorrow();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n depositToTreasury(updateFloatingDebt());\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n {\\n uint256 backupDebtAddition = pool.borrow(assets);\\n if (backupDebtAddition != 0) {\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed + backupDebtAddition;\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n }\\n uint256 fee;\\n {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, floatingBackupBorrowed)\\n );\\n fee = assets.mulWadUp(fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n }\\n assetsOwed = assets + fee;\\n\\n // validate that the account is not taking arbitrary fees\\n if (assetsOwed > maxAssets) revert Disagreement();\\n\\n spendAllowance(borrower, assetsOwed);\\n\\n {\\n // if account doesn't have a current position, add it to the list\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n if (position.principal == 0) {\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.setMaturity(maturity);\\n }\\n\\n // calculate what portion of the fees are to be accrued and what portion goes to earnings accumulator\\n (uint256 newUnassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(fee),\\n assets\\n );\\n if (newUnassignedEarnings != 0) pool.unassignedEarnings += newUnassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n fixedBorrowPositions[maturity][borrower] = FixedLib.Position(position.principal + assets, position.fee + fee);\\n }\\n\\n emit BorrowAtMaturity(maturity, msg.sender, receiver, borrower, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Withdraws a certain amount from a maturity.\\n /// @param maturity maturity date where the assets will be withdrawn.\\n /// @param positionAssets position size to be reduced.\\n /// @param minAssetsRequired minimum amount required by the account (if discount included for early withdrawal).\\n /// @param receiver address that will receive the withdrawn assets.\\n /// @param owner address that previously deposited the assets.\\n /// @return assetsDiscounted amount of assets withdrawn (can include a discount for early withdraw).\\n function withdrawAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 minAssetsRequired,\\n address receiver,\\n address owner\\n ) external whenNotPaused returns (uint256 assetsDiscounted) {\\n if (positionAssets == 0) revert ZeroWithdraw();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n depositToTreasury(updateFloatingDebt());\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n FixedLib.Position memory position = fixedDepositPositions[maturity][owner];\\n\\n if (positionAssets > position.principal + position.fee) positionAssets = position.principal + position.fee;\\n\\n {\\n // remove the supply from the fixed rate pool\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed +\\n pool.withdraw(\\n FixedLib.Position(position.principal, position.fee).scaleProportionally(positionAssets).principal\\n );\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets) revert InsufficientProtocolLiquidity();\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n\\n // verify if there are any penalties/fee for the account because of early withdrawal, if so discount\\n if (block.timestamp < maturity) {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingBackupBorrowed = floatingBackupBorrowed;\\n\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, memFloatingBackupBorrowed)\\n );\\n assetsDiscounted = positionAssets.divWadDown(1e18 + fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n } else {\\n assetsDiscounted = positionAssets;\\n }\\n\\n if (assetsDiscounted < minAssetsRequired) revert Disagreement();\\n\\n spendAllowance(owner, assetsDiscounted);\\n\\n // all the fees go to unassigned or to the floating pool\\n (uint256 unassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(positionAssets - assetsDiscounted),\\n assetsDiscounted\\n );\\n pool.unassignedEarnings += unassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n // the account gets discounted the full amount\\n position.reduceProportionally(positionAssets);\\n if (position.principal | position.fee == 0) {\\n delete fixedDepositPositions[maturity][owner];\\n Account storage account = accounts[owner];\\n account.fixedDeposits = account.fixedDeposits.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedDepositPositions[maturity][owner] = position;\\n }\\n\\n emit WithdrawAtMaturity(maturity, msg.sender, receiver, owner, positionAssets, assetsDiscounted);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransfer(receiver, assetsDiscounted);\\n }\\n\\n /// @notice Repays a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be repaid.\\n /// @param positionAssets amount to be paid for the borrower's debt.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepayAssets the actual amount that was transferred into the protocol.\\n function repayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepayAssets) {\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n actualRepayAssets = noTransferRepayAtMaturity(maturity, positionAssets, maxAssets, borrower, true);\\n emitMarketUpdate();\\n\\n asset.safeTransferFrom(msg.sender, address(this), actualRepayAssets);\\n }\\n\\n /// @notice Allows to (partially) repay a fixed rate position. It does not transfer assets.\\n /// @param maturity the maturity to access the pool.\\n /// @param positionAssets the amount of debt of the pool that should be paid.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower the address of the account that has the debt.\\n /// @param canDiscount should early repay discounts be applied.\\n /// @return actualRepayAssets the actual amount that should be transferred into the protocol.\\n function noTransferRepayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower,\\n bool canDiscount\\n ) internal returns (uint256 actualRepayAssets) {\\n if (positionAssets == 0) revert ZeroRepay();\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n depositToTreasury(updateFloatingDebt());\\n floatingAssets += backupEarnings;\\n\\n FixedLib.Position memory position = fixedBorrowPositions[maturity][borrower];\\n\\n uint256 debtCovered = Math.min(positionAssets, position.principal + position.fee);\\n\\n uint256 principalCovered = FixedLib\\n .Position(position.principal, position.fee)\\n .scaleProportionally(debtCovered)\\n .principal;\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n // early repayment allows a discount from the unassigned earnings\\n if (block.timestamp < maturity) {\\n // calculate the deposit fee considering the amount of debt the account'll pay\\n (uint256 discountFee, uint256 backupFee) = pool.calculateDeposit(principalCovered, backupFeeRate);\\n\\n // remove the fee from unassigned earnings\\n pool.unassignedEarnings -= discountFee + backupFee;\\n if (canDiscount) {\\n // the fee charged to the fixed pool supplier goes to the earnings accumulator\\n earningsAccumulator += backupFee;\\n\\n // the fee gets discounted from the account through `actualRepayAssets`\\n actualRepayAssets = debtCovered - discountFee;\\n } else {\\n // all fees go to the earnings accumulator\\n earningsAccumulator += discountFee + backupFee;\\n\\n // there is no discount due to liquidation\\n actualRepayAssets = debtCovered;\\n }\\n } else {\\n actualRepayAssets = debtCovered + debtCovered.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n\\n // all penalties go to the earnings accumulator\\n earningsAccumulator += actualRepayAssets - debtCovered;\\n }\\n\\n // verify that the account agrees to this discount or penalty\\n if (actualRepayAssets > maxAssets) revert Disagreement();\\n\\n // reduce the borrowed from the pool and might decrease the floating backup borrowed\\n floatingBackupBorrowed -= pool.repay(principalCovered);\\n\\n // update the account position\\n position.reduceProportionally(debtCovered);\\n if (position.principal | position.fee == 0) {\\n delete fixedBorrowPositions[maturity][borrower];\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedBorrowPositions[maturity][borrower] = position;\\n }\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, actualRepayAssets, debtCovered);\\n emitFixedEarningsUpdate(maturity);\\n }\\n\\n /// @notice Liquidates undercollateralized fixed/floating (or both) position(s).\\n /// @dev Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool,\\n /// or/and for multiple fixed pools, seizing a portion of borrower's collateral.\\n /// @param borrower account that has an outstanding debt across floating or fixed pools.\\n /// @param maxAssets maximum amount of debt that the liquidator is willing to accept. (it can be less)\\n /// @param seizeMarket market from which the collateral will be seized to give to the liquidator.\\n /// @return repaidAssets actual amount repaid.\\n function liquidate(\\n address borrower,\\n uint256 maxAssets,\\n Market seizeMarket\\n ) external whenNotPaused returns (uint256 repaidAssets) {\\n if (msg.sender == borrower) revert SelfLiquidation();\\n floatingAssets += accrueAccumulatedEarnings();\\n\\n maxAssets = auditor.checkLiquidation(this, seizeMarket, borrower, maxAssets);\\n if (maxAssets == 0) revert ZeroRepay();\\n\\n Account storage account = accounts[borrower];\\n\\n {\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0 && maxAssets != 0) {\\n if (packedMaturities & 1 != 0) {\\n uint256 actualRepay;\\n if (block.timestamp < maturity) {\\n actualRepay = noTransferRepayAtMaturity(maturity, maxAssets, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n } else {\\n uint256 position;\\n {\\n FixedLib.Position storage p = fixedBorrowPositions[maturity][borrower];\\n position = p.principal + p.fee;\\n }\\n uint256 debt = position + position.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n actualRepay = debt > maxAssets ? maxAssets.mulDivDown(position, debt) : maxAssets;\\n\\n if (actualRepay == 0) maxAssets = 0;\\n else {\\n actualRepay = noTransferRepayAtMaturity(maturity, actualRepay, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n }\\n }\\n repaidAssets += actualRepay;\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n\\n if (maxAssets != 0 && account.floatingBorrowShares != 0) {\\n uint256 borrowShares = previewRepay(maxAssets);\\n if (borrowShares != 0) {\\n (uint256 actualRepayAssets, ) = noTransferRefund(borrowShares, borrower);\\n repaidAssets += actualRepayAssets;\\n }\\n }\\n\\n // reverts on failure\\n (uint256 lendersAssets, uint256 seizeAssets) = auditor.calculateSeize(this, seizeMarket, borrower, repaidAssets);\\n earningsAccumulator += lendersAssets;\\n\\n asset.safeTransferFrom(msg.sender, address(this), repaidAssets + lendersAssets);\\n\\n if (address(seizeMarket) == address(this)) {\\n internalSeize(this, msg.sender, borrower, seizeAssets);\\n } else {\\n seizeMarket.seize(msg.sender, borrower, seizeAssets);\\n\\n emitMarketUpdate();\\n }\\n\\n emit Liquidate(msg.sender, borrower, repaidAssets, lendersAssets, seizeMarket, seizeAssets);\\n\\n auditor.handleBadDebt(borrower);\\n }\\n\\n /// @notice Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\\n /// @dev Can only be called from the auditor.\\n /// @param borrower account with insufficient collateral to be cleared the debt.\\n function clearBadDebt(address borrower) external {\\n if (msg.sender != address(auditor)) revert NotAuditor();\\n\\n floatingAssets += accrueAccumulatedEarnings();\\n Account storage account = accounts[borrower];\\n uint256 accumulator = earningsAccumulator;\\n uint256 totalBadDebt = 0;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 badDebt = position.principal + position.fee;\\n if (accumulator >= badDebt) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n accumulator -= badDebt;\\n totalBadDebt += badDebt;\\n uint256 backupDebtReduction = fixedPools[maturity].repay(position.principal);\\n\\n if (backupDebtReduction != 0) {\\n floatingBackupBorrowed -= backupDebtReduction;\\n uint256 yield = fixedPools[maturity].unassignedEarnings.mulDivDown(\\n Math.min(position.principal, backupDebtReduction),\\n backupDebtReduction\\n );\\n fixedPools[maturity].unassignedEarnings -= yield;\\n earningsAccumulator += yield;\\n accumulator += yield;\\n }\\n\\n delete fixedBorrowPositions[maturity][borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, badDebt, badDebt);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n if (account.floatingBorrowShares != 0 && (accumulator = previewRepay(accumulator)) != 0) {\\n (uint256 badDebt, ) = noTransferRefund(accumulator, borrower);\\n totalBadDebt += badDebt;\\n }\\n if (totalBadDebt != 0) {\\n earningsAccumulator -= totalBadDebt;\\n emit SpreadBadDebt(borrower, totalBadDebt);\\n }\\n emitMarketUpdate();\\n }\\n\\n /// @notice Public function to seize a certain amount of assets.\\n /// @dev Public function for liquidator to seize borrowers assets in the floating pool.\\n /// This function will only be called from another Market, on `liquidation` calls.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function seize(address liquidator, address borrower, uint256 assets) external whenNotPaused {\\n internalSeize(Market(msg.sender), liquidator, borrower, assets);\\n }\\n\\n /// @notice Internal function to seize a certain amount of assets.\\n /// @dev Internal function for liquidator to seize borrowers assets in the floating pool.\\n /// Will only be called from this Market on `liquidation` or through `seize` calls from another Market.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param seizeMarket address which is calling the seize function (see `seize` public function).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function internalSeize(Market seizeMarket, address liquidator, address borrower, uint256 assets) internal {\\n if (assets == 0) revert ZeroWithdraw();\\n\\n // reverts on failure\\n auditor.checkSeize(seizeMarket, this);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(borrower);\\n uint256 shares = previewWithdraw(assets);\\n beforeWithdraw(assets, shares);\\n _burn(borrower, shares);\\n emit Withdraw(msg.sender, liquidator, borrower, assets, shares);\\n emit Seize(liquidator, borrower, assets);\\n emitMarketUpdate();\\n\\n asset.safeTransfer(liquidator, assets);\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be withdrawn from the floating pool.\\n function beforeWithdraw(uint256 assets, uint256) internal override whenNotPaused {\\n updateFloatingAssetsAverage();\\n depositToTreasury(updateFloatingDebt());\\n uint256 earnings = accrueAccumulatedEarnings();\\n uint256 newFloatingAssets = floatingAssets + earnings - assets;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed\\n if (floatingBackupBorrowed + floatingDebt > newFloatingAssets) revert InsufficientProtocolLiquidity();\\n floatingAssets = newFloatingAssets;\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be deposited to the floating pool.\\n function afterDeposit(uint256 assets, uint256) internal override whenNotPaused whenNotFrozen {\\n updateFloatingAssetsAverage();\\n uint256 treasuryFee = updateFloatingDebt();\\n uint256 earnings = accrueAccumulatedEarnings();\\n floatingAssets += earnings + assets;\\n depositToTreasury(treasuryFee);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Withdraws the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param assets amount of underlying to be withdrawn.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return shares amount of shares redeemed for underlying asset.\\n function withdraw(uint256 assets, address receiver, address owner) public override returns (uint256 shares) {\\n auditor.checkShortfall(this, owner, assets);\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n shares = super.withdraw(assets, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Redeems the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param shares amount of shares to be redeemed for underlying asset.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return assets amount of underlying asset that was withdrawn.\\n function redeem(uint256 shares, address receiver, address owner) public override returns (uint256 assets) {\\n auditor.checkShortfall(this, owner, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n assets = super.redeem(shares, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n function _mint(address to, uint256 amount) internal override {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(to);\\n super._mint(to, amount);\\n }\\n\\n /// @notice Moves amount of shares from the caller's account to `to`.\\n /// @dev Makes sure that the caller doesn't have shortfall after transferring.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transfer(address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, msg.sender, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(msg.sender);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transfer(to, shares);\\n }\\n\\n /// @notice Moves amount of shares from `from` to `to` using the allowance mechanism.\\n /// @dev Makes sure that `from` address doesn't have shortfall after transferring.\\n /// @param from address from which the assets will be transferred.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transferFrom(address from, address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, from, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(from);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transferFrom(from, to, shares);\\n }\\n\\n /// @notice Gets current snapshot for an account across all maturities.\\n /// @param account account to return status snapshot in the specified maturity date.\\n /// @return the amount deposited to the floating pool and the amount owed to floating and fixed pools.\\n function accountSnapshot(address account) external view returns (uint256, uint256) {\\n return (convertToAssets(balanceOf[account]), previewDebt(account));\\n }\\n\\n /// @notice Gets all borrows and penalties for an account.\\n /// @param borrower account to return status snapshot for fixed and floating borrows.\\n /// @return debt the total debt, denominated in number of assets.\\n function previewDebt(address borrower) public view returns (uint256 debt) {\\n Account storage account = accounts[borrower];\\n uint256 memPenaltyRate = penaltyRate;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n // calculate all maturities using the base maturity and the following bits representing the following intervals\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 positionAssets = position.principal + position.fee;\\n\\n debt += positionAssets;\\n\\n if (block.timestamp > maturity) {\\n debt += positionAssets.mulWadDown((block.timestamp - maturity) * memPenaltyRate);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n // calculate floating borrowed debt\\n uint256 shares = account.floatingBorrowShares;\\n if (shares != 0) debt += previewRefund(shares);\\n }\\n\\n /// @notice Charges treasury fee to certain amount of earnings.\\n /// @param earnings amount of earnings.\\n /// @return earnings minus the fees charged by the treasury.\\n function chargeTreasuryFee(uint256 earnings) internal returns (uint256) {\\n uint256 fee = earnings.mulWadDown(treasuryFeeRate);\\n depositToTreasury(fee);\\n return earnings - fee;\\n }\\n\\n /// @notice Collects all earnings that are charged to borrowers that make use of fixed pool deposits' assets.\\n /// @param earnings amount of earnings.\\n function collectFreeLunch(uint256 earnings) internal {\\n if (earnings == 0) return;\\n\\n if (treasuryFeeRate != 0) {\\n depositToTreasury(earnings);\\n } else {\\n earningsAccumulator += earnings;\\n }\\n }\\n\\n /// @notice Deposits amount of assets on behalf of the treasury address.\\n /// @param fee amount of assets to be deposited.\\n function depositToTreasury(uint256 fee) internal {\\n if (fee != 0) {\\n _mint(treasury, previewDeposit(fee));\\n floatingAssets += fee;\\n }\\n }\\n\\n /// @notice Calculates the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings to be distributed from the accumulator.\\n function accumulatedEarnings() internal view returns (uint256 earnings) {\\n uint256 elapsed = block.timestamp - lastAccumulatorAccrual;\\n if (elapsed == 0) return 0;\\n return\\n earningsAccumulator.mulDivDown(\\n elapsed,\\n elapsed + earningsAccumulatorSmoothFactor.mulWadDown(maxFuturePools * FixedLib.INTERVAL)\\n );\\n }\\n\\n /// @notice Accrues the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings distributed from the accumulator.\\n function accrueAccumulatedEarnings() internal returns (uint256 earnings) {\\n earnings = accumulatedEarnings();\\n\\n earningsAccumulator -= earnings;\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n emit AccumulatorAccrual(block.timestamp);\\n }\\n\\n /// @notice Updates the `floatingAssetsAverage`.\\n function updateFloatingAssetsAverage() internal {\\n floatingAssetsAverage = previewFloatingAssetsAverage();\\n lastAverageUpdate = uint32(block.timestamp);\\n }\\n\\n /// @notice Returns the current `floatingAssetsAverage` without updating the storage variable.\\n /// @return projected `floatingAssetsAverage`.\\n function previewFloatingAssetsAverage() public view returns (uint256) {\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 memFloatingAssetsAverage = floatingAssetsAverage;\\n uint256 dampSpeedFactor = memFloatingAssets < memFloatingAssetsAverage ? dampSpeedDown : dampSpeedUp;\\n uint256 averageFactor = uint256(1e18 - (-int256(dampSpeedFactor * (block.timestamp - lastAverageUpdate))).expWad());\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n /// @notice Updates the floating pool borrows' variables.\\n /// @return treasuryFee amount of fees charged by the treasury to the new calculated floating debt.\\n function updateFloatingDebt() internal returns (uint256 treasuryFee) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 utilization = floatingUtilization(memFloatingAssets, memFloatingDebt);\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(utilization, globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed))\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n\\n memFloatingDebt += newDebt;\\n treasuryFee = newDebt.mulWadDown(treasuryFeeRate);\\n floatingAssets = memFloatingAssets + newDebt - treasuryFee;\\n floatingDebt = memFloatingDebt;\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n emit FloatingDebtUpdate(block.timestamp, utilization);\\n }\\n\\n /// @notice Calculates the total floating debt, considering elapsed time since last update and current interest rate.\\n /// @return actual floating debt plus projected interest.\\n function totalFloatingBorrowAssets() public view returns (uint256) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(\\n floatingUtilization(memFloatingAssets, memFloatingDebt),\\n globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed)\\n )\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n return memFloatingDebt + newDebt;\\n }\\n\\n /// @notice Calculates the floating pool balance plus earnings to be accrued at current timestamp\\n /// from maturities and accumulator.\\n /// @return actual floatingAssets plus earnings to be accrued at current timestamp.\\n function totalAssets() public view override returns (uint256) {\\n unchecked {\\n uint256 backupEarnings = 0;\\n\\n uint256 latestMaturity = block.timestamp - (block.timestamp % FixedLib.INTERVAL);\\n uint256 maxMaturity = latestMaturity + maxFuturePools * FixedLib.INTERVAL;\\n\\n for (uint256 maturity = latestMaturity; maturity <= maxMaturity; maturity += FixedLib.INTERVAL) {\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (maturity > lastAccrual) {\\n backupEarnings += block.timestamp < maturity\\n ? pool.unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual)\\n : pool.unassignedEarnings;\\n }\\n }\\n\\n return\\n floatingAssets +\\n backupEarnings +\\n accumulatedEarnings() +\\n (totalFloatingBorrowAssets() - floatingDebt).mulWadDown(1e18 - treasuryFeeRate);\\n }\\n }\\n\\n /// @notice Simulates the effects of a borrow at the current time, given current contract conditions.\\n /// @param assets amount of assets to borrow.\\n /// @return amount of shares that will be asigned to the account after the borrow.\\n function previewBorrow(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a repay at the current time, given current contract conditions.\\n /// @param assets amount of assets to repay.\\n /// @return amount of shares that will be subtracted from the account after the repay.\\n function previewRepay(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a refund at the current time, given current contract conditions.\\n /// @param shares amount of shares to subtract from caller's accountability.\\n /// @return amount of assets that will be repaid.\\n function previewRefund(uint256 shares) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalFloatingBorrowAssets(), supply);\\n }\\n\\n /// @notice Checks msg.sender's allowance over account's assets.\\n /// @param account account in which the allowance will be checked.\\n /// @param assets assets from account that msg.sender wants to operate on.\\n function spendAllowance(address account, uint256 assets) internal {\\n if (msg.sender != account) {\\n uint256 allowed = allowance[account][msg.sender]; // saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[account][msg.sender] = allowed - previewWithdraw(assets);\\n }\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed amount of the fixed pool.\\n function fixedPoolBorrowed(uint256 maturity) external view returns (uint256) {\\n return fixedPools[maturity].borrowed;\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed and supplied amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed and supplied amount of the fixed pool.\\n function fixedPoolBalance(uint256 maturity) external view returns (uint256, uint256) {\\n return (fixedPools[maturity].borrowed, fixedPools[maturity].supplied);\\n }\\n\\n /// @notice Retrieves fixed utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function fixedUtilization(uint256 supplied, uint256 borrowed, uint256 assets) internal pure returns (uint256) {\\n return assets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves global utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function globalUtilization(uint256 assets, uint256 debt, uint256 backupBorrowed) internal pure returns (uint256) {\\n return assets != 0 ? (debt + backupBorrowed).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves floating utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function floatingUtilization(uint256 assets, uint256 debt) internal pure returns (uint256) {\\n return assets != 0 ? debt.divWadUp(assets) : 0;\\n }\\n\\n /// @notice Emits MarketUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitMarketUpdate() internal {\\n emit MarketUpdate(\\n block.timestamp,\\n totalSupply,\\n floatingAssets,\\n totalFloatingBorrowShares,\\n floatingDebt,\\n earningsAccumulator\\n );\\n }\\n\\n /// @notice Emits FixedEarningsUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitFixedEarningsUpdate(uint256 maturity) internal {\\n emit FixedEarningsUpdate(block.timestamp, maturity, fixedPools[maturity].unassignedEarnings);\\n }\\n\\n /// @notice Sets name and symbol for the Market.\\n /// @param assetSymbol the symbol for the underlying asset.\\n function setAssetSymbol(string calldata assetSymbol) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n name = string.concat(\\\"exactly \\\", assetSymbol);\\n symbol = string.concat(\\\"exa\\\", assetSymbol);\\n }\\n\\n /// @notice Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially\\n /// providing liquidity.\\n /// @param backupFeeRate_ percentage amount represented with 18 decimals.\\n function setBackupFeeRate(uint256 backupFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n backupFeeRate = backupFeeRate_;\\n emit BackupFeeRateSet(backupFeeRate_);\\n }\\n\\n /// @notice Sets the damp speed used to update the floatingAssetsAverage.\\n /// @param up damp speed up, represented with 18 decimals.\\n /// @param down damp speed down, represented with 18 decimals.\\n function setDampSpeed(uint256 up, uint256 down) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n updateFloatingAssetsAverage();\\n dampSpeedUp = up;\\n dampSpeedDown = down;\\n emit DampSpeedSet(up, down);\\n }\\n\\n /// @notice Sets the factor used when smoothly accruing earnings to the floating pool.\\n /// @param earningsAccumulatorSmoothFactor_ represented with 18 decimals.\\n function setEarningsAccumulatorSmoothFactor(\\n uint128 earningsAccumulatorSmoothFactor_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n floatingAssets += accrueAccumulatedEarnings();\\n emitMarketUpdate();\\n earningsAccumulatorSmoothFactor = earningsAccumulatorSmoothFactor_;\\n emit EarningsAccumulatorSmoothFactorSet(earningsAccumulatorSmoothFactor_);\\n }\\n\\n /// @notice Sets the interest rate model to be used to calculate rates.\\n /// @param interestRateModel_ new interest rate model.\\n function setInterestRateModel(InterestRateModel interestRateModel_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(interestRateModel) != address(0)) depositToTreasury(updateFloatingDebt());\\n\\n interestRateModel = interestRateModel_;\\n emitMarketUpdate();\\n emit InterestRateModelSet(interestRateModel_);\\n }\\n\\n /// @notice Sets the rewards controller to update account rewards when operating with the Market.\\n /// @param rewardsController_ new rewards controller.\\n function setRewardsController(RewardsController rewardsController_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n rewardsController = rewardsController_;\\n emit RewardsControllerSet(rewardsController_);\\n }\\n\\n /// @notice Sets the protocol's max future pools for fixed borrowing and lending.\\n /// @dev If value is decreased, VALID maturities will become NOT_READY.\\n /// @param futurePools number of pools to be active at the same time.\\n function setMaxFuturePools(uint8 futurePools) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n maxFuturePools = futurePools;\\n emit MaxFuturePoolsSet(futurePools);\\n }\\n\\n /// @notice Sets the penalty rate per second.\\n /// @param penaltyRate_ percentage represented with 18 decimals.\\n function setPenaltyRate(uint256 penaltyRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n penaltyRate = penaltyRate_;\\n emit PenaltyRateSet(penaltyRate_);\\n }\\n\\n /// @notice Sets the percentage that represents the liquidity reserves that can't be borrowed.\\n /// @param reserveFactor_ parameter represented with 18 decimals.\\n function setReserveFactor(uint128 reserveFactor_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n reserveFactor = reserveFactor_;\\n emit ReserveFactorSet(reserveFactor_);\\n }\\n\\n /// @notice Sets the treasury variables.\\n /// @param treasury_ address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate_ represented with 18 decimals.\\n function setTreasury(address treasury_, uint256 treasuryFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n depositToTreasury(updateFloatingDebt());\\n treasury = treasury_;\\n treasuryFeeRate = treasuryFeeRate_;\\n emit TreasurySet(treasury_, treasuryFeeRate_);\\n }\\n\\n /// @notice Sets the pause state to true in case of emergency, triggered by an authorized account.\\n function pause() external onlyPausingRoles {\\n _pause();\\n }\\n\\n /// @notice Sets the pause state to false when threat is gone, triggered by an authorized account.\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @notice Sets `isFrozen` state, triggered by an authorized account.\\n function setFrozen(bool isFrozen_) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (isFrozen == isFrozen_) return;\\n isFrozen = isFrozen_;\\n emit Frozen(msg.sender, isFrozen_);\\n }\\n\\n /// @dev Throws if the market is frozen.\\n function requireNotFrozen() internal view {\\n if (isFrozen) revert MarketFrozen();\\n }\\n\\n /// @dev Modifier to make a function callable only when the market is not frozen.\\n modifier whenNotFrozen() {\\n requireNotFrozen();\\n _;\\n }\\n\\n /// @dev Throws if the caller is not an `EMERGENCY_ADMIN_ROLE` or `PAUSER_ROLE`.\\n function requirePausingRoles() internal view {\\n if (!hasRole(EMERGENCY_ADMIN_ROLE, msg.sender) && !hasRole(PAUSER_ROLE, msg.sender)) {\\n revert NotPausingRole();\\n }\\n }\\n\\n /// @dev Modifier to make a function callable only by pausing roles.\\n modifier onlyPausingRoles() {\\n requirePausingRoles();\\n _;\\n }\\n\\n /// @notice Event emitted when an account borrows amount of assets from a floating pool.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of assets that were borrowed.\\n /// @param shares amount of borrow shares assigned to the account.\\n event Borrow(\\n address indexed caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /// @notice Emitted when an account repays amount of assets to a floating pool.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of assets that was repaid.\\n /// @param shares amount of borrow shares that were subtracted from the account's accountability.\\n event Repay(address indexed caller, address indexed borrower, uint256 assets, uint256 shares);\\n\\n /// @notice Emitted when an account deposits an amount of an asset to a certain fixed rate pool,\\n /// collecting fees at the end of the period.\\n /// @param maturity maturity at which the account will be able to collect his deposit + his fee.\\n /// @param caller address which deposited the assets.\\n /// @param owner address that will be able to withdraw the deposited assets.\\n /// @param assets amount of the asset that were deposited.\\n /// @param fee is the extra amount that it will be collected at maturity.\\n event DepositAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed owner,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account withdraws from a fixed rate pool.\\n /// @param maturity maturity where the account withdraw its deposits.\\n /// @param caller address which withdraw the asset.\\n /// @param receiver address which will be collecting the assets.\\n /// @param owner address which had the assets withdrawn.\\n /// @param positionAssets position size reduced.\\n /// @param assets amount of assets withdrawn (can include a discount for early withdraw).\\n event WithdrawAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 positionAssets,\\n uint256 assets\\n );\\n\\n /// @notice Emitted when an account borrows amount of an asset from a certain maturity date.\\n /// @param maturity maturity in which the account will have to repay the loan.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of the asset that were borrowed.\\n /// @param fee extra amount that will need to be paid at maturity.\\n event BorrowAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account repays its borrows after maturity.\\n /// @param maturity maturity where the account repaid its borrowed amounts.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount that was repaid.\\n /// @param positionAssets amount of the debt that was covered in this repayment (penalties could have been repaid).\\n event RepayAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed borrower,\\n uint256 assets,\\n uint256 positionAssets\\n );\\n\\n /// @notice Emitted when an account's position had a liquidation.\\n /// @param receiver address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of the asset that were repaid.\\n /// @param lendersAssets incentive paid to lenders.\\n /// @param seizeMarket address of the asset that were seized by the liquidator.\\n /// @param seizedAssets amount seized of the collateral.\\n event Liquidate(\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 lendersAssets,\\n Market indexed seizeMarket,\\n uint256 seizedAssets\\n );\\n\\n /// @notice Emitted when an account's collateral has been seized.\\n /// @param liquidator address which seized this collateral.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount seized of the collateral.\\n event Seize(address indexed liquidator, address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when an account is cleared from bad debt.\\n /// @param borrower address which was cleared from bad debt.\\n /// @param assets amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\\n event SpreadBadDebt(address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when the backupFeeRate parameter is changed by admin.\\n /// @param backupFeeRate rate charged to the fixed pools to be accrued by the floating depositors.\\n event BackupFeeRateSet(uint256 backupFeeRate);\\n\\n /// @notice Emitted when the damp speeds are changed by admin.\\n /// @param dampSpeedUp represented with 18 decimals.\\n /// @param dampSpeedDown represented with 18 decimals.\\n event DampSpeedSet(uint256 dampSpeedUp, uint256 dampSpeedDown);\\n\\n /// @notice Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\\n /// @param earningsAccumulatorSmoothFactor factor represented with 18 decimals.\\n event EarningsAccumulatorSmoothFactorSet(uint256 earningsAccumulatorSmoothFactor);\\n\\n /// @notice Emitted when the interestRateModel is changed by admin.\\n /// @param interestRateModel new interest rate model to be used to calculate rates.\\n event InterestRateModelSet(InterestRateModel indexed interestRateModel);\\n\\n /// @notice Emitted when the maxFuturePools is changed by admin.\\n /// @param maxFuturePools represented with 0 decimals.\\n event MaxFuturePoolsSet(uint256 maxFuturePools);\\n\\n /// @notice Emitted when the penaltyRate is changed by admin.\\n /// @param penaltyRate penaltyRate percentage per second represented with 18 decimals.\\n event PenaltyRateSet(uint256 penaltyRate);\\n\\n /// @notice Emitted when the reserveFactor is changed by admin.\\n /// @param reserveFactor reserveFactor percentage.\\n event ReserveFactorSet(uint256 reserveFactor);\\n\\n /// @notice Emitted when the treasury variables are changed by admin.\\n /// @param treasury address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate represented with 18 decimals.\\n event TreasurySet(address indexed treasury, uint256 treasuryFeeRate);\\n\\n /// @notice Emitted when the rewardsController is changed by admin.\\n /// @param rewardsController new rewards controller to update account rewards when operating with the Market.\\n event RewardsControllerSet(RewardsController indexed rewardsController);\\n\\n /// @notice Emitted when market state is updated.\\n /// @param timestamp current timestamp.\\n /// @param floatingDepositShares total floating supply shares.\\n /// @param floatingAssets total floating supply assets.\\n /// @param floatingBorrowShares total floating borrow shares.\\n /// @param floatingDebt total floating borrow assets.\\n /// @param earningsAccumulator earnings accumulator.\\n event MarketUpdate(\\n uint256 timestamp,\\n uint256 floatingDepositShares,\\n uint256 floatingAssets,\\n uint256 floatingBorrowShares,\\n uint256 floatingDebt,\\n uint256 earningsAccumulator\\n );\\n\\n /// @notice Emitted when the earnings of a maturity are updated.\\n /// @param timestamp current timestamp.\\n /// @param maturity maturity date where the earnings were updated.\\n /// @param unassignedEarnings pending unassigned earnings.\\n event FixedEarningsUpdate(uint256 timestamp, uint256 indexed maturity, uint256 unassignedEarnings);\\n\\n /// @notice Emitted when accumulator distributes earnings.\\n /// @param timestamp current timestamp.\\n event AccumulatorAccrual(uint256 timestamp);\\n\\n /// @notice Emitted when the floating debt is updated.\\n /// @param timestamp current timestamp.\\n /// @param utilization new floating utilization.\\n event FloatingDebtUpdate(uint256 timestamp, uint256 utilization);\\n\\n /// @notice Emitted when `account` sets the `isFrozen` flag.\\n event Frozen(address indexed account, bool isFrozen);\\n\\n /// @notice Stores fixed deposits and fixed borrows map and floating borrow shares of an account.\\n /// @param fixedDeposits encoded map maturity dates where the account supplied to.\\n /// @param fixedBorrows encoded map maturity dates where the account borrowed from.\\n /// @param floatingBorrowShares number of floating borrow shares assigned to the account.\\n struct Account {\\n uint256 fixedDeposits;\\n uint256 fixedBorrows;\\n uint256 floatingBorrowShares;\\n }\\n}\\n\\nerror Disagreement();\\nerror InsufficientProtocolLiquidity();\\nerror MarketFrozen();\\nerror NotAuditor();\\nerror NotPausingRole();\\nerror SelfLiquidation();\\nerror ZeroBorrow();\\nerror ZeroDeposit();\\nerror ZeroRepay();\\nerror ZeroWithdraw();\\n\",\"keccak256\":\"0xea262e9a46d356f8626b4ea1d2bf9017e009b3d4f95809f5f33331b0236b3ce6\",\"license\":\"BUSL-1.1\"},\"contracts/RewardsController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { SafeTransferLib } from \\\"solmate/src/utils/SafeTransferLib.sol\\\";\\nimport { ERC20 } from \\\"solmate/src/tokens/ERC20.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract RewardsController is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint64;\\n using FixedPointMathLib for int256;\\n using SafeTransferLib for ERC20;\\n\\n /// @notice Max utilization supported by the sigmoid function not to cause a division by zero (1e18 = WAD).\\n uint256 public constant UTILIZATION_CAP = 1e18 - 1;\\n /// @notice Tracks the reward distribution data for a given market.\\n mapping(Market => Distribution) public distribution;\\n /// @notice Tracks enabled asset rewards.\\n mapping(ERC20 => bool) public rewardEnabled;\\n /// @notice Stores registered asset rewards.\\n ERC20[] public rewardList;\\n /// @notice Stores Markets with distributions set.\\n Market[] public marketList;\\n /// @notice Tracks the owner nonces for the claim permit.\\n mapping(address => uint256) public nonces;\\n /// @notice Temporarily stores the claim permit owner or `msg.sender` of the claim call.\\n address private _claimSender;\\n /// @notice Tracks the allowed `keeper` to claim on behalf of `account`.\\n mapping(address account => address keeper) public keepers;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev Can only be called once.\\n function initialize() external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded deposit.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleDeposit(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n ops[0] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n update(account, market, dist.availableRewards[r], ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded borrow.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleBorrow(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n (, , uint256 accountFloatingBorrowShares) = market.accounts(account);\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n ERC20 reward = dist.availableRewards[r];\\n ops[0] = AccountOperation({\\n operation: true,\\n balance: accountFloatingBorrowShares + accountFixedBorrowShares(market, account, dist.rewards[reward].start)\\n });\\n update(account, Market(msg.sender), reward, ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Claims `account` rewards for the given operations and reward assets.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param account The account to claim the rewards for.\\n /// @param rewardsList The list of rewards assets to claim.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claimOnBehalfOf(\\n MarketOperation[] memory marketOps,\\n address account,\\n ERC20[] memory rewardsList\\n ) external returns (ERC20[] memory, uint256[] memory) {\\n if (keepers[account] != msg.sender) revert NotKeeper();\\n return claim(marketOps, account, account, rewardsList);\\n }\\n\\n /// @notice Claims all `msg.sender` rewards to the given account.\\n /// @param to The address to send the rewards to.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claimAll(address to) external returns (ERC20[] memory rewardsList, uint256[] memory claimedAmounts) {\\n return claim(allMarketsOperations(), to, rewardList);\\n }\\n\\n /// @notice Claims `msg.sender` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param to The address to send the rewards to.\\n /// @param rewardsList The list of rewards assets to claim.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n address to,\\n ERC20[] memory rewardsList\\n ) public claimSender returns (ERC20[] memory, uint256[] memory) {\\n return claim(marketOps, _claimSender, to, rewardsList);\\n }\\n\\n function claim(\\n MarketOperation[] memory marketOps,\\n address account,\\n address to,\\n ERC20[] memory rewardsList\\n ) internal returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n claimedAmounts = new uint256[](rewardsList.length);\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n for (uint128 r = 0; r < dist.availableRewardsCount; ) {\\n update(\\n account,\\n marketOperation.market,\\n dist.availableRewards[r],\\n accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n account,\\n dist.rewards[dist.availableRewards[r]].start\\n )\\n );\\n unchecked {\\n ++r;\\n }\\n }\\n for (uint256 r = 0; r < rewardsList.length; ) {\\n RewardData storage rewardData = dist.rewards[rewardsList[r]];\\n for (uint256 o = 0; o < marketOperation.operations.length; ) {\\n uint256 rewardAmount = rewardData.accounts[account][marketOperation.operations[o]].accrued;\\n if (rewardAmount != 0) {\\n claimedAmounts[r] += rewardAmount;\\n rewardData.accounts[account][marketOperation.operations[o]].accrued = 0;\\n }\\n unchecked {\\n ++o;\\n }\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 r = 0; r < rewardsList.length; ) {\\n uint256 claimedAmount = claimedAmounts[r];\\n if (claimedAmount > 0) {\\n rewardsList[r].safeTransfer(to, claimedAmount);\\n emit Claim(account, rewardsList[r], to, claimedAmount);\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n return (rewardsList, claimedAmounts);\\n }\\n\\n /// @notice Claims `permit.owner` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param permit Arguments and signature from `permit.owner`.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n ClaimPermit calldata permit\\n ) external permitSender(permit) returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n return claim(marketOps, msg.sender, permit.assets);\\n }\\n\\n /// @notice Gets the configuration of a given distribution.\\n /// @param market The market to get the distribution configuration for.\\n /// @param reward The reward asset.\\n /// @return The distribution configuration.\\n function rewardConfig(Market market, ERC20 reward) external view returns (Config memory) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return\\n Config({\\n market: market,\\n reward: reward,\\n priceFeed: rewardData.priceFeed,\\n start: rewardData.start,\\n distributionPeriod: rewardData.end - rewardData.start,\\n targetDebt: rewardData.targetDebt,\\n totalDistribution: rewardData.totalDistribution,\\n undistributedFactor: rewardData.undistributedFactor,\\n flipSpeed: rewardData.flipSpeed,\\n compensationFactor: rewardData.compensationFactor,\\n transitionFactor: rewardData.transitionFactor,\\n borrowAllocationWeightFactor: rewardData.borrowAllocationWeightFactor,\\n depositAllocationWeightAddend: rewardData.depositAllocationWeightAddend,\\n depositAllocationWeightFactor: rewardData.depositAllocationWeightFactor\\n });\\n }\\n\\n /// @notice Gets the amount of reward assets that are being distributed for a Market.\\n /// @param market Market to get the number of available rewards to distribute.\\n /// @return The amount reward assets set to a Market.\\n function availableRewardsCount(Market market) external view returns (uint256) {\\n return distribution[market].availableRewardsCount;\\n }\\n\\n /// @notice Gets the account data of a given account, Market, operation and reward asset.\\n /// @param account The account to get the operation data from.\\n /// @param market The market in which the operation was made.\\n /// @param operation True if the operation was a borrow, false if it was a deposit.\\n /// @param reward The reward asset.\\n /// @return accrued The accrued amount.\\n /// @return index The account index.\\n function accountOperation(\\n address account,\\n Market market,\\n bool operation,\\n ERC20 reward\\n ) external view returns (uint256, uint256) {\\n Account storage operationAccount = distribution[market].rewards[reward].accounts[account][operation];\\n return (operationAccount.accrued, operationAccount.index);\\n }\\n\\n /// @notice Gets the distribution `start`, `end` and `lastUpdate` value of a given market and reward.\\n /// @param market The market to get the distribution times.\\n /// @param reward The reward asset.\\n /// @return The distribution `start`, `end` and `lastUpdate` time.\\n function distributionTime(Market market, ERC20 reward) external view returns (uint32, uint32, uint32) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.start, rewardData.end, rewardData.lastUpdate);\\n }\\n\\n /// @notice Retrieves all rewards addresses.\\n function allRewards() external view returns (ERC20[] memory) {\\n return rewardList;\\n }\\n\\n /// @notice Gets all market and operations.\\n /// @return marketOps The list of market operations.\\n function allMarketsOperations() public view returns (MarketOperation[] memory marketOps) {\\n Market[] memory markets = marketList;\\n marketOps = new MarketOperation[](markets.length);\\n for (uint256 m = 0; m < markets.length; ) {\\n bool[] memory ops = new bool[](2);\\n ops[0] = true;\\n ops[1] = false;\\n marketOps[m] = MarketOperation({ market: markets[m], operations: ops });\\n unchecked {\\n ++m;\\n }\\n }\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account and reward asset.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function allClaimable(address account, ERC20 reward) external view returns (uint256 unclaimedRewards) {\\n return claimable(allMarketsOperations(), account, reward);\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account, Market operations and reward asset.\\n /// @param marketOps The list of Market operations to get the accrued and pending rewards from.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function claimable(\\n MarketOperation[] memory marketOps,\\n address account,\\n ERC20 reward\\n ) public view returns (uint256 unclaimedRewards) {\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n RewardData storage rewardData = dist.rewards[reward];\\n if (dist.availableRewardsCount == 0) {\\n unchecked {\\n ++i;\\n }\\n continue;\\n }\\n\\n AccountOperation[] memory ops = accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n account,\\n rewardData.start\\n );\\n uint256 balance;\\n for (uint256 o = 0; o < ops.length; ) {\\n unclaimedRewards += rewardData.accounts[account][ops[o].operation].accrued;\\n balance += ops[o].balance;\\n unchecked {\\n ++o;\\n }\\n }\\n if (balance > 0) {\\n unclaimedRewards += pendingRewards(\\n account,\\n reward,\\n AccountMarketOperation({ market: marketOperation.market, accountOperations: ops })\\n );\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Iterates and accrues all rewards for the operations of the given account in the given market.\\n /// @param account The account to accrue the rewards for.\\n /// @param market The Market in which the operations where made.\\n /// @param reward The reward asset.\\n /// @param ops The operations to accrue the rewards for.\\n function update(address account, Market market, ERC20 reward, AccountOperation[] memory ops) internal {\\n uint256 baseUnit = distribution[market].baseUnit;\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n {\\n uint256 lastUpdate = rewardData.lastUpdate;\\n // `lastUpdate` can be greater than `block.timestamp` if distribution is set to start on a future date\\n if (block.timestamp > lastUpdate && (lastUpdate < rewardData.end || rewardData.lastUndistributed != 0)) {\\n (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) = previewAllocation(\\n rewardData,\\n market,\\n block.timestamp - lastUpdate\\n );\\n if (borrowIndex > type(uint128).max || depositIndex > type(uint128).max) revert IndexOverflow();\\n rewardData.borrowIndex = uint128(borrowIndex);\\n rewardData.depositIndex = uint128(depositIndex);\\n rewardData.lastUpdate = uint32(block.timestamp);\\n rewardData.lastUndistributed = newUndistributed;\\n emit IndexUpdate(market, reward, borrowIndex, depositIndex, newUndistributed, block.timestamp);\\n }\\n }\\n\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 i = 0; i < ops.length; ) {\\n AccountOperation memory op = ops[i];\\n Account storage accountData = operationAccount[op.operation];\\n uint256 accountIndex = accountData.index;\\n uint256 newAccountIndex;\\n if (op.operation) {\\n newAccountIndex = rewardData.borrowIndex;\\n } else {\\n newAccountIndex = rewardData.depositIndex;\\n }\\n if (accountIndex != newAccountIndex) {\\n accountData.index = uint128(newAccountIndex);\\n if (op.balance != 0) {\\n uint256 rewardsAccrued = accountRewards(op.balance, newAccountIndex, accountIndex, baseUnit);\\n accountData.accrued += uint128(rewardsAccrued);\\n emit Accrue(market, reward, account, op.operation, accountIndex, newAccountIndex, rewardsAccrued);\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the equivalent of borrow shares from fixed pool principal borrows of an account.\\n /// @param market The Market to get the fixed borrows from.\\n /// @param account The account that borrowed from fixed pools.\\n /// @return fixedDebt The fixed borrow shares.\\n function accountFixedBorrowShares(\\n Market market,\\n address account,\\n uint32 start\\n ) internal view returns (uint256 fixedDebt) {\\n uint256 firstMaturity = start - (start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 principal, ) = market.fixedBorrowPositions(maturity, account);\\n fixedDebt += principal;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n fixedDebt = market.previewRepay(fixedDebt);\\n }\\n\\n /// @notice Gets the reward indexes and last amount of undistributed rewards for a given market and reward asset.\\n /// @param market The market to get the reward indexes for.\\n /// @param reward The reward asset to get the reward indexes for.\\n /// @return borrowIndex The index for the floating and fixed borrow operation.\\n /// @return depositIndex The index for the floating deposit operation.\\n /// @return lastUndistributed The last amount of undistributed rewards.\\n function rewardIndexes(Market market, ERC20 reward) external view returns (uint256, uint256, uint256) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.borrowIndex, rewardData.depositIndex, rewardData.lastUndistributed);\\n }\\n\\n /// @notice Calculates the rewards not accrued yet for the given operations of a given account and reward asset.\\n /// @param account The account to get the pending rewards for.\\n /// @param reward The reward asset to get the pending rewards for.\\n /// @param ops The operations to get the pending rewards for.\\n /// @return rewards The pending rewards for the given operations.\\n function pendingRewards(\\n address account,\\n ERC20 reward,\\n AccountMarketOperation memory ops\\n ) internal view returns (uint256 rewards) {\\n RewardData storage rewardData = distribution[ops.market].rewards[reward];\\n uint256 baseUnit = distribution[ops.market].baseUnit;\\n uint256 lastUpdate = rewardData.lastUpdate;\\n (uint256 borrowIndex, uint256 depositIndex, ) = previewAllocation(\\n rewardData,\\n ops.market,\\n block.timestamp > lastUpdate ? block.timestamp - lastUpdate : 0\\n );\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 o = 0; o < ops.accountOperations.length; ) {\\n uint256 nextIndex;\\n if (ops.accountOperations[o].operation) {\\n nextIndex = borrowIndex;\\n } else {\\n nextIndex = depositIndex;\\n }\\n\\n rewards += accountRewards(\\n ops.accountOperations[o].balance,\\n nextIndex,\\n operationAccount[ops.accountOperations[o].operation].index,\\n baseUnit\\n );\\n unchecked {\\n ++o;\\n }\\n }\\n }\\n\\n /// @notice Calculates and returns the new amount of rewards given by the difference between the `accountIndex` and\\n /// the `globalIndex`.\\n /// @param balance The account's balance in the operation's pool.\\n /// @param globalIndex Current index of the distribution.\\n /// @param accountIndex Last index stored for the account.\\n /// @param baseUnit One unit of the Market's asset (10**decimals).\\n /// @return The amount of new rewards to be accrued by the account.\\n function accountRewards(\\n uint256 balance,\\n uint256 globalIndex,\\n uint256 accountIndex,\\n uint256 baseUnit\\n ) internal pure returns (uint256) {\\n return balance.mulDivDown(globalIndex - accountIndex, baseUnit);\\n }\\n\\n /// @notice Retrieves projected distribution indexes and new undistributed amount for a given `deltaTime`.\\n /// @param market The market to calculate the indexes for.\\n /// @param reward The reward asset to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n Market market,\\n ERC20 reward,\\n uint256 deltaTime\\n ) external view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n return previewAllocation(distribution[market].rewards[reward], market, deltaTime);\\n }\\n\\n /// @notice Calculates and returns the distribution indexes and new undistributed tokens for a given `rewardData`.\\n /// @param rewardData The distribution's data.\\n /// @param market The market to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n RewardData storage rewardData,\\n Market market,\\n uint256 deltaTime\\n ) internal view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n TotalMarketBalance memory m;\\n m.floatingDebt = market.floatingDebt();\\n m.floatingAssets = market.floatingAssets();\\n TimeVars memory t;\\n t.start = rewardData.start;\\n t.end = rewardData.end;\\n {\\n uint256 firstMaturity = t.start - (t.start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n uint256 fixedDebt;\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 borrowed, ) = market.fixedPoolBalance(maturity);\\n fixedDebt += borrowed;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n m.debt = m.floatingDebt + fixedDebt;\\n m.fixedBorrowShares = market.previewRepay(fixedDebt);\\n }\\n uint256 target;\\n {\\n uint256 targetDebt = rewardData.targetDebt;\\n target = m.debt < targetDebt ? m.debt.divWadDown(targetDebt) : 1e18;\\n }\\n uint256 rewards;\\n {\\n uint256 releaseRate = rewardData.releaseRate;\\n uint256 lastUndistributed = rewardData.lastUndistributed;\\n t.period = t.end - t.start;\\n uint256 distributionFactor = t.period > 0\\n ? rewardData.undistributedFactor.mulDivDown(target, t.period * 1e18)\\n : 0;\\n if (block.timestamp <= t.end) {\\n if (distributionFactor > 0) {\\n uint256 exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n } else if (rewardData.lastUpdate > t.end) {\\n newUndistributed =\\n lastUndistributed -\\n lastUndistributed.mulWadUp(1e18 - uint256((-int256(distributionFactor * deltaTime)).expWad()));\\n rewards = uint256(-(int256(newUndistributed) - int256(lastUndistributed)));\\n } else {\\n uint256 exponential;\\n deltaTime = t.end - rewardData.lastUpdate;\\n if (distributionFactor > 0) {\\n exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n exponential = uint256((-int256(distributionFactor * (block.timestamp - t.end))).expWad());\\n newUndistributed = newUndistributed - newUndistributed.mulWadUp(1e18 - exponential);\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n }\\n if (rewards == 0) return (rewardData.borrowIndex, rewardData.depositIndex, newUndistributed);\\n }\\n {\\n AllocationVars memory v;\\n v.globalUtilization = Math.min(\\n m.floatingAssets != 0\\n ? 1e18 - (m.floatingAssets - m.floatingDebt - market.floatingBackupBorrowed()).divWadDown(m.floatingAssets)\\n : 0,\\n UTILIZATION_CAP\\n );\\n v.transitionFactor = rewardData.transitionFactor;\\n v.flipSpeed = rewardData.flipSpeed;\\n v.borrowAllocationWeightFactor = rewardData.borrowAllocationWeightFactor;\\n v.sigmoid = v.globalUtilization > 0\\n ? uint256(1e18).divWadDown(\\n 1e18 +\\n uint256(\\n (-(v.flipSpeed *\\n (int256(v.globalUtilization.divWadDown(1e18 - v.globalUtilization)).lnWad() -\\n int256(v.transitionFactor.divWadDown(1e18 - v.transitionFactor)).lnWad())) / 1e18).expWad()\\n )\\n )\\n : 0;\\n v.borrowRewardRule = rewardData\\n .compensationFactor\\n .mulWadDown(\\n market\\n .interestRateModel()\\n .floatingRate(m.floatingAssets != 0 ? m.floatingDebt.divWadDown(m.floatingAssets) : 0, v.globalUtilization)\\n .mulWadDown(1e18 - v.globalUtilization.mulWadUp(1e18 - market.treasuryFeeRate())) +\\n v.borrowAllocationWeightFactor\\n )\\n .mulWadDown(1e18 - v.sigmoid);\\n v.depositRewardRule =\\n rewardData.depositAllocationWeightAddend.mulWadDown(1e18 - v.sigmoid) +\\n rewardData.depositAllocationWeightFactor.mulWadDown(v.sigmoid);\\n v.borrowAllocation = v.borrowRewardRule.divWadDown(v.borrowRewardRule + v.depositRewardRule);\\n v.depositAllocation = 1e18 - v.borrowAllocation;\\n {\\n uint256 totalDepositSupply = market.totalSupply();\\n uint256 totalBorrowSupply = market.totalFloatingBorrowShares() + m.fixedBorrowShares;\\n uint256 baseUnit = distribution[market].baseUnit;\\n borrowIndex =\\n rewardData.borrowIndex +\\n (totalBorrowSupply > 0 ? rewards.mulWadDown(v.borrowAllocation).mulDivDown(baseUnit, totalBorrowSupply) : 0);\\n depositIndex =\\n rewardData.depositIndex +\\n (\\n totalDepositSupply > 0\\n ? rewards.mulWadDown(v.depositAllocation).mulDivDown(baseUnit, totalDepositSupply)\\n : 0\\n );\\n }\\n }\\n }\\n\\n /// @notice Get account balances of the given Market operations.\\n /// @param market The address of the Market.\\n /// @param ops List of operations to retrieve account balance.\\n /// @param account Account to get the balance from.\\n /// @param distributionStart Timestamp of the start of the distribution to correctly get the rewarded fixed pools.\\n /// @return accountBalanceOps contains a list with account balance per each operation.\\n function accountBalanceOperations(\\n Market market,\\n bool[] memory ops,\\n address account,\\n uint32 distributionStart\\n ) internal view returns (AccountOperation[] memory accountBalanceOps) {\\n accountBalanceOps = new AccountOperation[](ops.length);\\n for (uint256 i = 0; i < ops.length; ) {\\n if (ops[i]) {\\n (, , uint256 floatingBorrowShares) = market.accounts(account);\\n accountBalanceOps[i] = AccountOperation({\\n operation: true,\\n balance: floatingBorrowShares + accountFixedBorrowShares(market, account, distributionStart)\\n });\\n } else {\\n accountBalanceOps[i] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Sets the `keeper` address for the given `account`.\\n /// @param account The account to set the `keeper` for.\\n /// @param keeper The address to set as the `keeper`.\\n function setKeeper(address account, address keeper) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n keepers[account] = keeper;\\n }\\n\\n /// @notice Withdraws the contract's balance of the given asset to the given address.\\n /// @param asset The asset to withdraw.\\n /// @param to The address to withdraw the asset to.\\n function withdraw(ERC20 asset, address to) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n asset.safeTransfer(to, asset.balanceOf(address(this)));\\n }\\n\\n /// @notice Enables or updates the reward distribution for the given markets and rewards.\\n /// @param configs The configurations to update each RewardData with.\\n function config(Config[] memory configs) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n for (uint256 i = 0; i < configs.length; ) {\\n // transitionFactor cannot be eq or higher than 1e18 to avoid division by zero or underflow\\n if (configs[i].transitionFactor >= 1e18) revert InvalidConfig();\\n // depositAllocationWeightFactor cannot be zero to avoid division by zero when sigmoid equals 1e18\\n if (configs[i].depositAllocationWeightFactor == 0) revert InvalidConfig();\\n\\n Distribution storage dist = distribution[configs[i].market];\\n RewardData storage rewardData = dist.rewards[configs[i].reward];\\n\\n if (dist.baseUnit == 0) {\\n // never initialized before, adding to the list of markets\\n marketList.push(configs[i].market);\\n }\\n if (!rewardEnabled[configs[i].reward]) {\\n // add reward address to global rewards list if still not enabled\\n rewardEnabled[configs[i].reward] = true;\\n rewardList.push(configs[i].reward);\\n }\\n if (rewardData.lastUpdate == 0) {\\n // add reward address to distribution data's available rewards if distribution is new\\n dist.availableRewards[dist.availableRewardsCount++] = configs[i].reward;\\n dist.baseUnit = 10 ** configs[i].market.decimals();\\n // set initial parameters if distribution is new\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n } else {\\n uint32 start = rewardData.start;\\n uint32 end = rewardData.end;\\n // update global indexes before updating distribution values\\n bool[] memory ops = new bool[](1);\\n ops[0] = true;\\n update(\\n address(0),\\n configs[i].market,\\n configs[i].reward,\\n accountBalanceOperations(configs[i].market, ops, address(0), start)\\n );\\n // properly update release rate\\n if (block.timestamp < end) {\\n uint256 released = 0;\\n uint256 elapsed = 0;\\n if (block.timestamp > start) {\\n released =\\n rewardData.lastConfigReleased +\\n rewardData.releaseRate *\\n (block.timestamp - Math.max(rewardData.lastConfig, start));\\n elapsed = block.timestamp - start;\\n if (configs[i].totalDistribution <= released || configs[i].distributionPeriod <= elapsed) {\\n revert InvalidConfig();\\n }\\n rewardData.lastConfigReleased = released;\\n }\\n\\n rewardData.releaseRate =\\n (configs[i].totalDistribution - released) /\\n (configs[i].distributionPeriod - elapsed);\\n } else if (rewardData.start != configs[i].start) {\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n rewardData.lastConfigReleased = 0;\\n }\\n }\\n rewardData.lastConfig = uint32(block.timestamp);\\n rewardData.end = rewardData.start + uint32(configs[i].distributionPeriod);\\n rewardData.priceFeed = configs[i].priceFeed;\\n // set emission and distribution parameters\\n rewardData.totalDistribution = configs[i].totalDistribution;\\n rewardData.targetDebt = configs[i].targetDebt;\\n rewardData.undistributedFactor = configs[i].undistributedFactor;\\n rewardData.flipSpeed = configs[i].flipSpeed;\\n rewardData.compensationFactor = configs[i].compensationFactor;\\n rewardData.borrowAllocationWeightFactor = configs[i].borrowAllocationWeightFactor;\\n rewardData.depositAllocationWeightAddend = configs[i].depositAllocationWeightAddend;\\n rewardData.transitionFactor = configs[i].transitionFactor;\\n rewardData.depositAllocationWeightFactor = configs[i].depositAllocationWeightFactor;\\n\\n emit DistributionSet(configs[i].market, configs[i].reward, configs[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(\\\"RewardsController\\\"),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n modifier claimSender() {\\n if (_claimSender == address(0)) _claimSender = msg.sender;\\n _;\\n delete _claimSender;\\n }\\n\\n modifier permitSender(ClaimPermit calldata permit) {\\n assert(_claimSender == address(0));\\n assert(permit.deadline >= block.timestamp);\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\\"ClaimPermit(address owner,address spender,address[] assets,uint256 deadline)\\\"),\\n permit.owner,\\n msg.sender,\\n permit.assets,\\n nonces[permit.owner]++,\\n permit.deadline\\n )\\n )\\n )\\n ),\\n permit.v,\\n permit.r,\\n permit.s\\n );\\n assert(recoveredAddress != address(0) && recoveredAddress == permit.owner);\\n _claimSender = permit.owner;\\n }\\n _;\\n assert(_claimSender == address(0));\\n }\\n\\n struct TotalMarketBalance {\\n uint256 debt;\\n uint256 fixedBorrowShares;\\n uint256 floatingDebt;\\n uint256 floatingAssets;\\n }\\n\\n struct TimeVars {\\n uint256 start;\\n uint256 end;\\n uint256 period;\\n }\\n\\n struct AllocationVars {\\n uint256 globalUtilization;\\n uint256 sigmoid;\\n uint256 borrowRewardRule;\\n uint256 depositRewardRule;\\n uint256 borrowAllocation;\\n uint256 depositAllocation;\\n uint256 transitionFactor;\\n int256 flipSpeed;\\n uint256 borrowAllocationWeightFactor;\\n }\\n\\n struct AccountOperation {\\n bool operation;\\n uint256 balance;\\n }\\n\\n struct MarketOperation {\\n Market market;\\n bool[] operations;\\n }\\n\\n struct AccountMarketOperation {\\n Market market;\\n AccountOperation[] accountOperations;\\n }\\n\\n struct Account {\\n // liquidity index of the reward distribution for the account\\n uint128 index;\\n // amount of accrued rewards for the account since last account index update\\n uint128 accrued;\\n }\\n\\n struct Config {\\n Market market;\\n ERC20 reward;\\n IPriceFeed priceFeed;\\n uint32 start;\\n uint256 distributionPeriod;\\n uint256 targetDebt;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n }\\n\\n struct RewardData {\\n // distribution model\\n uint256 targetDebt;\\n uint256 releaseRate;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n uint256 lastUndistributed;\\n // allocation model\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n // liquidity indexes of the reward distribution\\n uint128 borrowIndex;\\n uint128 depositIndex;\\n // distribution timestamps\\n uint32 start;\\n uint32 end;\\n uint32 lastUpdate;\\n // config helpers\\n uint32 lastConfig;\\n uint256 lastConfigReleased;\\n // price feed\\n IPriceFeed priceFeed;\\n // account addresses and their rewards data (index & accrued)\\n mapping(address => mapping(bool => Account)) accounts;\\n }\\n\\n struct Distribution {\\n // reward assets and their data\\n mapping(ERC20 => RewardData) rewards;\\n // list of reward asset addresses for the market\\n mapping(uint128 => ERC20) availableRewards;\\n // count of reward tokens for the market\\n uint8 availableRewardsCount;\\n // base unit of the market\\n uint256 baseUnit;\\n }\\n\\n /// @notice Emitted when rewards are accrued by an account.\\n /// @param market Market where the operation was made.\\n /// @param reward reward asset.\\n /// @param account account that accrued the rewards.\\n /// @param operation true if the operation was a borrow, false if it was a deposit.\\n /// @param accountIndex previous account index.\\n /// @param operationIndex new operation index that is assigned to the `accountIndex`.\\n /// @param rewardsAccrued amount of rewards accrued.\\n event Accrue(\\n Market indexed market,\\n ERC20 indexed reward,\\n address indexed account,\\n bool operation,\\n uint256 accountIndex,\\n uint256 operationIndex,\\n uint256 rewardsAccrued\\n );\\n\\n /// @notice Emitted when rewards are claimed by an account.\\n /// @param account account that claimed the rewards.\\n /// @param reward reward asset.\\n /// @param to account that received the rewards.\\n /// @param amount amount of rewards claimed.\\n event Claim(address indexed account, ERC20 indexed reward, address indexed to, uint256 amount);\\n\\n /// @notice Emitted when a distribution is set.\\n /// @param market Market whose distribution was set.\\n /// @param reward reward asset to be distributed when operating with the Market.\\n /// @param config configuration struct containing the distribution parameters.\\n event DistributionSet(Market indexed market, ERC20 indexed reward, Config config);\\n\\n /// @notice Emitted when the distribution indexes are updated.\\n /// @param market Market of the distribution.\\n /// @param reward reward asset.\\n /// @param borrowIndex index of the borrow operations of a distribution.\\n /// @param depositIndex index of the deposit operations of a distribution.\\n /// @param newUndistributed amount of undistributed rewards.\\n /// @param lastUpdate current timestamp.\\n event IndexUpdate(\\n Market indexed market,\\n ERC20 indexed reward,\\n uint256 borrowIndex,\\n uint256 depositIndex,\\n uint256 newUndistributed,\\n uint256 lastUpdate\\n );\\n}\\n\\nerror IndexOverflow();\\nerror InvalidConfig();\\nerror NotKeeper();\\n\\nstruct ClaimPermit {\\n address owner;\\n ERC20[] assets;\\n uint256 deadline;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n}\\n\",\"keccak256\":\"0xab502e9e6c6fdd56878d80fde0aee78c360234b15b1db8d7cb6508fe3c430163\",\"license\":\"BUSL-1.1\"},\"contracts/utils/FixedLib.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts-v4/utils/math/Math.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\nlibrary FixedLib {\\n using FixedPointMathLib for uint256;\\n\\n uint256 internal constant INTERVAL = 4 weeks;\\n\\n /// @notice Gets the amount of revenue sharing between the backup supplier and the new fixed pool supplier.\\n /// @param pool fixed rate pool.\\n /// @param amount amount being provided by the fixed pool supplier.\\n /// @param backupFeeRate rate charged to the fixed pool supplier to be accrued by the backup supplier.\\n /// @return yield amount to be offered to the fixed pool supplier.\\n /// @return backupFee yield to be accrued by the backup supplier for initially providing the liquidity.\\n function calculateDeposit(\\n Pool memory pool,\\n uint256 amount,\\n uint256 backupFeeRate\\n ) internal pure returns (uint256 yield, uint256 backupFee) {\\n uint256 memBackupSupplied = backupSupplied(pool);\\n if (memBackupSupplied != 0) {\\n yield = pool.unassignedEarnings.mulDivDown(Math.min(amount, memBackupSupplied), memBackupSupplied);\\n backupFee = yield.mulWadDown(backupFeeRate);\\n yield -= backupFee;\\n }\\n }\\n\\n /// @notice Registers an operation to add supply to a fixed rate pool and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be added to the supply.\\n /// @param amount amount to be added to the supply.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function deposit(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.supplied = supplied + amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to reduce borrowed amount from a fixed rate pool\\n /// and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be repaid.\\n /// @param amount amount to be added to the fixed rate pool.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function repay(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.borrowed = borrowed - amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to increase borrowed amount of a fixed rate pool\\n /// and potentially increase backup debt.\\n /// @param pool fixed rate pool where an amount will be borrowed.\\n /// @param amount amount to be borrowed from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function borrow(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 newBorrowed = borrowed + amount;\\n\\n backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, pool.supplied), newBorrowed);\\n pool.borrowed = newBorrowed;\\n }\\n\\n /// @notice Registers an operation to reduce supply from a fixed rate pool and potentially increase backup debt.\\n /// @param pool fixed rate pool where amount will be withdrawn.\\n /// @param amountToDiscount amount to be withdrawn from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function withdraw(Pool storage pool, uint256 amountToDiscount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n uint256 newSupply = supplied - amountToDiscount;\\n\\n backupDebtAddition = Math.min(supplied, borrowed) - Math.min(newSupply, borrowed);\\n pool.supplied = newSupply;\\n }\\n\\n /// @notice Accrues backup earnings from `unassignedEarnings` based on the `lastAccrual` time.\\n /// @param pool fixed rate pool where earnings will be accrued.\\n /// @param maturity maturity date of the pool.\\n /// @return backupEarnings amount of earnings to be distributed to the backup supplier.\\n function accrueEarnings(Pool storage pool, uint256 maturity) internal returns (uint256 backupEarnings) {\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (block.timestamp < maturity) {\\n uint256 unassignedEarnings = pool.unassignedEarnings;\\n pool.lastAccrual = block.timestamp;\\n backupEarnings = unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual);\\n pool.unassignedEarnings = unassignedEarnings - backupEarnings;\\n } else if (lastAccrual == maturity) {\\n backupEarnings = 0;\\n } else {\\n pool.lastAccrual = maturity;\\n backupEarnings = pool.unassignedEarnings;\\n pool.unassignedEarnings = 0;\\n }\\n }\\n\\n /// @notice Calculates the amount that a fixed rate pool borrowed from the backup supplier.\\n /// @param pool fixed rate pool.\\n /// @return amount borrowed from the fixed rate pool.\\n function backupSupplied(Pool memory pool) internal pure returns (uint256) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n return borrowed - Math.min(borrowed, supplied);\\n }\\n\\n /// @notice Modify positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it. Needs for the amount to be less than the principal and the fee\\n /// @param position original position to be scaled.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return scaled position.\\n function scaleProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 principal = amount.mulDivDown(position.principal, position.principal + position.fee);\\n position.principal = principal;\\n position.fee = amount - principal;\\n return position;\\n }\\n\\n /// @notice Reduce positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it.\\n /// @param position original position to be reduced.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return reduced position.\\n function reduceProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 positionAssets = position.principal + position.fee;\\n uint256 newPositionAssets = positionAssets - amount;\\n position.principal = newPositionAssets.mulDivDown(position.principal, positionAssets);\\n position.fee = newPositionAssets - position.principal;\\n return position;\\n }\\n\\n /// @notice Calculates what proportion of earnings would `borrowAmount` represent considering `backupSupplied`.\\n /// @param earnings amount to be distributed.\\n /// @param borrowAmount amount that will be checked if came from the backup supplier or fixed rate pool.\\n /// @return unassignedEarnings earnings to be added to `unassignedEarnings`.\\n /// @return backupEarnings earnings to be distributed to the backup supplier.\\n function distributeEarnings(\\n Pool memory pool,\\n uint256 earnings,\\n uint256 borrowAmount\\n ) internal pure returns (uint256 unassignedEarnings, uint256 backupEarnings) {\\n backupEarnings = borrowAmount == 0\\n ? 0\\n : earnings.mulDivDown(borrowAmount - Math.min(backupSupplied(pool), borrowAmount), borrowAmount);\\n unassignedEarnings = earnings - backupEarnings;\\n }\\n\\n /// @notice Adds a maturity date to the borrow or supply positions of the account.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity the new maturity where the account will borrow or supply to.\\n /// @return updated encoded maturity dates.\\n function setMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n // initialize the maturity with also the 1st bit on the 33th position set\\n if (encoded == 0) return maturity | (1 << 32);\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n if (maturity < baseMaturity) {\\n // if the new maturity is lower than the base, set it as the new base\\n // wipe clean the last 32 bits, shift the amount of `INTERVAL` and set the new value with the 33rd bit set\\n uint256 range = (baseMaturity - maturity) / INTERVAL;\\n if (encoded >> (256 - range) != 0) revert MaturityOverflow();\\n encoded = ((encoded >> 32) << (32 + range));\\n return maturity | encoded | (1 << 32);\\n } else {\\n uint256 range = (maturity - baseMaturity) / INTERVAL;\\n if (range > 223) revert MaturityOverflow();\\n return encoded | (1 << (32 + range));\\n }\\n }\\n\\n /// @notice Remove maturity from account's borrow or supplied positions.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity maturity date to be removed.\\n /// @return updated encoded maturity dates.\\n function clearMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n if (encoded == 0 || encoded == maturity | (1 << 32)) return 0;\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n // if the baseMaturity is the one being cleaned\\n if (maturity == baseMaturity) {\\n // wipe 32 bytes + 1 for the old base flag\\n uint256 packed = encoded >> 33;\\n uint256 range = 1;\\n while ((packed & 1) == 0 && packed != 0) {\\n unchecked {\\n ++range;\\n }\\n packed >>= 1;\\n }\\n encoded = ((encoded >> (32 + range)) << 32);\\n return (maturity + (range * INTERVAL)) | encoded;\\n } else {\\n // otherwise just clear the bit\\n return encoded & ~(1 << (32 + ((maturity - baseMaturity) / INTERVAL)));\\n }\\n }\\n\\n /// @notice Verifies that a maturity is `VALID`, `MATURED`, `NOT_READY` or `INVALID`.\\n /// @dev if expected state doesn't match the calculated one, it reverts with a custom error `UnmatchedPoolState`.\\n /// @param maturity timestamp of the maturity date to be verified.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param requiredState state required by the caller to be verified (see `State` for description).\\n /// @param alternativeState state required by the caller to be verified (see `State` for description).\\n function checkPoolState(uint256 maturity, uint8 maxPools, State requiredState, State alternativeState) internal view {\\n State state;\\n if (maturity % INTERVAL != 0) {\\n state = State.INVALID;\\n } else if (maturity <= block.timestamp) {\\n state = State.MATURED;\\n } else if (maturity > block.timestamp - (block.timestamp % INTERVAL) + (INTERVAL * maxPools)) {\\n state = State.NOT_READY;\\n } else {\\n state = State.VALID;\\n }\\n\\n if (state != requiredState && state != alternativeState) {\\n if (alternativeState == State.NONE) revert UnmatchedPoolState(uint8(state), uint8(requiredState));\\n\\n revert UnmatchedPoolStates(uint8(state), uint8(requiredState), uint8(alternativeState));\\n }\\n }\\n\\n /// @notice Stores the accountability of a fixed interest rate pool.\\n /// @param borrowed total amount borrowed from the pool.\\n /// @param supplied total amount supplied to the pool.\\n /// @param unassignedEarnings total amount of earnings not yet distributed and accrued.\\n /// @param lastAccrual timestamp for the last time that some earnings have been distributed to the backup supplier.\\n struct Pool {\\n uint256 borrowed;\\n uint256 supplied;\\n uint256 unassignedEarnings;\\n uint256 lastAccrual;\\n }\\n\\n /// @notice Stores principal and fee of a borrow or a supply position of a account in a fixed rate pool.\\n /// @param principal amount borrowed or supplied to the fixed rate pool.\\n /// @param fee amount of fees to be repaid or earned at the maturity of the fixed rate pool.\\n struct Position {\\n uint256 principal;\\n uint256 fee;\\n }\\n\\n enum State {\\n NONE,\\n INVALID,\\n MATURED,\\n VALID,\\n NOT_READY\\n }\\n}\\n\\nerror MaturityOverflow();\\nerror UnmatchedPoolState(uint8 state, uint8 requiredState);\\nerror UnmatchedPoolStates(uint8 state, uint8 requiredState, uint8 alternativeState);\\n\",\"keccak256\":\"0x9eb04f02cac9a0c2fd049587524799c8ab4fa1840d9550bad02d87d81074187c\",\"license\":\"BUSL-1.1\"},\"contracts/utils/IPriceFeed.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\ninterface IPriceFeed {\\n function decimals() external view returns (uint8);\\n\\n function latestAnswer() external view returns (int256);\\n}\\n\",\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\"},\"solmate/src/mixins/ERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\nimport {SafeTransferLib} from \\\"../utils/SafeTransferLib.sol\\\";\\nimport {FixedPointMathLib} from \\\"../utils/FixedPointMathLib.sol\\\";\\n\\n/// @notice Minimal ERC4626 tokenized Vault implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)\\nabstract contract ERC4626 is ERC20 {\\n using SafeTransferLib for ERC20;\\n using FixedPointMathLib for uint256;\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /*//////////////////////////////////////////////////////////////\\n IMMUTABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n ERC20 public immutable asset;\\n\\n constructor(\\n ERC20 _asset,\\n string memory _name,\\n string memory _symbol\\n ) ERC20(_name, _symbol, _asset.decimals()) {\\n asset = _asset;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {\\n // Check for rounding error since we round down in previewDeposit.\\n require((shares = previewDeposit(assets)) != 0, \\\"ZERO_SHARES\\\");\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {\\n assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up.\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 shares) {\\n shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up.\\n\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 assets) {\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n // Check for rounding error since we round down in previewRedeem.\\n require((assets = previewRedeem(shares)) != 0, \\\"ZERO_ASSETS\\\");\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ACCOUNTING LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function totalAssets() public view virtual returns (uint256);\\n\\n function convertToShares(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets());\\n }\\n\\n function convertToAssets(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply);\\n }\\n\\n function previewDeposit(uint256 assets) public view virtual returns (uint256) {\\n return convertToShares(assets);\\n }\\n\\n function previewMint(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply);\\n }\\n\\n function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\\n }\\n\\n function previewRedeem(uint256 shares) public view virtual returns (uint256) {\\n return convertToAssets(shares);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LIMIT LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function maxDeposit(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxMint(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxWithdraw(address owner) public view virtual returns (uint256) {\\n return convertToAssets(balanceOf[owner]);\\n }\\n\\n function maxRedeem(address owner) public view virtual returns (uint256) {\\n return balanceOf[owner];\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL HOOKS LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {}\\n\\n function afterDeposit(uint256 assets, uint256 shares) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\"},\"solmate/src/tokens/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\\nabstract contract ERC20 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n uint8 public immutable decimals;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) public balanceOf;\\n\\n mapping(address => mapping(address => uint256)) public allowance;\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal immutable INITIAL_CHAIN_ID;\\n\\n bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\\n\\n mapping(address => uint256) public nonces;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint8 _decimals\\n ) {\\n name = _name;\\n symbol = _symbol;\\n decimals = _decimals;\\n\\n INITIAL_CHAIN_ID = block.chainid;\\n INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 amount) public virtual returns (bool) {\\n allowance[msg.sender][spender] = amount;\\n\\n emit Approval(msg.sender, spender, amount);\\n\\n return true;\\n }\\n\\n function transfer(address to, uint256 amount) public virtual returns (bool) {\\n balanceOf[msg.sender] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(msg.sender, to, amount);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual returns (bool) {\\n uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\\n\\n balanceOf[from] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n return true;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 LOGIC\\n //////////////////////////////////////////////////////////////*/\\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 ) public virtual {\\n require(deadline >= block.timestamp, \\\"PERMIT_DEADLINE_EXPIRED\\\");\\n\\n // Unchecked because the only math done is incrementing\\n // the owner's nonce which cannot realistically overflow.\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\n \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n ),\\n owner,\\n spender,\\n value,\\n nonces[owner]++,\\n deadline\\n )\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"INVALID_SIGNER\\\");\\n\\n allowance[recoveredAddress][spender] = value;\\n }\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\\n return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\\n }\\n\\n function computeDomainSeparator() internal view virtual returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 amount) internal virtual {\\n totalSupply += amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(address(0), to, amount);\\n }\\n\\n function _burn(address from, uint256 amount) internal virtual {\\n balanceOf[from] -= amount;\\n\\n // Cannot underflow because a user's balance\\n // will never be larger than the total supply.\\n unchecked {\\n totalSupply -= amount;\\n }\\n\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\"},\"solmate/src/utils/FixedPointMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Arithmetic library with operations for fixed-point numbers.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)\\nlibrary FixedPointMathLib {\\n /*//////////////////////////////////////////////////////////////\\n SIMPLIFIED FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.\\n\\n function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.\\n }\\n\\n function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.\\n }\\n\\n function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.\\n }\\n\\n function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.\\n }\\n\\n function powWad(int256 x, int256 y) internal pure returns (int256) {\\n // Equivalent to x to the power of y because x ** y = (e ** ln(x)) ** y = e ** (ln(x) * y)\\n return expWad((lnWad(x) * y) / int256(WAD)); // Using ln(x) means x must be greater than 0.\\n }\\n\\n function expWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n // When the result is < 0.5 we return zero. This happens when\\n // x <= floor(log(0.5e18) * 1e18) ~ -42e18\\n if (x <= -42139678854452767551) return 0;\\n\\n // When the result is > (2**255 - 1) / 1e18 we can not represent it as an\\n // int. This happens when x >= floor(log((2**255 - 1) / 1e18) * 1e18) ~ 135.\\n if (x >= 135305999368893231589) revert(\\\"EXP_OVERFLOW\\\");\\n\\n // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96\\n // for more intermediate precision and a binary basis. This base conversion\\n // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.\\n x = (x << 78) / 5**18;\\n\\n // Reduce range of x to (-\\u00bd ln 2, \\u00bd ln 2) * 2**96 by factoring out powers\\n // of two such that exp(x) = exp(x') * 2**k, where k is an integer.\\n // Solving this gives k = round(x / log(2)) and x' = x - k * log(2).\\n int256 k = ((x << 96) / 54916777467707473351141471128 + 2**95) >> 96;\\n x = x - k * 54916777467707473351141471128;\\n\\n // k is in the range [-61, 195].\\n\\n // Evaluate using a (6, 7)-term rational approximation.\\n // p is made monic, we'll multiply by a scale factor later.\\n int256 y = x + 1346386616545796478920950773328;\\n y = ((y * x) >> 96) + 57155421227552351082224309758442;\\n int256 p = y + x - 94201549194550492254356042504812;\\n p = ((p * y) >> 96) + 28719021644029726153956944680412240;\\n p = p * x + (4385272521454847904659076985693276 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n int256 q = x - 2855989394907223263936484059900;\\n q = ((q * x) >> 96) + 50020603652535783019961831881945;\\n q = ((q * x) >> 96) - 533845033583426703283633433725380;\\n q = ((q * x) >> 96) + 3604857256930695427073651918091429;\\n q = ((q * x) >> 96) - 14423608567350463180887372962807573;\\n q = ((q * x) >> 96) + 26449188498355588339934803723976023;\\n\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial won't have zeros in the domain as all its roots are complex.\\n // No scaling is necessary because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r should be in the range (0.09, 0.25) * 2**96.\\n\\n // We now need to multiply r by:\\n // * the scale factor s = ~6.031367120.\\n // * the 2**k factor from the range reduction.\\n // * the 1e18 / 2**96 factor for base conversion.\\n // We do this all at once, with an intermediate result in 2**213\\n // basis, so the final right shift is always by a positive amount.\\n r = int256((uint256(r) * 3822833074963236453042738258902158003155416615667) >> uint256(195 - k));\\n }\\n }\\n\\n function lnWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n // We want to convert x from 10**18 fixed point to 2**96 fixed point.\\n // We do this by multiplying by 2**96 / 10**18. But since\\n // ln(x * C) = ln(x) + ln(C), we can simply do nothing here\\n // and add ln(2**96 / 10**18) at the end.\\n\\n // Reduce range of x to (1, 2) * 2**96\\n // ln(2^k * x) = k * ln(2) + ln(x)\\n int256 k = int256(log2(uint256(x))) - 96;\\n x <<= uint256(159 - k);\\n x = int256(uint256(x) >> 159);\\n\\n // Evaluate using a (8, 8)-term rational approximation.\\n // p is made monic, we will multiply by a scale factor later.\\n int256 p = x + 3273285459638523848632254066296;\\n p = ((p * x) >> 96) + 24828157081833163892658089445524;\\n p = ((p * x) >> 96) + 43456485725739037958740375743393;\\n p = ((p * x) >> 96) - 11111509109440967052023855526967;\\n p = ((p * x) >> 96) - 45023709667254063763336534515857;\\n p = ((p * x) >> 96) - 14706773417378608786704636184526;\\n p = p * x - (795164235651350426258249787498 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n // q is monic by convention.\\n int256 q = x + 5573035233440673466300451813936;\\n q = ((q * x) >> 96) + 71694874799317883764090561454958;\\n q = ((q * x) >> 96) + 283447036172924575727196451306956;\\n q = ((q * x) >> 96) + 401686690394027663651624208769553;\\n q = ((q * x) >> 96) + 204048457590392012362485061816622;\\n q = ((q * x) >> 96) + 31853899698501571402653359427138;\\n q = ((q * x) >> 96) + 909429971244387300277376558375;\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial is known not to have zeros in the domain.\\n // No scaling required because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r is in the range (0, 0.125) * 2**96\\n\\n // Finalization, we need to:\\n // * multiply by the scale factor s = 5.549\\u2026\\n // * add ln(2**96 / 10**18)\\n // * add k * ln(2)\\n // * multiply by 10**18 / 2**96 = 5**18 >> 78\\n\\n // mul s * 5e18 * 2**96, base is now 5**18 * 2**192\\n r *= 1677202110996718588342820967067443963516166;\\n // add ln(2) * k * 5e18 * 2**192\\n r += 16597577552685614221487285958193947469193820559219878177908093499208371 * k;\\n // add ln(2**96 / 10**18) * 5e18 * 2**192\\n r += 600920179829731861736702779321621459595472258049074101567377883020018308;\\n // base conversion: mul 2**18 / 2**192\\n r >>= 174;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n LOW LEVEL FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function mulDivDown(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // Divide z by the denominator.\\n z := div(z, denominator)\\n }\\n }\\n\\n function mulDivUp(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // First, divide z - 1 by the denominator and add 1.\\n // We allow z - 1 to underflow if z is 0, because we multiply the\\n // end result by 0 if z is zero, ensuring we return 0 if z is zero.\\n z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1))\\n }\\n }\\n\\n function rpow(\\n uint256 x,\\n uint256 n,\\n uint256 scalar\\n ) internal pure returns (uint256 z) {\\n assembly {\\n switch x\\n case 0 {\\n switch n\\n case 0 {\\n // 0 ** 0 = 1\\n z := scalar\\n }\\n default {\\n // 0 ** n = 0\\n z := 0\\n }\\n }\\n default {\\n switch mod(n, 2)\\n case 0 {\\n // If n is even, store scalar in z for now.\\n z := scalar\\n }\\n default {\\n // If n is odd, store x in z for now.\\n z := x\\n }\\n\\n // Shifting right by 1 is like dividing by 2.\\n let half := shr(1, scalar)\\n\\n for {\\n // Shift n right by 1 before looping to halve it.\\n n := shr(1, n)\\n } n {\\n // Shift n right by 1 each iteration to halve it.\\n n := shr(1, n)\\n } {\\n // Revert immediately if x ** 2 would overflow.\\n // Equivalent to iszero(eq(div(xx, x), x)) here.\\n if shr(128, x) {\\n revert(0, 0)\\n }\\n\\n // Store x squared.\\n let xx := mul(x, x)\\n\\n // Round to the nearest number.\\n let xxRound := add(xx, half)\\n\\n // Revert if xx + half overflowed.\\n if lt(xxRound, xx) {\\n revert(0, 0)\\n }\\n\\n // Set x to scaled xxRound.\\n x := div(xxRound, scalar)\\n\\n // If n is even:\\n if mod(n, 2) {\\n // Compute z * x.\\n let zx := mul(z, x)\\n\\n // If z * x overflowed:\\n if iszero(eq(div(zx, x), z)) {\\n // Revert if x is non-zero.\\n if iszero(iszero(x)) {\\n revert(0, 0)\\n }\\n }\\n\\n // Round to the nearest number.\\n let zxRound := add(zx, half)\\n\\n // Revert if zx + half overflowed.\\n if lt(zxRound, zx) {\\n revert(0, 0)\\n }\\n\\n // Return properly scaled zxRound.\\n z := div(zxRound, scalar)\\n }\\n }\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n GENERAL NUMBER UTILITIES\\n //////////////////////////////////////////////////////////////*/\\n\\n function sqrt(uint256 x) internal pure returns (uint256 z) {\\n assembly {\\n let y := x // We start y at x, which will help us make our initial estimate.\\n\\n z := 181 // The \\\"correct\\\" value is 1, but this saves a multiplication later.\\n\\n // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad\\n // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.\\n\\n // We check y >= 2^(k + 8) but shift right by k bits\\n // each branch to ensure that if x >= 256, then y >= 256.\\n if iszero(lt(y, 0x10000000000000000000000000000000000)) {\\n y := shr(128, y)\\n z := shl(64, z)\\n }\\n if iszero(lt(y, 0x1000000000000000000)) {\\n y := shr(64, y)\\n z := shl(32, z)\\n }\\n if iszero(lt(y, 0x10000000000)) {\\n y := shr(32, y)\\n z := shl(16, z)\\n }\\n if iszero(lt(y, 0x1000000)) {\\n y := shr(16, y)\\n z := shl(8, z)\\n }\\n\\n // Goal was to get z*z*y within a small factor of x. More iterations could\\n // get y in a tighter range. Currently, we will have y in [256, 256*2^16).\\n // We ensured y >= 256 so that the relative difference between y and y+1 is small.\\n // That's not possible if x < 256 but we can just verify those cases exhaustively.\\n\\n // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.\\n // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.\\n // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.\\n\\n // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range\\n // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.\\n\\n // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate\\n // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.\\n\\n // There is no overflow risk here since y < 2^136 after the first branch above.\\n z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.\\n\\n // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n\\n // If x+1 is a perfect square, the Babylonian method cycles between\\n // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.\\n // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\\n // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.\\n // If you don't care whether the floor or ceil square root is returned, you can remove this statement.\\n z := sub(z, lt(div(x, z), z))\\n }\\n }\\n\\n function log2(uint256 x) internal pure returns (uint256 r) {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n assembly {\\n r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))\\n r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))\\n r := or(r, shl(5, lt(0xffffffff, shr(r, x))))\\n r := or(r, shl(4, lt(0xffff, shr(r, x))))\\n r := or(r, shl(3, lt(0xff, shr(r, x))))\\n r := or(r, shl(2, lt(0xf, shr(r, x))))\\n r := or(r, shl(1, lt(0x3, shr(r, x))))\\n r := or(r, lt(0x1, shr(r, x)))\\n }\\n }\\n\\n function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := mod(x, y)\\n }\\n }\\n\\n function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := div(x, y)\\n }\\n }\\n\\n /// @dev Will return 0 instead of reverting if y is zero.\\n function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // Add 1 to x * y if x % y > 0.\\n z := add(gt(mod(x, y), 0), div(x, y))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\"},\"solmate/src/utils/SafeTransferLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\n\\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)\\n/// @dev Caution! This library won't check that a token has code, responsibility is delegated to the caller.\\nlibrary SafeTransferLib {\\n /*//////////////////////////////////////////////////////////////\\n ETH OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n bool success;\\n\\n assembly {\\n // Transfer the ETH and store if it succeeded or not.\\n success := call(gas(), to, amount, 0, 0, 0, 0)\\n }\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferFrom(\\n ERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\\n mstore(4, and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \\\"from\\\" argument.\\n mstore(36, and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \\\"to\\\" argument.\\n mstore(68, amount) // Append the \\\"amount\\\" argument. Masking not required as it's a full 32 byte type.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 100 because that's the total length of our calldata (4 + 32 * 3)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 100, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\\n mstore(4, and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument. Masking not required as it's a full 32 byte type.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x095ea7b300000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"APPROVE_FAILED\\\");\\n }\\n}\\n\",\"keccak256\":\"0xbb4580ec2c735b5f31bb176567c886a87c2800b3eff132eda15ddc2b28cc2932\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052348015600e575f80fd5b5060156019565b607b565b5f54610100900460ff1615602b575f80fd5b5f5460ff908116146079575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6150ab806100885f395ff3fe608060405234801561000f575f80fd5b5060043610610235575f3560e01c806377329f351161013d578063c2db09c1116100b8578063de7ea7c611610088578063f2426f9a1161006e578063f2426f9a14610748578063f940e38514610768578063fc1960681461077b575f80fd5b8063de7ea7c614610713578063e9c50ff714610726575f80fd5b8063c2db09c114610696578063d219f395146106de578063d547741f146106f1578063d681afb514610704575f80fd5b806391d148541161010d578063a361654a116100f3578063a361654a1461063e578063b658e67314610653578063b7eec41314610681575f80fd5b806391d14854146105ff578063a217fddf14610637575f80fd5b806377329f35146105b25780637ecebe00146105c55780638129fc1c146105e45780638acbf3de146105ec575f80fd5b806336568abe116101cd5780635684aa461161019d57806364e8d1801161018357806364e8d180146105795780636c912dad1461058c578063714b25231461059f575f80fd5b80635684aa46146104d85780635dadb2dc14610558575f80fd5b806336568abe14610418578063382e85ad1461042b5780633bbd64bc1461043e57806344e250f814610466575f80fd5b8063248a9ca311610208578063248a9ca3146102b4578063249e6d9c146102e45780632f2ff15d1461035e5780633644e51514610371575f80fd5b80630149e46f1461023957806301ffc9a71461024e57806310d6667714610276578063232b956c146102a1575b5f80fd5b61024c610247366004614276565b61078e565b005b61026161025c366004614291565b6108e6565b60405190151581526020015b60405180910390f35b6102896102843660046142b8565b61094e565b6040516001600160a01b03909116815260200161026d565b6102896102af3660046142b8565b610976565b6102d66102c23660046142b8565b5f9081526065602052604090206001015490565b60405190815260200161026d565b6103496102f23660046142ee565b6001600160a01b039283165f9081526097602090815260408083209386168352928152828220959094168152600b9094018352808420911515845291529020546001600160801b03600160801b8204811692911690565b6040805192835260208301919091520161026d565b61024c61036c366004614345565b610985565b6102d6604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f2c55a9465497be0b743b67bd2d3ee61e8212e4c4aa51feb7beee992dcf383117918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b61024c610426366004614345565b6109ae565b6102d661043936600461456c565b6109d0565b61028961044c366004614276565b609d6020525f90815260409020546001600160a01b031681565b6104bd6104743660046145cc565b6001600160a01b039182165f908152609760209081526040808320939094168252919091522060078101546004909101546001600160801b0380831693600160801b9093041691565b6040805193845260208401929092529082015260600161026d565b6105316104e63660046145cc565b6001600160a01b039182165f90815260976020908152604080832093909416825291909152206008015463ffffffff808216926401000000008304821692600160401b900490911690565b6040805163ffffffff9485168152928416602084015292169181019190915260600161026d565b61056b6105663660046145f8565b610b66565b60405161026d92919061469b565b61024c6105873660046145cc565b610e88565b61024c61059a366004614276565b610ec0565b61056b6105ad3660046146f3565b611042565b61056b6105c0366004614276565b6110b2565b6102d66105d3366004614276565b609b6020525f908152604090205481565b61024c611128565b6102d66105fa3660046145cc565b6111e2565b61026161060d366004614345565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6102d65f81565b6106466111fc565b60405161026d91906147cb565b6102d6610661366004614276565b6001600160a01b03165f9081526097602052604090206002015460ff1690565b610689611395565b60405161026d919061487b565b6106c56106a4366004614276565b60976020525f90815260409020600281015460039091015460ff9091169082565b6040805160ff909316835260208301919091520161026d565b61056b6106ec3660046146f3565b6113f5565b61024c6106ff366004614345565b611452565b6102d6670de0b6b3a763ffff81565b61024c6107213660046148c8565b611476565b610261610734366004614276565b60986020525f908152604090205460ff1681565b61075b6107563660046145cc565b611fd2565b60405161026d9190614a42565b61024c6107763660046145cc565b612141565b6104bd610789366004614b7d565b6121c8565b60408051600180825281830190925233915f9190816020015b604080518082019091525f80825260208201528152602001906001900390816107a7579050506040805180820182525f815290516370a0823160e01b81526001600160a01b03868116600483015292935090916020830191908516906370a0823190602401602060405180830381865afa158015610827573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061084b9190614bbb565b815250815f8151811061086057610860614bd2565b6020908102919091018101919091526001600160a01b0383165f9081526097909152604081206002810154909160ff909116905b81816001600160801b031610156108de576001600160801b0381165f9081526001840160205260409020546108d690879087906001600160a01b03168761220d565b600101610894565b505050505050565b5f6001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061094857507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6099818154811061095d575f80fd5b5f918252602090912001546001600160a01b0316905081565b609a818154811061095d575f80fd5b5f8281526065602052604090206001015461099f8161255e565b6109a98383612568565b505050565b6001600160a01b03811633146109c2575f80fd5b6109cc8282612608565b5050565b5f805b8451811015610b5e575f8582815181106109ef576109ef614bd2565b60209081029190910181015180516001600160a01b039081165f90815260978452604080822092891682529382905292832060028201549294509092909160ff169003610a44578360010193505050506109d3565b8251602084015160088301545f92610a659290918b9063ffffffff16612689565b90505f805b8251811015610b0f576001600160a01b038a165f908152600b8501602052604081208451909190859084908110610aa357610aa3614bd2565b60209081029190910181015151151582528101919091526040015f2054610ada90600160801b90046001600160801b031689614bfa565b9750828181518110610aee57610aee614bd2565b60200260200101516020015182610b059190614bfa565b9150600101610a6a565b508015610b4e57610b4189896040518060400160405280895f01516001600160a01b031681526020018681525061287f565b610b4b9088614bfa565b96505b85600101955050505050506109d3565b509392505050565b609c54606090819083906001600160a01b031615610b8657610b86614c0d565b4281604001351015610b9a57610b9a614c0d565b5f6001610c44604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f2c55a9465497be0b743b67bd2d3ee61e8212e4c4aa51feb7beee992dcf383117918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b7f8b66e7894ecc5180298853ab3de30e198ac84d63bc1587efdff2eaa728ec269e610c726020860186614276565b33610c806020880188614c21565b609b5f610c9060208c018c614276565b6001600160a01b0316815260208082019290925260409081015f208054600181019091558151610ccb98979695949391928d01359101614c6e565b60405160208183030381529060405280519060200120604051602001610d239291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b60408051601f198184030181529190528051602090910120610d4b6080850160608601614cf4565b604080515f8152602081018083529390935260ff90911690820152608080850135606083015260a08086013591830191909152016020604051602081039080840390855afa158015610d9f573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b03811615801590610de15750610dcc6020830183614276565b6001600160a01b0316816001600160a01b0316145b610ded57610ded614c0d565b610dfa6020830183614276565b609c80546001600160a01b0319166001600160a01b039290921691909117905550610e638533610e2d6020880188614c21565b808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152506113f592505050565b92509250609c546001600160a01b031615610e8057610e80614c0d565b509250929050565b5f610e928161255e565b506001600160a01b039182165f908152609d6020526040902080546001600160a01b03191691909216179055565b60408051600180825281830190925233915f9190816020015b604080518082019091525f8082526020820152815260200190600190039081610ed957905050604051632f2e037160e11b81526001600160a01b0385811660048301529192505f91841690635e5c06e290602401606060405180830381865afa158015610f48573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f6c9190614d0f565b6001600160a01b0386165f9081526097602052604081206002810154929550935060ff90911691505b81816001600160801b03161015611039576001600160801b0381165f90815260018085016020908152604080842054815180830183529384526001600160a01b031680855287835293206008015490820190610ffa908a908c9063ffffffff166129dc565b6110049088614bfa565b815250865f8151811061101957611019614bd2565b60200260200101819052506110308833838961220d565b50600101610f95565b50505050505050565b6001600160a01b038281165f908152609d60205260409020546060918291163314611099576040517ff512b27800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110a585858686612bc1565b915091505b935093915050565b60608061111f6110c06111fc565b84609980548060200260200160405190810160405280929190818152602001828054801561111557602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116110f7575b50505050506113f5565b91509150915091565b5f54610100900460ff161580801561114657505f54600160ff909116105b8061115f5750303b15801561115f57505f5460ff166001145b611167575f80fd5b5f805460ff191660011790558015611188575f805461ff0019166101001790555b611190612f35565b61119a5f33612568565b80156111df575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b5f6111f56111ee6111fc565b84846109d0565b9392505050565b60605f609a80548060200260200160405190810160405280929190818152602001828054801561125357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611235575b50505050509050805167ffffffffffffffff81111561127457611274614373565b6040519080825280602002602001820160405280156112b957816020015b604080518082019091525f8152606060208201528152602001906001900390816112925790505b5091505f5b8151811015611390576040805160028082526060820183525f926020830190803683370190505090506001815f815181106112fb576112fb614bd2565b6020026020010190151590811515815250505f8160018151811061132157611321614bd2565b602002602001019015159081151581525050604051806040016040528084848151811061135057611350614bd2565b60200260200101516001600160a01b031681526020018281525084838151811061137c5761137c614bd2565b6020908102919091010152506001016112be565b505090565b606060998054806020026020016040519081016040528092919081815260200182805480156113eb57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116113cd575b5050505050905090565b609c5460609081906001600160a01b031661141d57609c80546001600160a01b031916331790555b609c546114369086906001600160a01b03168686612bc1565b609c80546001600160a01b031916905590969095509350505050565b5f8281526065602052604090206001015461146c8161255e565b6109a98383612608565b5f6114808161255e565b5f5b82518110156109a957670de0b6b3a76400008382815181106114a6576114a6614bd2565b6020026020010151610140015167ffffffffffffffff16106114db576040516306b7c75960e31b815260040160405180910390fd5b8281815181106114ed576114ed614bd2565b60200260200101516101a0015167ffffffffffffffff165f03611523576040516306b7c75960e31b815260040160405180910390fd5b5f60975f85848151811061153957611539614bd2565b60200260200101515f01516001600160a01b03166001600160a01b031681526020019081526020015f2090505f815f015f86858151811061157c5761157c614bd2565b6020026020010151602001516001600160a01b03166001600160a01b031681526020019081526020015f20905081600301545f0361160457609a8584815181106115c8576115c8614bd2565b6020908102919091018101515182546001810184555f938452919092200180546001600160a01b0319166001600160a01b039092169190911790555b60985f86858151811061161957611619614bd2565b6020908102919091018101518101516001600160a01b031682528101919091526040015f205460ff166116f057600160985f87868151811061165d5761165d614bd2565b6020026020010151602001516001600160a01b03166001600160a01b031681526020019081526020015f205f6101000a81548160ff02191690831515021790555060998584815181106116b2576116b2614bd2565b60209081029190910181015181015182546001810184555f938452919092200180546001600160a01b0319166001600160a01b039092169190911790555b6008810154600160401b900463ffffffff165f036118f45784838151811061171a5761171a614bd2565b602090810291909101810151015160028301805460018501915f9160ff16908261174383614d3a565b91906101000a81548160ff021916908360ff16021790555060ff166001600160801b031681526020019081526020015f205f6101000a8154816001600160a01b0302191690836001600160a01b031602179055508483815181106117a9576117a9614bd2565b60200260200101515f01516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117ef573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118139190614d58565b61181e90600a614e4e565b6003830155845185908490811061183757611837614bd2565b602002602001015160600151816008015f6101000a81548163ffffffff021916908363ffffffff16021790555084838151811061187657611876614bd2565b6020026020010151606001518160080160086101000a81548163ffffffff021916908363ffffffff1602179055508483815181106118b6576118b6614bd2565b6020026020010151608001518584815181106118d4576118d4614bd2565b602002602001015160c001516118ea9190614e70565b6001820155611c25565b600881015460408051600180825281830190925263ffffffff80841693640100000000900416915f9190602080830190803683370190505090506001815f8151811061194257611942614bd2565b6020026020010190151590811515815250506119c05f89888151811061196a5761196a614bd2565b60200260200101515f01518a898151811061198757611987614bd2565b6020026020010151602001516119bb8c8b815181106119a8576119a8614bd2565b60200260200101515f0151865f8a612689565b61220d565b8163ffffffff16421015611b1b575f808463ffffffff16421115611ab2576008860154611a079063ffffffff6c010000000000000000000000009091048116908716612f49565b611a119042614e83565b8660010154611a209190614e96565b8660090154611a2f9190614bfa565b9150611a4163ffffffff861642614e83565b9050818a8981518110611a5657611a56614bd2565b602002602001015160c00151111580611a8c5750808a8981518110611a7d57611a7d614bd2565b60200260200101516080015111155b15611aaa576040516306b7c75960e31b815260040160405180910390fd5b600986018290555b808a8981518110611ac557611ac5614bd2565b602002602001015160800151611adb9190614e83565b828b8a81518110611aee57611aee614bd2565b602002602001015160c00151611b049190614e83565b611b0e9190614e70565b600187015550611c219050565b878681518110611b2d57611b2d614bd2565b602090810291909101015160600151600885015463ffffffff908116911614611c2157878681518110611b6257611b62614bd2565b602002602001015160600151846008015f6101000a81548163ffffffff021916908363ffffffff160217905550878681518110611ba157611ba1614bd2565b6020026020010151606001518460080160086101000a81548163ffffffff021916908363ffffffff160217905550878681518110611be157611be1614bd2565b602002602001015160800151888781518110611bff57611bff614bd2565b602002602001015160c00151611c159190614e70565b60018501555f60098501555b5050505b6008810180547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c010000000000000000000000004263ffffffff16021790558451859084908110611c7a57611c7a614bd2565b6020908102919091010151608001516008820154611c9e919063ffffffff16614ead565b8160080160046101000a81548163ffffffff021916908363ffffffff160217905550848381518110611cd257611cd2614bd2565b60200260200101516040015181600a015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550848381518110611d1757611d17614bd2565b602002602001015160c001518160020181905550848381518110611d3d57611d3d614bd2565b602002602001015160a00151815f0181905550848381518110611d6257611d62614bd2565b602002602001015160e001518160030181905550848381518110611d8857611d88614bd2565b60200260200101516101000151816005015f6101000a8154816001600160801b030219169083600f0b6001600160801b03160217905550848381518110611dd157611dd1614bd2565b602002602001015161012001518160050160106101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550848381518110611e1a57611e1a614bd2565b60200260200101516101600151816006015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550848381518110611e6257611e62614bd2565b602002602001015161018001518160060160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550848381518110611eab57611eab614bd2565b602002602001015161014001518160050160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550848381518110611ef457611ef4614bd2565b60200260200101516101a001518160060160106101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550848381518110611f3d57611f3d614bd2565b6020026020010151602001516001600160a01b0316858481518110611f6457611f64614bd2565b60200260200101515f01516001600160a01b03167fbb1f0f9f2e246d18022362060458bdfde9ab9b4e4eb514b800b155df7ea8ecac878681518110611fab57611fab614bd2565b6020026020010151604051611fc09190614a42565b60405180910390a35050600101611482565b604080516101c0810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a08101919091526001600160a01b038084165f8181526097602090815260408083208786168085529083529281902081516101c08101835294855291840192909252600a81015490931690820152600882015463ffffffff8082166060840181905260808401926120b59264010000000090910416614ec9565b63ffffffff1681528254602082015260028301546040820152600383015460608201526005830154600f81900b608083015267ffffffffffffffff600160801b808304821660a0850152600160c01b909204811660c084015260069094015480851660e0840152600160401b810485166101008401520490921661012090920191909152905092915050565b5f61214b8161255e565b6040516370a0823160e01b81523060048201526109a99083906001600160a01b038616906370a0823190602401602060405180830381865afa158015612193573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121b79190614bbb565b6001600160a01b0386169190612f5e565b6001600160a01b038084165f9081526097602090815260408083209386168352929052908120819081906121fd908786612fc8565b9250925092505b93509350939050565b6001600160a01b038381165f9081526097602090815260408083206003810154948716845290915290206008810154600160401b900463ffffffff16428110801561227657506008820154640100000000900463ffffffff168110806122765750600482015415155b15612396575f8080612292858a61228d8742614e83565b612fc8565b919450925090506001600160801b038311806122b457506001600160801b0382115b156122eb576040517f7decd25700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160801b03828116600160801b0290841617600786015560088501805463ffffffff42908116600160401b026bffffffff0000000000000000199092169190911790915560048601829055604080518581526020810185905290810183905260608101919091526001600160a01b0389811691908b16907f1be815035b13056fba0f0dcbaec5d30add5d95e5f1b6990581607fbccdc930509060800160405180910390a35050505b506001600160a01b0386165f908152600b820160205260408120905b8451811015612554575f8582815181106123ce576123ce614bd2565b602090810291909101810151805115155f90815291859052604082208054825192945090926001600160801b039091169115612418575060078601546001600160801b031661242f565b506007860154600160801b90046001600160801b03165b8082146125455782547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b038216178355602084015115612545575f612482856020015183858c613bf7565b8454909150819085906010906124a9908490600160801b90046001600160801b0316614ee5565b92506101000a8154816001600160801b0302191690836001600160801b031602179055508c6001600160a01b03168b6001600160a01b03168d6001600160a01b03167fc4278cd1497fedb2697092108a0141a0cbecdd1472913b6e803010998aa63537885f015187878760405161253b9493929190931515845260208401929092526040830152606082015260800190565b60405180910390a4505b846001019450505050506123b2565b5050505050505050565b6111df8133613c16565b5f8281526065602090815260408083206001600160a01b038516845290915290205460ff166109cc575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556125c43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f8281526065602090815260408083206001600160a01b038516845290915290205460ff16156109cc575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6060835167ffffffffffffffff8111156126a5576126a5614373565b6040519080825280602002602001820160405280156126e957816020015b604080518082019091525f80825260208201528152602001906001900390816126c35790505b5090505f5b84518110156128765784818151811061270957612709614bd2565b6020026020010151156127d457604051632f2e037160e11b81526001600160a01b0385811660048301525f9190881690635e5c06e290602401606060405180830381865afa15801561275d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127819190614d0f565b9250505060405180604001604052806001151581526020016127a48988886129dc565b6127ae9084614bfa565b8152508383815181106127c3576127c3614bd2565b60200260200101819052505061286e565b6040805180820182525f815290516370a0823160e01b81526001600160a01b0386811660048301526020830191908916906370a0823190602401602060405180830381865afa158015612829573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061284d9190614bbb565b81525082828151811061286257612862614bd2565b60200260200101819052505b6001016126ee565b50949350505050565b80516001600160a01b039081165f908152609760208181526040808420878616855282528084208651909516845291905281206003015460088301548451929392600160401b90910463ffffffff1690849081906128f09086904286106128e6575f612fc8565b61228d8642614e83565b506001600160a01b038b165f908152600b8801602052604081209294509092505b8860200151518110156129ce575f8960200151828151811061293557612935614bd2565b60200260200101515f01511561294c57508361294f565b50825b6129b98a60200151838151811061296857612968614bd2565b60200260200101516020015182855f8e60200151878151811061298d5761298d614bd2565b60209081029190910181015151151582528101919091526040015f20546001600160801b03168a613bf7565b6129c3908a614bfa565b985050600101612911565b505050505050509392505050565b5f806224ea006129f28163ffffffff8616614f04565b612a029063ffffffff8616614e83565b612a0c9190614bfa565b90505f856001600160a01b0316630e52dbec6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a4b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a6f9190614d58565b612a7f9060ff166224ea00614e96565b612a8c6224ea0042614f04565b612a969042614e83565b612aa09190614bfa565b9050815b818111612b4f576040517fd2681a0b000000000000000000000000000000000000000000000000000000008152600481018290526001600160a01b0387811660248301525f919089169063d2681a0b906044016040805180830381865afa158015612b11573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b359190614f17565b509050612b428186614bfa565b9450506224ea0001612aa4565b50604051635fb9165160e11b8152600481018490526001600160a01b0387169063bf722ca290602401602060405180830381865afa158015612b93573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612bb79190614bbb565b9695505050505050565b606080825167ffffffffffffffff811115612bde57612bde614373565b604051908082528060200260200182016040528015612c07578160200160208202803683370190505b5090505f5b8651811015612e46575f878281518110612c2857612c28614bd2565b60209081029190910181015180516001600160a01b03165f908152609790925260408220909250905b600282015460ff166001600160801b0382161015612ccd5782516001600160801b0382165f9081526001840160209081526040808320548751838901516001600160a01b03909216808652938890529190932060080154612cc5948e949093926119bb92909190869063ffffffff16612689565b600101612c51565b505f5b8651811015612e38575f825f015f898481518110612cf057612cf0614bd2565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2090505f5b846020015151811015612e2e576001600160a01b038b165f908152600b830160209081526040822090870151805183919085908110612d5c57612d5c614bd2565b602090810291909101810151151582528101919091526040015f2054600160801b90046001600160801b031690508015612e255780888581518110612da357612da3614bd2565b60200260200101818151612db79190614bfa565b9052506001600160a01b038c165f908152600b840160209081526040822090880151805183919086908110612dee57612dee614bd2565b602090810291909101810151151582528101919091526040015f2080546001600160801b03928316600160801b0292169190911790555b50600101612d1b565b5050600101612cd0565b508260010192505050612c0c565b505f5b8351811015612f28575f828281518110612e6557612e65614bd2565b602002602001015190505f811115612f1f57612eae8682878581518110612e8e57612e8e614bd2565b60200260200101516001600160a01b0316612f5e9092919063ffffffff16565b856001600160a01b0316858381518110612eca57612eca614bd2565b60200260200101516001600160a01b0316886001600160a01b03167fc1405953cccdad6b442e266c84d66ad671e2534c6584f8e6ef92802f7ad294d584604051612f1691815260200190565b60405180910390a45b50600101612e49565b5082915094509492505050565b5f54610100900460ff16612f47575f80fd5b565b5f818311612f5757816111f5565b5090919050565b5f6040517fa9059cbb000000000000000000000000000000000000000000000000000000005f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f606052806040525080612fc2575f80fd5b50505050565b5f805f612ff260405180608001604052805f81526020015f81526020015f81526020015f81525090565b856001600160a01b0316631a90f1866040518163ffffffff1660e01b8152600401602060405180830381865afa15801561302e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906130529190614bbb565b816040018181525050856001600160a01b0316632e0af0086040518163ffffffff1660e01b8152600401602060405180830381865afa158015613097573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906130bb9190614bbb565b6060828101919091526040805191820181525f908201819052600889015463ffffffff8082168085526401000000009092041660208401526224ea0090613103908290614f04565b835161310f9190614e83565b6131199190614bfa565b90505f886001600160a01b0316630e52dbec6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613158573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061317c9190614d58565b61318c9060ff166224ea00614e96565b6131996224ea0042614f04565b6131a39042614e83565b6131ad9190614bfa565b90505f825b828111613254576040517f0ab69be8000000000000000000000000000000000000000000000000000000008152600481018290525f906001600160a01b038d1690630ab69be8906024016040805180830381865afa158015613216573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061323a9190614f17565b5090506132478184614bfa565b9250506224ea00016131b2565b508085604001516132659190614bfa565b8552604051635fb9165160e11b8152600481018290526001600160a01b038b169063bf722ca290602401602060405180830381865afa1580156132aa573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132ce9190614bbb565b60208601525050885483515f925081116132f057670de0b6b3a76400006132fc565b83516132fc9082613c77565b60018b015460048c0154855160208701519395505f94509192909161332091614e83565b604086018190525f90613333575f613363565b613363858760400151670de0b6b3a764000061334f9190614e96565b8f60030154613c879092919063ffffffff16565b9050856020015142116134415780156133e8575f6133926133848d84614e96565b61338d90614f39565b613ca5565b90506133cc6133a982670de0b6b3a7640000614e83565b6133c66133be89670de0b6b3a7640000614e83565b879086613c87565b90613e39565b6133d68483613e4d565b6133e09190614bfa565b98505061341c565b8a6134056133fe87670de0b6b3a7640000614e83565b8590613e4d565b61340f9190614e96565b6134199083614bfa565b97505b6134268289614f53565b6134308c85614e96565b61343a9190614f53565b93506135ae565b602086015160088e0154600160401b900463ffffffff1611156134a65761348761346e6133848d84614e96565b61348090670de0b6b3a7640000614e83565b8390613e39565b6134919083614e83565b975061349d8289614f53565b61343a90614f39565b60088d015460208701515f916134ca91600160401b90910463ffffffff1690614e83565b9b508115613511576134df6133848d84614e96565b90506134f66133a982670de0b6b3a7640000614e83565b6135008483613e4d565b61350a9190614bfa565b9850613545565b8b61352e61352788670de0b6b3a7640000614e83565b8690613e4d565b6135389190614e96565b6135429084614bfa565b98505b6135628760200151426135589190614e83565b6133849084614e96565b905061358061357982670de0b6b3a7640000614e83565b8a90613e39565b61358a908a614e83565b9850613596838a614f53565b6135a08d86614e96565b6135aa9190614f53565b9450505b835f036135df5750505060078a01546001600160801b038082169850600160801b9091041695506122049350505050565b5050506136286040518061012001604052805f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b6136e885606001515f0361363c575f6136da565b6136c886606001518c6001600160a01b0316638c3cba5a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613680573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906136a49190614bbb565b886040015189606001516136b89190614e83565b6136c29190614e83565b90613c77565b6136da90670de0b6b3a7640000614e83565b670de0b6b3a763ffff613e61565b80825260058c015467ffffffffffffffff600160c01b8204811660c0850152600f9190910b60e084015260068d015416610100830152613728575f6137d6565b6137d66137b5670de0b6b3a76400006137656137608560c00151670de0b6b3a76400006137559190614e83565b60c087015190613c77565b613e6f565b8451613789906137609061378190670de0b6b3a7640000614e83565b875190613c77565b6137939190614f53565b8460e001516137a29190614f72565b6137ab90614f39565b61338d9190614fa1565b6137c790670de0b6b3a7640000614bfa565b670de0b6b3a764000090613c77565b602082018190526139b1906137f390670de0b6b3a7640000614e83565b61398583610100015161398b61387c8f6001600160a01b031663666010326040518163ffffffff1660e01b8152600401602060405180830381865afa15801561383e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906138629190614bbb565b61387490670de0b6b3a7640000614e83565b875190613e39565b61388e90670de0b6b3a7640000614e83565b8f6001600160a01b031663f3fdb15a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156138ca573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906138ee9190614fcd565b6001600160a01b0316637c21fb1d8c606001515f0361390d575f613920565b60608d015160408e015161392091613c77565b895160405160e084901b6001600160e01b031916815260048101929092526024820152604401602060405180830381865afa158015613961573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906139859190614bbb565b90613e4d565b6139959190614bfa565b60058f0154600160801b900467ffffffffffffffff1690613e4d565b6040820152602081015160068c01546139dc91600160801b90910467ffffffffffffffff1690613e4d565b613a138260200151670de0b6b3a76400006139f79190614e83565b60068e0154600160401b900467ffffffffffffffff1690613e4d565b613a1d9190614bfa565b606082018190526040820151613a4191613a3691614bfa565b604083015190613c77565b60808201819052613a5a90670de0b6b3a7640000614e83565b8160a00181815250505f8a6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613aa0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613ac49190614bbb565b90505f86602001518c6001600160a01b0316638d0e5f026040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b08573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613b2c9190614bbb565b613b369190614bfa565b6001600160a01b038d165f9081526097602052604090206003015490915081613b5f575f613b82565b613b828183613b7b876080015189613e4d90919063ffffffff16565b9190613c87565b60078f0154613b9a91906001600160801b0316614bfa565b9a505f8311613ba9575f613bc5565b613bc58184613b7b8760a0015189613e4d90919063ffffffff16565b60078f0154613be49190600160801b90046001600160801b0316614bfa565b9950505050505050505093509350939050565b5f613c0d613c058486614e83565b869084613c87565b95945050505050565b5f8281526065602090815260408083206001600160a01b038516845290915290205460ff166109cc57613c488161401e565b613c53836020614030565b604051602001613c64929190614fff565b6040516020818303038152906040525f80fd5b5f6111f583670de0b6b3a7640000845b828202811515841585830485141716613c9e575f80fd5b0492915050565b5f680248ce36a70cb26b3e198213613cbe57505f919050565b680755bf798b4a1bf1e58212613cd2575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b5f6111f58383670de0b6b3a76400006141c7565b5f6111f58383670de0b6b3a7640000613c87565b5f818310612f5757816111f5565b5f808213613e7b575f80fd5b5f6060613e87846141f4565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d6c8c3f38e95a6b1ff2ab1c3b343619018302821d6d02384773bdf1ac5676facced60901901830290911d6cb9a025d814b29c212b8b1a07cd19019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60606109486001600160a01b03831660145b60605f61403e836002614e96565b614049906002614bfa565b67ffffffffffffffff81111561406157614061614373565b6040519080825280601f01601f19166020018201604052801561408b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000815f815181106140c1576140c1614bd2565b60200101906001600160f81b03191690815f1a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061410b5761410b614bd2565b60200101906001600160f81b03191690815f1a9053505f61412d846002614e96565b614138906001614bfa565b90505b60018111156141bc577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061417957614179614bd2565b1a60f81b82828151811061418f5761418f614bd2565b60200101906001600160f81b03191690815f1a90535060049490941c936141b581615060565b905061413b565b5083156111f5575f80fd5b8282028115158415858304851417166141de575f80fd5b6001826001830304018115150290509392505050565b5f808211614200575f80fd5b5060016001600160801b03821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b6001600160a01b03811681146111df575f80fd5b5f60208284031215614286575f80fd5b81356111f581614262565b5f602082840312156142a1575f80fd5b81356001600160e01b0319811681146111f5575f80fd5b5f602082840312156142c8575f80fd5b5035919050565b80356142da81614262565b919050565b803580151581146142da575f80fd5b5f805f8060808587031215614301575f80fd5b843561430c81614262565b9350602085013561431c81614262565b925061432a604086016142df565b9150606085013561433a81614262565b939692955090935050565b5f8060408385031215614356575f80fd5b82359150602083013561436881614262565b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156143aa576143aa614373565b60405290565b6040516101c0810167ffffffffffffffff811182821017156143aa576143aa614373565b604051601f8201601f1916810167ffffffffffffffff811182821017156143fd576143fd614373565b604052919050565b5f67ffffffffffffffff82111561441e5761441e614373565b5060051b60200190565b5f82601f830112614437575f80fd5b813561444a61444582614405565b6143d4565b8082825260208201915060208360051b86010192508583111561446b575f80fd5b602085015b8381101561456257803567ffffffffffffffff81111561448e575f80fd5b86016040818903601f190112156144a3575f80fd5b6144ab614387565b60208201356144b981614262565b8152604082013567ffffffffffffffff8111156144d4575f80fd5b60208184010192505088601f8301126144eb575f80fd5b81356144f961444582614405565b8082825260208201915060208360051b86010192508b83111561451a575f80fd5b6020850194505b8285101561454357614532856142df565b825260209485019490910190614521565b8060208501525050508085525050602083019250602081019050614470565b5095945050505050565b5f805f6060848603121561457e575f80fd5b833567ffffffffffffffff811115614594575f80fd5b6145a086828701614428565b93505060208401356145b181614262565b915060408401356145c181614262565b809150509250925092565b5f80604083850312156145dd575f80fd5b82356145e881614262565b9150602083013561436881614262565b5f8060408385031215614609575f80fd5b823567ffffffffffffffff81111561461f575f80fd5b61462b85828601614428565b925050602083013567ffffffffffffffff811115614647575f80fd5b830160c08186031215614368575f80fd5b5f8151808452602084019350602083015f5b828110156146915781516001600160a01b031686526020958601959091019060010161466a565b5093949350505050565b604081525f6146ad6040830185614658565b82810360208401528084518083526020830191506020860192505f5b818110156146e75783518352602093840193909201916001016146c9565b50909695505050505050565b5f805f60608486031215614705575f80fd5b833567ffffffffffffffff81111561471b575f80fd5b61472786828701614428565b935050602084013561473881614262565b9150604084013567ffffffffffffffff811115614753575f80fd5b8401601f81018613614763575f80fd5b803561477161444582614405565b8082825260208201915060208360051b850101925088831115614792575f80fd5b6020840193505b828410156147bd5783356147ac81614262565b825260209384019390910190614799565b809450505050509250925092565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561486f57868503603f19018452815180516001600160a01b03168652602090810151604082880181905281519088018190529101905f9060608801905b8083101561485757835115158252602082019150602084019350600183019250614832565b509650505060209384019391909101906001016147f1565b50929695505050505050565b602081525f6111f56020830184614658565b803563ffffffff811681146142da575f80fd5b8035600f81900b81146142da575f80fd5b803567ffffffffffffffff811681146142da575f80fd5b5f602082840312156148d8575f80fd5b813567ffffffffffffffff8111156148ee575f80fd5b8201601f810184136148fe575f80fd5b803561490c61444582614405565b8082825260208201915060206101c0840285010192508683111561492e575f80fd5b6020840193505b82841015612bb7576101c0848803121561494d575f80fd5b6149556143b0565b61495e856142cf565b815261496c602086016142cf565b602082015261497d604086016142cf565b604082015261498e6060860161488d565b60608201526080858101359082015260a0808601359082015260c0808601359082015260e080860135908201526149c861010086016148a0565b6101008201526149db61012086016148b1565b6101208201526149ee61014086016148b1565b610140820152614a0161016086016148b1565b610160820152614a1461018086016148b1565b610180820152614a276101a086016148b1565b6101a082015282526101c09390930192602090910190614935565b81516001600160a01b031681526101c081016020830151614a6e60208401826001600160a01b03169052565b506040830151614a8960408401826001600160a01b03169052565b506060830151614aa1606084018263ffffffff169052565b506080830151608083015260a083015160a083015260c083015160c083015260e083015160e0830152610100830151614ae0610100840182600f0b9052565b50610120830151614afe61012084018267ffffffffffffffff169052565b50610140830151614b1c61014084018267ffffffffffffffff169052565b50610160830151614b3a61016084018267ffffffffffffffff169052565b50610180830151614b5861018084018267ffffffffffffffff169052565b506101a0830151614b766101a084018267ffffffffffffffff169052565b5092915050565b5f805f60608486031215614b8f575f80fd5b8335614b9a81614262565b92506020840135614baa81614262565b929592945050506040919091013590565b5f60208284031215614bcb575f80fd5b5051919050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b8082018082111561094857610948614be6565b634e487b7160e01b5f52600160045260245ffd5b5f808335601e19843603018112614c36575f80fd5b83018035915067ffffffffffffffff821115614c50575f80fd5b6020019150600581901b3603821315614c67575f80fd5b9250929050565b8781526001600160a01b0387811660208301528616604082015260c06060820181905281018490525f8560e08301825b87811015614cce578235614cb181614262565b6001600160a01b0316825260209283019290910190600101614c9e565b506080840195909552505060a0015295945050505050565b60ff811681146111df575f80fd5b5f60208284031215614d04575f80fd5b81356111f581614ce6565b5f805f60608486031215614d21575f80fd5b5050815160208301516040909301519094929350919050565b5f60ff821660ff8103614d4f57614d4f614be6565b60010192915050565b5f60208284031215614d68575f80fd5b81516111f581614ce6565b6001815b60018411156110aa57808504811115614d9257614d92614be6565b6001841615614da057908102905b60019390931c928002614d77565b5f82614dbc57506001610948565b81614dc857505f610948565b8160018114614dde5760028114614de857614e04565b6001915050610948565b60ff841115614df957614df9614be6565b50506001821b610948565b5060208310610133831016604e8410600b8410161715614e27575081810a610948565b614e335f198484614d73565b805f1904821115614e4657614e46614be6565b029392505050565b5f6111f560ff841683614dae565b634e487b7160e01b5f52601260045260245ffd5b5f82614e7e57614e7e614e5c565b500490565b8181038181111561094857610948614be6565b808202811582820484141761094857610948614be6565b63ffffffff818116838216019081111561094857610948614be6565b63ffffffff828116828216039081111561094857610948614be6565b6001600160801b03818116838216019081111561094857610948614be6565b5f82614f1257614f12614e5c565b500690565b5f8060408385031215614f28575f80fd5b505080516020909101519092909150565b5f600160ff1b8203614f4d57614f4d614be6565b505f0390565b8181035f831280158383131683831282161715614b7657614b76614be6565b8082025f8212600160ff1b84141615614f8d57614f8d614be6565b818105831482151761094857610948614be6565b5f82614faf57614faf614e5c565b600160ff1b82145f1984141615614fc857614fc8614be6565b500590565b5f60208284031215614fdd575f80fd5b81516111f581614262565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f6150306017830185614fe8565b7f206973206d697373696e6720726f6c65200000000000000000000000000000008152613c0d6011820185614fe8565b5f8161506e5761506e614be6565b505f19019056fea26469706673582212200d0c969dbe5e231557e9807e2c176f734b25787b7efa829c13afe35d09c10b4664736f6c634300081a0033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610235575f3560e01c806377329f351161013d578063c2db09c1116100b8578063de7ea7c611610088578063f2426f9a1161006e578063f2426f9a14610748578063f940e38514610768578063fc1960681461077b575f80fd5b8063de7ea7c614610713578063e9c50ff714610726575f80fd5b8063c2db09c114610696578063d219f395146106de578063d547741f146106f1578063d681afb514610704575f80fd5b806391d148541161010d578063a361654a116100f3578063a361654a1461063e578063b658e67314610653578063b7eec41314610681575f80fd5b806391d14854146105ff578063a217fddf14610637575f80fd5b806377329f35146105b25780637ecebe00146105c55780638129fc1c146105e45780638acbf3de146105ec575f80fd5b806336568abe116101cd5780635684aa461161019d57806364e8d1801161018357806364e8d180146105795780636c912dad1461058c578063714b25231461059f575f80fd5b80635684aa46146104d85780635dadb2dc14610558575f80fd5b806336568abe14610418578063382e85ad1461042b5780633bbd64bc1461043e57806344e250f814610466575f80fd5b8063248a9ca311610208578063248a9ca3146102b4578063249e6d9c146102e45780632f2ff15d1461035e5780633644e51514610371575f80fd5b80630149e46f1461023957806301ffc9a71461024e57806310d6667714610276578063232b956c146102a1575b5f80fd5b61024c610247366004614276565b61078e565b005b61026161025c366004614291565b6108e6565b60405190151581526020015b60405180910390f35b6102896102843660046142b8565b61094e565b6040516001600160a01b03909116815260200161026d565b6102896102af3660046142b8565b610976565b6102d66102c23660046142b8565b5f9081526065602052604090206001015490565b60405190815260200161026d565b6103496102f23660046142ee565b6001600160a01b039283165f9081526097602090815260408083209386168352928152828220959094168152600b9094018352808420911515845291529020546001600160801b03600160801b8204811692911690565b6040805192835260208301919091520161026d565b61024c61036c366004614345565b610985565b6102d6604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f2c55a9465497be0b743b67bd2d3ee61e8212e4c4aa51feb7beee992dcf383117918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b61024c610426366004614345565b6109ae565b6102d661043936600461456c565b6109d0565b61028961044c366004614276565b609d6020525f90815260409020546001600160a01b031681565b6104bd6104743660046145cc565b6001600160a01b039182165f908152609760209081526040808320939094168252919091522060078101546004909101546001600160801b0380831693600160801b9093041691565b6040805193845260208401929092529082015260600161026d565b6105316104e63660046145cc565b6001600160a01b039182165f90815260976020908152604080832093909416825291909152206008015463ffffffff808216926401000000008304821692600160401b900490911690565b6040805163ffffffff9485168152928416602084015292169181019190915260600161026d565b61056b6105663660046145f8565b610b66565b60405161026d92919061469b565b61024c6105873660046145cc565b610e88565b61024c61059a366004614276565b610ec0565b61056b6105ad3660046146f3565b611042565b61056b6105c0366004614276565b6110b2565b6102d66105d3366004614276565b609b6020525f908152604090205481565b61024c611128565b6102d66105fa3660046145cc565b6111e2565b61026161060d366004614345565b5f9182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6102d65f81565b6106466111fc565b60405161026d91906147cb565b6102d6610661366004614276565b6001600160a01b03165f9081526097602052604090206002015460ff1690565b610689611395565b60405161026d919061487b565b6106c56106a4366004614276565b60976020525f90815260409020600281015460039091015460ff9091169082565b6040805160ff909316835260208301919091520161026d565b61056b6106ec3660046146f3565b6113f5565b61024c6106ff366004614345565b611452565b6102d6670de0b6b3a763ffff81565b61024c6107213660046148c8565b611476565b610261610734366004614276565b60986020525f908152604090205460ff1681565b61075b6107563660046145cc565b611fd2565b60405161026d9190614a42565b61024c6107763660046145cc565b612141565b6104bd610789366004614b7d565b6121c8565b60408051600180825281830190925233915f9190816020015b604080518082019091525f80825260208201528152602001906001900390816107a7579050506040805180820182525f815290516370a0823160e01b81526001600160a01b03868116600483015292935090916020830191908516906370a0823190602401602060405180830381865afa158015610827573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061084b9190614bbb565b815250815f8151811061086057610860614bd2565b6020908102919091018101919091526001600160a01b0383165f9081526097909152604081206002810154909160ff909116905b81816001600160801b031610156108de576001600160801b0381165f9081526001840160205260409020546108d690879087906001600160a01b03168761220d565b600101610894565b505050505050565b5f6001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061094857507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6099818154811061095d575f80fd5b5f918252602090912001546001600160a01b0316905081565b609a818154811061095d575f80fd5b5f8281526065602052604090206001015461099f8161255e565b6109a98383612568565b505050565b6001600160a01b03811633146109c2575f80fd5b6109cc8282612608565b5050565b5f805b8451811015610b5e575f8582815181106109ef576109ef614bd2565b60209081029190910181015180516001600160a01b039081165f90815260978452604080822092891682529382905292832060028201549294509092909160ff169003610a44578360010193505050506109d3565b8251602084015160088301545f92610a659290918b9063ffffffff16612689565b90505f805b8251811015610b0f576001600160a01b038a165f908152600b8501602052604081208451909190859084908110610aa357610aa3614bd2565b60209081029190910181015151151582528101919091526040015f2054610ada90600160801b90046001600160801b031689614bfa565b9750828181518110610aee57610aee614bd2565b60200260200101516020015182610b059190614bfa565b9150600101610a6a565b508015610b4e57610b4189896040518060400160405280895f01516001600160a01b031681526020018681525061287f565b610b4b9088614bfa565b96505b85600101955050505050506109d3565b509392505050565b609c54606090819083906001600160a01b031615610b8657610b86614c0d565b4281604001351015610b9a57610b9a614c0d565b5f6001610c44604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f2c55a9465497be0b743b67bd2d3ee61e8212e4c4aa51feb7beee992dcf383117918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b7f8b66e7894ecc5180298853ab3de30e198ac84d63bc1587efdff2eaa728ec269e610c726020860186614276565b33610c806020880188614c21565b609b5f610c9060208c018c614276565b6001600160a01b0316815260208082019290925260409081015f208054600181019091558151610ccb98979695949391928d01359101614c6e565b60405160208183030381529060405280519060200120604051602001610d239291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b60408051601f198184030181529190528051602090910120610d4b6080850160608601614cf4565b604080515f8152602081018083529390935260ff90911690820152608080850135606083015260a08086013591830191909152016020604051602081039080840390855afa158015610d9f573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b03811615801590610de15750610dcc6020830183614276565b6001600160a01b0316816001600160a01b0316145b610ded57610ded614c0d565b610dfa6020830183614276565b609c80546001600160a01b0319166001600160a01b039290921691909117905550610e638533610e2d6020880188614c21565b808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152506113f592505050565b92509250609c546001600160a01b031615610e8057610e80614c0d565b509250929050565b5f610e928161255e565b506001600160a01b039182165f908152609d6020526040902080546001600160a01b03191691909216179055565b60408051600180825281830190925233915f9190816020015b604080518082019091525f8082526020820152815260200190600190039081610ed957905050604051632f2e037160e11b81526001600160a01b0385811660048301529192505f91841690635e5c06e290602401606060405180830381865afa158015610f48573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f6c9190614d0f565b6001600160a01b0386165f9081526097602052604081206002810154929550935060ff90911691505b81816001600160801b03161015611039576001600160801b0381165f90815260018085016020908152604080842054815180830183529384526001600160a01b031680855287835293206008015490820190610ffa908a908c9063ffffffff166129dc565b6110049088614bfa565b815250865f8151811061101957611019614bd2565b60200260200101819052506110308833838961220d565b50600101610f95565b50505050505050565b6001600160a01b038281165f908152609d60205260409020546060918291163314611099576040517ff512b27800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110a585858686612bc1565b915091505b935093915050565b60608061111f6110c06111fc565b84609980548060200260200160405190810160405280929190818152602001828054801561111557602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116110f7575b50505050506113f5565b91509150915091565b5f54610100900460ff161580801561114657505f54600160ff909116105b8061115f5750303b15801561115f57505f5460ff166001145b611167575f80fd5b5f805460ff191660011790558015611188575f805461ff0019166101001790555b611190612f35565b61119a5f33612568565b80156111df575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b5f6111f56111ee6111fc565b84846109d0565b9392505050565b60605f609a80548060200260200160405190810160405280929190818152602001828054801561125357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611235575b50505050509050805167ffffffffffffffff81111561127457611274614373565b6040519080825280602002602001820160405280156112b957816020015b604080518082019091525f8152606060208201528152602001906001900390816112925790505b5091505f5b8151811015611390576040805160028082526060820183525f926020830190803683370190505090506001815f815181106112fb576112fb614bd2565b6020026020010190151590811515815250505f8160018151811061132157611321614bd2565b602002602001019015159081151581525050604051806040016040528084848151811061135057611350614bd2565b60200260200101516001600160a01b031681526020018281525084838151811061137c5761137c614bd2565b6020908102919091010152506001016112be565b505090565b606060998054806020026020016040519081016040528092919081815260200182805480156113eb57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116113cd575b5050505050905090565b609c5460609081906001600160a01b031661141d57609c80546001600160a01b031916331790555b609c546114369086906001600160a01b03168686612bc1565b609c80546001600160a01b031916905590969095509350505050565b5f8281526065602052604090206001015461146c8161255e565b6109a98383612608565b5f6114808161255e565b5f5b82518110156109a957670de0b6b3a76400008382815181106114a6576114a6614bd2565b6020026020010151610140015167ffffffffffffffff16106114db576040516306b7c75960e31b815260040160405180910390fd5b8281815181106114ed576114ed614bd2565b60200260200101516101a0015167ffffffffffffffff165f03611523576040516306b7c75960e31b815260040160405180910390fd5b5f60975f85848151811061153957611539614bd2565b60200260200101515f01516001600160a01b03166001600160a01b031681526020019081526020015f2090505f815f015f86858151811061157c5761157c614bd2565b6020026020010151602001516001600160a01b03166001600160a01b031681526020019081526020015f20905081600301545f0361160457609a8584815181106115c8576115c8614bd2565b6020908102919091018101515182546001810184555f938452919092200180546001600160a01b0319166001600160a01b039092169190911790555b60985f86858151811061161957611619614bd2565b6020908102919091018101518101516001600160a01b031682528101919091526040015f205460ff166116f057600160985f87868151811061165d5761165d614bd2565b6020026020010151602001516001600160a01b03166001600160a01b031681526020019081526020015f205f6101000a81548160ff02191690831515021790555060998584815181106116b2576116b2614bd2565b60209081029190910181015181015182546001810184555f938452919092200180546001600160a01b0319166001600160a01b039092169190911790555b6008810154600160401b900463ffffffff165f036118f45784838151811061171a5761171a614bd2565b602090810291909101810151015160028301805460018501915f9160ff16908261174383614d3a565b91906101000a81548160ff021916908360ff16021790555060ff166001600160801b031681526020019081526020015f205f6101000a8154816001600160a01b0302191690836001600160a01b031602179055508483815181106117a9576117a9614bd2565b60200260200101515f01516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117ef573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118139190614d58565b61181e90600a614e4e565b6003830155845185908490811061183757611837614bd2565b602002602001015160600151816008015f6101000a81548163ffffffff021916908363ffffffff16021790555084838151811061187657611876614bd2565b6020026020010151606001518160080160086101000a81548163ffffffff021916908363ffffffff1602179055508483815181106118b6576118b6614bd2565b6020026020010151608001518584815181106118d4576118d4614bd2565b602002602001015160c001516118ea9190614e70565b6001820155611c25565b600881015460408051600180825281830190925263ffffffff80841693640100000000900416915f9190602080830190803683370190505090506001815f8151811061194257611942614bd2565b6020026020010190151590811515815250506119c05f89888151811061196a5761196a614bd2565b60200260200101515f01518a898151811061198757611987614bd2565b6020026020010151602001516119bb8c8b815181106119a8576119a8614bd2565b60200260200101515f0151865f8a612689565b61220d565b8163ffffffff16421015611b1b575f808463ffffffff16421115611ab2576008860154611a079063ffffffff6c010000000000000000000000009091048116908716612f49565b611a119042614e83565b8660010154611a209190614e96565b8660090154611a2f9190614bfa565b9150611a4163ffffffff861642614e83565b9050818a8981518110611a5657611a56614bd2565b602002602001015160c00151111580611a8c5750808a8981518110611a7d57611a7d614bd2565b60200260200101516080015111155b15611aaa576040516306b7c75960e31b815260040160405180910390fd5b600986018290555b808a8981518110611ac557611ac5614bd2565b602002602001015160800151611adb9190614e83565b828b8a81518110611aee57611aee614bd2565b602002602001015160c00151611b049190614e83565b611b0e9190614e70565b600187015550611c219050565b878681518110611b2d57611b2d614bd2565b602090810291909101015160600151600885015463ffffffff908116911614611c2157878681518110611b6257611b62614bd2565b602002602001015160600151846008015f6101000a81548163ffffffff021916908363ffffffff160217905550878681518110611ba157611ba1614bd2565b6020026020010151606001518460080160086101000a81548163ffffffff021916908363ffffffff160217905550878681518110611be157611be1614bd2565b602002602001015160800151888781518110611bff57611bff614bd2565b602002602001015160c00151611c159190614e70565b60018501555f60098501555b5050505b6008810180547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c010000000000000000000000004263ffffffff16021790558451859084908110611c7a57611c7a614bd2565b6020908102919091010151608001516008820154611c9e919063ffffffff16614ead565b8160080160046101000a81548163ffffffff021916908363ffffffff160217905550848381518110611cd257611cd2614bd2565b60200260200101516040015181600a015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550848381518110611d1757611d17614bd2565b602002602001015160c001518160020181905550848381518110611d3d57611d3d614bd2565b602002602001015160a00151815f0181905550848381518110611d6257611d62614bd2565b602002602001015160e001518160030181905550848381518110611d8857611d88614bd2565b60200260200101516101000151816005015f6101000a8154816001600160801b030219169083600f0b6001600160801b03160217905550848381518110611dd157611dd1614bd2565b602002602001015161012001518160050160106101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550848381518110611e1a57611e1a614bd2565b60200260200101516101600151816006015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550848381518110611e6257611e62614bd2565b602002602001015161018001518160060160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550848381518110611eab57611eab614bd2565b602002602001015161014001518160050160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550848381518110611ef457611ef4614bd2565b60200260200101516101a001518160060160106101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550848381518110611f3d57611f3d614bd2565b6020026020010151602001516001600160a01b0316858481518110611f6457611f64614bd2565b60200260200101515f01516001600160a01b03167fbb1f0f9f2e246d18022362060458bdfde9ab9b4e4eb514b800b155df7ea8ecac878681518110611fab57611fab614bd2565b6020026020010151604051611fc09190614a42565b60405180910390a35050600101611482565b604080516101c0810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a08101919091526001600160a01b038084165f8181526097602090815260408083208786168085529083529281902081516101c08101835294855291840192909252600a81015490931690820152600882015463ffffffff8082166060840181905260808401926120b59264010000000090910416614ec9565b63ffffffff1681528254602082015260028301546040820152600383015460608201526005830154600f81900b608083015267ffffffffffffffff600160801b808304821660a0850152600160c01b909204811660c084015260069094015480851660e0840152600160401b810485166101008401520490921661012090920191909152905092915050565b5f61214b8161255e565b6040516370a0823160e01b81523060048201526109a99083906001600160a01b038616906370a0823190602401602060405180830381865afa158015612193573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121b79190614bbb565b6001600160a01b0386169190612f5e565b6001600160a01b038084165f9081526097602090815260408083209386168352929052908120819081906121fd908786612fc8565b9250925092505b93509350939050565b6001600160a01b038381165f9081526097602090815260408083206003810154948716845290915290206008810154600160401b900463ffffffff16428110801561227657506008820154640100000000900463ffffffff168110806122765750600482015415155b15612396575f8080612292858a61228d8742614e83565b612fc8565b919450925090506001600160801b038311806122b457506001600160801b0382115b156122eb576040517f7decd25700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160801b03828116600160801b0290841617600786015560088501805463ffffffff42908116600160401b026bffffffff0000000000000000199092169190911790915560048601829055604080518581526020810185905290810183905260608101919091526001600160a01b0389811691908b16907f1be815035b13056fba0f0dcbaec5d30add5d95e5f1b6990581607fbccdc930509060800160405180910390a35050505b506001600160a01b0386165f908152600b820160205260408120905b8451811015612554575f8582815181106123ce576123ce614bd2565b602090810291909101810151805115155f90815291859052604082208054825192945090926001600160801b039091169115612418575060078601546001600160801b031661242f565b506007860154600160801b90046001600160801b03165b8082146125455782547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b038216178355602084015115612545575f612482856020015183858c613bf7565b8454909150819085906010906124a9908490600160801b90046001600160801b0316614ee5565b92506101000a8154816001600160801b0302191690836001600160801b031602179055508c6001600160a01b03168b6001600160a01b03168d6001600160a01b03167fc4278cd1497fedb2697092108a0141a0cbecdd1472913b6e803010998aa63537885f015187878760405161253b9493929190931515845260208401929092526040830152606082015260800190565b60405180910390a4505b846001019450505050506123b2565b5050505050505050565b6111df8133613c16565b5f8281526065602090815260408083206001600160a01b038516845290915290205460ff166109cc575f8281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556125c43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f8281526065602090815260408083206001600160a01b038516845290915290205460ff16156109cc575f8281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6060835167ffffffffffffffff8111156126a5576126a5614373565b6040519080825280602002602001820160405280156126e957816020015b604080518082019091525f80825260208201528152602001906001900390816126c35790505b5090505f5b84518110156128765784818151811061270957612709614bd2565b6020026020010151156127d457604051632f2e037160e11b81526001600160a01b0385811660048301525f9190881690635e5c06e290602401606060405180830381865afa15801561275d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127819190614d0f565b9250505060405180604001604052806001151581526020016127a48988886129dc565b6127ae9084614bfa565b8152508383815181106127c3576127c3614bd2565b60200260200101819052505061286e565b6040805180820182525f815290516370a0823160e01b81526001600160a01b0386811660048301526020830191908916906370a0823190602401602060405180830381865afa158015612829573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061284d9190614bbb565b81525082828151811061286257612862614bd2565b60200260200101819052505b6001016126ee565b50949350505050565b80516001600160a01b039081165f908152609760208181526040808420878616855282528084208651909516845291905281206003015460088301548451929392600160401b90910463ffffffff1690849081906128f09086904286106128e6575f612fc8565b61228d8642614e83565b506001600160a01b038b165f908152600b8801602052604081209294509092505b8860200151518110156129ce575f8960200151828151811061293557612935614bd2565b60200260200101515f01511561294c57508361294f565b50825b6129b98a60200151838151811061296857612968614bd2565b60200260200101516020015182855f8e60200151878151811061298d5761298d614bd2565b60209081029190910181015151151582528101919091526040015f20546001600160801b03168a613bf7565b6129c3908a614bfa565b985050600101612911565b505050505050509392505050565b5f806224ea006129f28163ffffffff8616614f04565b612a029063ffffffff8616614e83565b612a0c9190614bfa565b90505f856001600160a01b0316630e52dbec6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a4b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a6f9190614d58565b612a7f9060ff166224ea00614e96565b612a8c6224ea0042614f04565b612a969042614e83565b612aa09190614bfa565b9050815b818111612b4f576040517fd2681a0b000000000000000000000000000000000000000000000000000000008152600481018290526001600160a01b0387811660248301525f919089169063d2681a0b906044016040805180830381865afa158015612b11573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b359190614f17565b509050612b428186614bfa565b9450506224ea0001612aa4565b50604051635fb9165160e11b8152600481018490526001600160a01b0387169063bf722ca290602401602060405180830381865afa158015612b93573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612bb79190614bbb565b9695505050505050565b606080825167ffffffffffffffff811115612bde57612bde614373565b604051908082528060200260200182016040528015612c07578160200160208202803683370190505b5090505f5b8651811015612e46575f878281518110612c2857612c28614bd2565b60209081029190910181015180516001600160a01b03165f908152609790925260408220909250905b600282015460ff166001600160801b0382161015612ccd5782516001600160801b0382165f9081526001840160209081526040808320548751838901516001600160a01b03909216808652938890529190932060080154612cc5948e949093926119bb92909190869063ffffffff16612689565b600101612c51565b505f5b8651811015612e38575f825f015f898481518110612cf057612cf0614bd2565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2090505f5b846020015151811015612e2e576001600160a01b038b165f908152600b830160209081526040822090870151805183919085908110612d5c57612d5c614bd2565b602090810291909101810151151582528101919091526040015f2054600160801b90046001600160801b031690508015612e255780888581518110612da357612da3614bd2565b60200260200101818151612db79190614bfa565b9052506001600160a01b038c165f908152600b840160209081526040822090880151805183919086908110612dee57612dee614bd2565b602090810291909101810151151582528101919091526040015f2080546001600160801b03928316600160801b0292169190911790555b50600101612d1b565b5050600101612cd0565b508260010192505050612c0c565b505f5b8351811015612f28575f828281518110612e6557612e65614bd2565b602002602001015190505f811115612f1f57612eae8682878581518110612e8e57612e8e614bd2565b60200260200101516001600160a01b0316612f5e9092919063ffffffff16565b856001600160a01b0316858381518110612eca57612eca614bd2565b60200260200101516001600160a01b0316886001600160a01b03167fc1405953cccdad6b442e266c84d66ad671e2534c6584f8e6ef92802f7ad294d584604051612f1691815260200190565b60405180910390a45b50600101612e49565b5082915094509492505050565b5f54610100900460ff16612f47575f80fd5b565b5f818311612f5757816111f5565b5090919050565b5f6040517fa9059cbb000000000000000000000000000000000000000000000000000000005f526001600160a01b0384166004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f606052806040525080612fc2575f80fd5b50505050565b5f805f612ff260405180608001604052805f81526020015f81526020015f81526020015f81525090565b856001600160a01b0316631a90f1866040518163ffffffff1660e01b8152600401602060405180830381865afa15801561302e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906130529190614bbb565b816040018181525050856001600160a01b0316632e0af0086040518163ffffffff1660e01b8152600401602060405180830381865afa158015613097573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906130bb9190614bbb565b6060828101919091526040805191820181525f908201819052600889015463ffffffff8082168085526401000000009092041660208401526224ea0090613103908290614f04565b835161310f9190614e83565b6131199190614bfa565b90505f886001600160a01b0316630e52dbec6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613158573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061317c9190614d58565b61318c9060ff166224ea00614e96565b6131996224ea0042614f04565b6131a39042614e83565b6131ad9190614bfa565b90505f825b828111613254576040517f0ab69be8000000000000000000000000000000000000000000000000000000008152600481018290525f906001600160a01b038d1690630ab69be8906024016040805180830381865afa158015613216573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061323a9190614f17565b5090506132478184614bfa565b9250506224ea00016131b2565b508085604001516132659190614bfa565b8552604051635fb9165160e11b8152600481018290526001600160a01b038b169063bf722ca290602401602060405180830381865afa1580156132aa573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132ce9190614bbb565b60208601525050885483515f925081116132f057670de0b6b3a76400006132fc565b83516132fc9082613c77565b60018b015460048c0154855160208701519395505f94509192909161332091614e83565b604086018190525f90613333575f613363565b613363858760400151670de0b6b3a764000061334f9190614e96565b8f60030154613c879092919063ffffffff16565b9050856020015142116134415780156133e8575f6133926133848d84614e96565b61338d90614f39565b613ca5565b90506133cc6133a982670de0b6b3a7640000614e83565b6133c66133be89670de0b6b3a7640000614e83565b879086613c87565b90613e39565b6133d68483613e4d565b6133e09190614bfa565b98505061341c565b8a6134056133fe87670de0b6b3a7640000614e83565b8590613e4d565b61340f9190614e96565b6134199083614bfa565b97505b6134268289614f53565b6134308c85614e96565b61343a9190614f53565b93506135ae565b602086015160088e0154600160401b900463ffffffff1611156134a65761348761346e6133848d84614e96565b61348090670de0b6b3a7640000614e83565b8390613e39565b6134919083614e83565b975061349d8289614f53565b61343a90614f39565b60088d015460208701515f916134ca91600160401b90910463ffffffff1690614e83565b9b508115613511576134df6133848d84614e96565b90506134f66133a982670de0b6b3a7640000614e83565b6135008483613e4d565b61350a9190614bfa565b9850613545565b8b61352e61352788670de0b6b3a7640000614e83565b8690613e4d565b6135389190614e96565b6135429084614bfa565b98505b6135628760200151426135589190614e83565b6133849084614e96565b905061358061357982670de0b6b3a7640000614e83565b8a90613e39565b61358a908a614e83565b9850613596838a614f53565b6135a08d86614e96565b6135aa9190614f53565b9450505b835f036135df5750505060078a01546001600160801b038082169850600160801b9091041695506122049350505050565b5050506136286040518061012001604052805f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b6136e885606001515f0361363c575f6136da565b6136c886606001518c6001600160a01b0316638c3cba5a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613680573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906136a49190614bbb565b886040015189606001516136b89190614e83565b6136c29190614e83565b90613c77565b6136da90670de0b6b3a7640000614e83565b670de0b6b3a763ffff613e61565b80825260058c015467ffffffffffffffff600160c01b8204811660c0850152600f9190910b60e084015260068d015416610100830152613728575f6137d6565b6137d66137b5670de0b6b3a76400006137656137608560c00151670de0b6b3a76400006137559190614e83565b60c087015190613c77565b613e6f565b8451613789906137609061378190670de0b6b3a7640000614e83565b875190613c77565b6137939190614f53565b8460e001516137a29190614f72565b6137ab90614f39565b61338d9190614fa1565b6137c790670de0b6b3a7640000614bfa565b670de0b6b3a764000090613c77565b602082018190526139b1906137f390670de0b6b3a7640000614e83565b61398583610100015161398b61387c8f6001600160a01b031663666010326040518163ffffffff1660e01b8152600401602060405180830381865afa15801561383e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906138629190614bbb565b61387490670de0b6b3a7640000614e83565b875190613e39565b61388e90670de0b6b3a7640000614e83565b8f6001600160a01b031663f3fdb15a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156138ca573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906138ee9190614fcd565b6001600160a01b0316637c21fb1d8c606001515f0361390d575f613920565b60608d015160408e015161392091613c77565b895160405160e084901b6001600160e01b031916815260048101929092526024820152604401602060405180830381865afa158015613961573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906139859190614bbb565b90613e4d565b6139959190614bfa565b60058f0154600160801b900467ffffffffffffffff1690613e4d565b6040820152602081015160068c01546139dc91600160801b90910467ffffffffffffffff1690613e4d565b613a138260200151670de0b6b3a76400006139f79190614e83565b60068e0154600160401b900467ffffffffffffffff1690613e4d565b613a1d9190614bfa565b606082018190526040820151613a4191613a3691614bfa565b604083015190613c77565b60808201819052613a5a90670de0b6b3a7640000614e83565b8160a00181815250505f8a6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613aa0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613ac49190614bbb565b90505f86602001518c6001600160a01b0316638d0e5f026040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b08573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613b2c9190614bbb565b613b369190614bfa565b6001600160a01b038d165f9081526097602052604090206003015490915081613b5f575f613b82565b613b828183613b7b876080015189613e4d90919063ffffffff16565b9190613c87565b60078f0154613b9a91906001600160801b0316614bfa565b9a505f8311613ba9575f613bc5565b613bc58184613b7b8760a0015189613e4d90919063ffffffff16565b60078f0154613be49190600160801b90046001600160801b0316614bfa565b9950505050505050505093509350939050565b5f613c0d613c058486614e83565b869084613c87565b95945050505050565b5f8281526065602090815260408083206001600160a01b038516845290915290205460ff166109cc57613c488161401e565b613c53836020614030565b604051602001613c64929190614fff565b6040516020818303038152906040525f80fd5b5f6111f583670de0b6b3a7640000845b828202811515841585830485141716613c9e575f80fd5b0492915050565b5f680248ce36a70cb26b3e198213613cbe57505f919050565b680755bf798b4a1bf1e58212613cd2575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b5f6111f58383670de0b6b3a76400006141c7565b5f6111f58383670de0b6b3a7640000613c87565b5f818310612f5757816111f5565b5f808213613e7b575f80fd5b5f6060613e87846141f4565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d6c8c3f38e95a6b1ff2ab1c3b343619018302821d6d02384773bdf1ac5676facced60901901830290911d6cb9a025d814b29c212b8b1a07cd19019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60606109486001600160a01b03831660145b60605f61403e836002614e96565b614049906002614bfa565b67ffffffffffffffff81111561406157614061614373565b6040519080825280601f01601f19166020018201604052801561408b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000815f815181106140c1576140c1614bd2565b60200101906001600160f81b03191690815f1a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061410b5761410b614bd2565b60200101906001600160f81b03191690815f1a9053505f61412d846002614e96565b614138906001614bfa565b90505b60018111156141bc577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061417957614179614bd2565b1a60f81b82828151811061418f5761418f614bd2565b60200101906001600160f81b03191690815f1a90535060049490941c936141b581615060565b905061413b565b5083156111f5575f80fd5b8282028115158415858304851417166141de575f80fd5b6001826001830304018115150290509392505050565b5f808211614200575f80fd5b5060016001600160801b03821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b6001600160a01b03811681146111df575f80fd5b5f60208284031215614286575f80fd5b81356111f581614262565b5f602082840312156142a1575f80fd5b81356001600160e01b0319811681146111f5575f80fd5b5f602082840312156142c8575f80fd5b5035919050565b80356142da81614262565b919050565b803580151581146142da575f80fd5b5f805f8060808587031215614301575f80fd5b843561430c81614262565b9350602085013561431c81614262565b925061432a604086016142df565b9150606085013561433a81614262565b939692955090935050565b5f8060408385031215614356575f80fd5b82359150602083013561436881614262565b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156143aa576143aa614373565b60405290565b6040516101c0810167ffffffffffffffff811182821017156143aa576143aa614373565b604051601f8201601f1916810167ffffffffffffffff811182821017156143fd576143fd614373565b604052919050565b5f67ffffffffffffffff82111561441e5761441e614373565b5060051b60200190565b5f82601f830112614437575f80fd5b813561444a61444582614405565b6143d4565b8082825260208201915060208360051b86010192508583111561446b575f80fd5b602085015b8381101561456257803567ffffffffffffffff81111561448e575f80fd5b86016040818903601f190112156144a3575f80fd5b6144ab614387565b60208201356144b981614262565b8152604082013567ffffffffffffffff8111156144d4575f80fd5b60208184010192505088601f8301126144eb575f80fd5b81356144f961444582614405565b8082825260208201915060208360051b86010192508b83111561451a575f80fd5b6020850194505b8285101561454357614532856142df565b825260209485019490910190614521565b8060208501525050508085525050602083019250602081019050614470565b5095945050505050565b5f805f6060848603121561457e575f80fd5b833567ffffffffffffffff811115614594575f80fd5b6145a086828701614428565b93505060208401356145b181614262565b915060408401356145c181614262565b809150509250925092565b5f80604083850312156145dd575f80fd5b82356145e881614262565b9150602083013561436881614262565b5f8060408385031215614609575f80fd5b823567ffffffffffffffff81111561461f575f80fd5b61462b85828601614428565b925050602083013567ffffffffffffffff811115614647575f80fd5b830160c08186031215614368575f80fd5b5f8151808452602084019350602083015f5b828110156146915781516001600160a01b031686526020958601959091019060010161466a565b5093949350505050565b604081525f6146ad6040830185614658565b82810360208401528084518083526020830191506020860192505f5b818110156146e75783518352602093840193909201916001016146c9565b50909695505050505050565b5f805f60608486031215614705575f80fd5b833567ffffffffffffffff81111561471b575f80fd5b61472786828701614428565b935050602084013561473881614262565b9150604084013567ffffffffffffffff811115614753575f80fd5b8401601f81018613614763575f80fd5b803561477161444582614405565b8082825260208201915060208360051b850101925088831115614792575f80fd5b6020840193505b828410156147bd5783356147ac81614262565b825260209384019390910190614799565b809450505050509250925092565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561486f57868503603f19018452815180516001600160a01b03168652602090810151604082880181905281519088018190529101905f9060608801905b8083101561485757835115158252602082019150602084019350600183019250614832565b509650505060209384019391909101906001016147f1565b50929695505050505050565b602081525f6111f56020830184614658565b803563ffffffff811681146142da575f80fd5b8035600f81900b81146142da575f80fd5b803567ffffffffffffffff811681146142da575f80fd5b5f602082840312156148d8575f80fd5b813567ffffffffffffffff8111156148ee575f80fd5b8201601f810184136148fe575f80fd5b803561490c61444582614405565b8082825260208201915060206101c0840285010192508683111561492e575f80fd5b6020840193505b82841015612bb7576101c0848803121561494d575f80fd5b6149556143b0565b61495e856142cf565b815261496c602086016142cf565b602082015261497d604086016142cf565b604082015261498e6060860161488d565b60608201526080858101359082015260a0808601359082015260c0808601359082015260e080860135908201526149c861010086016148a0565b6101008201526149db61012086016148b1565b6101208201526149ee61014086016148b1565b610140820152614a0161016086016148b1565b610160820152614a1461018086016148b1565b610180820152614a276101a086016148b1565b6101a082015282526101c09390930192602090910190614935565b81516001600160a01b031681526101c081016020830151614a6e60208401826001600160a01b03169052565b506040830151614a8960408401826001600160a01b03169052565b506060830151614aa1606084018263ffffffff169052565b506080830151608083015260a083015160a083015260c083015160c083015260e083015160e0830152610100830151614ae0610100840182600f0b9052565b50610120830151614afe61012084018267ffffffffffffffff169052565b50610140830151614b1c61014084018267ffffffffffffffff169052565b50610160830151614b3a61016084018267ffffffffffffffff169052565b50610180830151614b5861018084018267ffffffffffffffff169052565b506101a0830151614b766101a084018267ffffffffffffffff169052565b5092915050565b5f805f60608486031215614b8f575f80fd5b8335614b9a81614262565b92506020840135614baa81614262565b929592945050506040919091013590565b5f60208284031215614bcb575f80fd5b5051919050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b8082018082111561094857610948614be6565b634e487b7160e01b5f52600160045260245ffd5b5f808335601e19843603018112614c36575f80fd5b83018035915067ffffffffffffffff821115614c50575f80fd5b6020019150600581901b3603821315614c67575f80fd5b9250929050565b8781526001600160a01b0387811660208301528616604082015260c06060820181905281018490525f8560e08301825b87811015614cce578235614cb181614262565b6001600160a01b0316825260209283019290910190600101614c9e565b506080840195909552505060a0015295945050505050565b60ff811681146111df575f80fd5b5f60208284031215614d04575f80fd5b81356111f581614ce6565b5f805f60608486031215614d21575f80fd5b5050815160208301516040909301519094929350919050565b5f60ff821660ff8103614d4f57614d4f614be6565b60010192915050565b5f60208284031215614d68575f80fd5b81516111f581614ce6565b6001815b60018411156110aa57808504811115614d9257614d92614be6565b6001841615614da057908102905b60019390931c928002614d77565b5f82614dbc57506001610948565b81614dc857505f610948565b8160018114614dde5760028114614de857614e04565b6001915050610948565b60ff841115614df957614df9614be6565b50506001821b610948565b5060208310610133831016604e8410600b8410161715614e27575081810a610948565b614e335f198484614d73565b805f1904821115614e4657614e46614be6565b029392505050565b5f6111f560ff841683614dae565b634e487b7160e01b5f52601260045260245ffd5b5f82614e7e57614e7e614e5c565b500490565b8181038181111561094857610948614be6565b808202811582820484141761094857610948614be6565b63ffffffff818116838216019081111561094857610948614be6565b63ffffffff828116828216039081111561094857610948614be6565b6001600160801b03818116838216019081111561094857610948614be6565b5f82614f1257614f12614e5c565b500690565b5f8060408385031215614f28575f80fd5b505080516020909101519092909150565b5f600160ff1b8203614f4d57614f4d614be6565b505f0390565b8181035f831280158383131683831282161715614b7657614b76614be6565b8082025f8212600160ff1b84141615614f8d57614f8d614be6565b818105831482151761094857610948614be6565b5f82614faf57614faf614e5c565b600160ff1b82145f1984141615614fc857614fc8614be6565b500590565b5f60208284031215614fdd575f80fd5b81516111f581614262565b5f81518060208401855e5f93019283525090919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f6150306017830185614fe8565b7f206973206d697373696e6720726f6c65200000000000000000000000000000008152613c0d6011820185614fe8565b5f8161506e5761506e614be6565b505f19019056fea26469706673582212200d0c969dbe5e231557e9807e2c176f734b25787b7efa829c13afe35d09c10b4664736f6c634300081a0033", "devdoc": { "events": { "Accrue(address,address,address,bool,uint256,uint256,uint256)": { @@ -1295,6 +1383,18 @@ "newUndistributed": "amount of undistributed rewards.", "reward": "reward asset." } + }, + "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", @@ -1351,7 +1451,7 @@ }, "returns": { "_0": "rewardsList The list of rewards assets.", - "claimedAmounts": "The list of claimed amounts." + "_1": "claimedAmounts The list of claimed amounts." } }, "claimAll(address)": { @@ -1363,6 +1463,17 @@ "rewardsList": "The list of rewards assets." } }, + "claimOnBehalfOf((address,bool[])[],address,address[])": { + "params": { + "account": "The account to claim the rewards for.", + "marketOps": "The operations to claim rewards for.", + "rewardsList": "The list of rewards assets to claim." + }, + "returns": { + "_0": "rewardsList The list of rewards assets.", + "_1": "claimedAmounts The list of claimed amounts." + } + }, "claimable((address,bool[])[],address,address)": { "params": { "account": "The account to get the claimable amount for.", @@ -1452,6 +1563,12 @@ "_2": "lastUndistributed The last amount of undistributed rewards." } }, + "setKeeper(address,address)": { + "params": { + "account": "The account to set the `keeper` for.", + "keeper": "The address to set as the `keeper`." + } + }, "supportsInterface(bytes4)": { "details": "See {IERC165-supportsInterface}." }, @@ -1508,6 +1625,9 @@ "claimAll(address)": { "notice": "Claims all `msg.sender` rewards to the given account." }, + "claimOnBehalfOf((address,bool[])[],address,address[])": { + "notice": "Claims `account` rewards for the given operations and reward assets." + }, "claimable((address,bool[])[],address,address)": { "notice": "Gets the claimable amount of rewards for a given account, Market operations and reward asset." }, @@ -1529,9 +1649,15 @@ "initialize()": { "notice": "Initializes the contract." }, + "keepers(address)": { + "notice": "Tracks the allowed `keeper` to claim on behalf of `account`." + }, "marketList(uint256)": { "notice": "Stores Markets with distributions set." }, + "nonces(address)": { + "notice": "Tracks the owner nonces for the claim permit." + }, "previewAllocation(address,address,uint256)": { "notice": "Retrieves projected distribution indexes and new undistributed amount for a given `deltaTime`." }, @@ -1547,6 +1673,9 @@ "rewardList(uint256)": { "notice": "Stores registered asset rewards." }, + "setKeeper(address,address)": { + "notice": "Sets the `keeper` address for the given `account`." + }, "withdraw(address,address)": { "notice": "Withdraws the contract's balance of the given asset to the given address." } @@ -1556,7 +1685,7 @@ "storageLayout": { "storage": [ { - "astId": 542, + "astId": 543, "contract": "contracts/RewardsController.sol:RewardsController", "label": "_initialized", "offset": 0, @@ -1564,7 +1693,7 @@ "type": "t_uint8" }, { - "astId": 545, + "astId": 546, "contract": "contracts/RewardsController.sol:RewardsController", "label": "_initializing", "offset": 1, @@ -1572,7 +1701,7 @@ "type": "t_bool" }, { - "astId": 3274, + "astId": 3288, "contract": "contracts/RewardsController.sol:RewardsController", "label": "__gap", "offset": 0, @@ -1580,7 +1709,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 4271, + "astId": 4287, "contract": "contracts/RewardsController.sol:RewardsController", "label": "__gap", "offset": 0, @@ -1588,15 +1717,15 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 39, + "astId": 28, "contract": "contracts/RewardsController.sol:RewardsController", "label": "_roles", "offset": 0, "slot": "101", - "type": "t_mapping(t_bytes32,t_struct(RoleData)34_storage)" + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)" }, { - "astId": 334, + "astId": 335, "contract": "contracts/RewardsController.sol:RewardsController", "label": "__gap", "offset": 0, @@ -1604,39 +1733,39 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 17251, + "astId": 28326, "contract": "contracts/RewardsController.sol:RewardsController", "label": "distribution", "offset": 0, "slot": "151", - "type": "t_mapping(t_contract(Market)16408,t_struct(Distribution)20283_storage)" + "type": "t_mapping(t_contract(Market)27481,t_struct(Distribution)31475_storage)" }, { - "astId": 17257, + "astId": 28332, "contract": "contracts/RewardsController.sol:RewardsController", "label": "rewardEnabled", "offset": 0, "slot": "152", - "type": "t_mapping(t_contract(ERC20)31821,t_bool)" + "type": "t_mapping(t_contract(ERC20)47828,t_bool)" }, { - "astId": 17262, + "astId": 28337, "contract": "contracts/RewardsController.sol:RewardsController", "label": "rewardList", "offset": 0, "slot": "153", - "type": "t_array(t_contract(ERC20)31821)dyn_storage" + "type": "t_array(t_contract(ERC20)47828)dyn_storage" }, { - "astId": 17267, + "astId": 28342, "contract": "contracts/RewardsController.sol:RewardsController", "label": "marketList", "offset": 0, "slot": "154", - "type": "t_array(t_contract(Market)16408)dyn_storage" + "type": "t_array(t_contract(Market)27481)dyn_storage" }, { - "astId": 19989, + "astId": 28347, "contract": "contracts/RewardsController.sol:RewardsController", "label": "nonces", "offset": 0, @@ -1644,12 +1773,20 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 20018, + "astId": 28350, "contract": "contracts/RewardsController.sol:RewardsController", "label": "_claimSender", "offset": 0, "slot": "156", "type": "t_address" + }, + { + "astId": 28355, + "contract": "contracts/RewardsController.sol:RewardsController", + "label": "keepers", + "offset": 0, + "slot": "157", + "type": "t_mapping(t_address,t_address)" } ], "types": { @@ -1658,14 +1795,14 @@ "label": "address", "numberOfBytes": "20" }, - "t_array(t_contract(ERC20)31821)dyn_storage": { - "base": "t_contract(ERC20)31821", + "t_array(t_contract(ERC20)47828)dyn_storage": { + "base": "t_contract(ERC20)47828", "encoding": "dynamic_array", "label": "contract ERC20[]", "numberOfBytes": "32" }, - "t_array(t_contract(Market)16408)dyn_storage": { - "base": "t_contract(Market)16408", + "t_array(t_contract(Market)27481)dyn_storage": { + "base": "t_contract(Market)27481", "encoding": "dynamic_array", "label": "contract Market[]", "numberOfBytes": "32" @@ -1692,17 +1829,17 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(ERC20)31821": { + "t_contract(ERC20)47828": { "encoding": "inplace", "label": "contract ERC20", "numberOfBytes": "20" }, - "t_contract(IPriceFeed)30856": { + "t_contract(IPriceFeed)46863": { "encoding": "inplace", "label": "contract IPriceFeed", "numberOfBytes": "20" }, - "t_contract(Market)16408": { + "t_contract(Market)27481": { "encoding": "inplace", "label": "contract Market", "numberOfBytes": "20" @@ -1712,6 +1849,13 @@ "label": "int128", "numberOfBytes": "16" }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, "t_mapping(t_address,t_bool)": { "encoding": "mapping", "key": "t_address", @@ -1719,12 +1863,12 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_address,t_mapping(t_bool,t_struct(Account)20188_storage))": { + "t_mapping(t_address,t_mapping(t_bool,t_struct(Account)31380_storage))": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => mapping(bool => struct RewardsController.Account))", "numberOfBytes": "32", - "value": "t_mapping(t_bool,t_struct(Account)20188_storage)" + "value": "t_mapping(t_bool,t_struct(Account)31380_storage)" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -1733,54 +1877,54 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_mapping(t_bool,t_struct(Account)20188_storage)": { + "t_mapping(t_bool,t_struct(Account)31380_storage)": { "encoding": "mapping", "key": "t_bool", "label": "mapping(bool => struct RewardsController.Account)", "numberOfBytes": "32", - "value": "t_struct(Account)20188_storage" + "value": "t_struct(Account)31380_storage" }, - "t_mapping(t_bytes32,t_struct(RoleData)34_storage)": { + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", "numberOfBytes": "32", - "value": "t_struct(RoleData)34_storage" + "value": "t_struct(RoleData)23_storage" }, - "t_mapping(t_contract(ERC20)31821,t_bool)": { + "t_mapping(t_contract(ERC20)47828,t_bool)": { "encoding": "mapping", - "key": "t_contract(ERC20)31821", + "key": "t_contract(ERC20)47828", "label": "mapping(contract ERC20 => bool)", "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_contract(ERC20)31821,t_struct(RewardData)20267_storage)": { + "t_mapping(t_contract(ERC20)47828,t_struct(RewardData)31459_storage)": { "encoding": "mapping", - "key": "t_contract(ERC20)31821", + "key": "t_contract(ERC20)47828", "label": "mapping(contract ERC20 => struct RewardsController.RewardData)", "numberOfBytes": "32", - "value": "t_struct(RewardData)20267_storage" + "value": "t_struct(RewardData)31459_storage" }, - "t_mapping(t_contract(Market)16408,t_struct(Distribution)20283_storage)": { + "t_mapping(t_contract(Market)27481,t_struct(Distribution)31475_storage)": { "encoding": "mapping", - "key": "t_contract(Market)16408", + "key": "t_contract(Market)27481", "label": "mapping(contract Market => struct RewardsController.Distribution)", "numberOfBytes": "32", - "value": "t_struct(Distribution)20283_storage" + "value": "t_struct(Distribution)31475_storage" }, - "t_mapping(t_uint128,t_contract(ERC20)31821)": { + "t_mapping(t_uint128,t_contract(ERC20)47828)": { "encoding": "mapping", "key": "t_uint128", "label": "mapping(uint128 => contract ERC20)", "numberOfBytes": "32", - "value": "t_contract(ERC20)31821" + "value": "t_contract(ERC20)47828" }, - "t_struct(Account)20188_storage": { + "t_struct(Account)31380_storage": { "encoding": "inplace", "label": "struct RewardsController.Account", "members": [ { - "astId": 20185, + "astId": 31377, "contract": "contracts/RewardsController.sol:RewardsController", "label": "index", "offset": 0, @@ -1788,7 +1932,7 @@ "type": "t_uint128" }, { - "astId": 20187, + "astId": 31379, "contract": "contracts/RewardsController.sol:RewardsController", "label": "accrued", "offset": 16, @@ -1798,28 +1942,28 @@ ], "numberOfBytes": "32" }, - "t_struct(Distribution)20283_storage": { + "t_struct(Distribution)31475_storage": { "encoding": "inplace", "label": "struct RewardsController.Distribution", "members": [ { - "astId": 20273, + "astId": 31465, "contract": "contracts/RewardsController.sol:RewardsController", "label": "rewards", "offset": 0, "slot": "0", - "type": "t_mapping(t_contract(ERC20)31821,t_struct(RewardData)20267_storage)" + "type": "t_mapping(t_contract(ERC20)47828,t_struct(RewardData)31459_storage)" }, { - "astId": 20278, + "astId": 31470, "contract": "contracts/RewardsController.sol:RewardsController", "label": "availableRewards", "offset": 0, "slot": "1", - "type": "t_mapping(t_uint128,t_contract(ERC20)31821)" + "type": "t_mapping(t_uint128,t_contract(ERC20)47828)" }, { - "astId": 20280, + "astId": 31472, "contract": "contracts/RewardsController.sol:RewardsController", "label": "availableRewardsCount", "offset": 0, @@ -1827,7 +1971,7 @@ "type": "t_uint8" }, { - "astId": 20282, + "astId": 31474, "contract": "contracts/RewardsController.sol:RewardsController", "label": "baseUnit", "offset": 0, @@ -1837,12 +1981,12 @@ ], "numberOfBytes": "128" }, - "t_struct(RewardData)20267_storage": { + "t_struct(RewardData)31459_storage": { "encoding": "inplace", "label": "struct RewardsController.RewardData", "members": [ { - "astId": 20222, + "astId": 31414, "contract": "contracts/RewardsController.sol:RewardsController", "label": "targetDebt", "offset": 0, @@ -1850,7 +1994,7 @@ "type": "t_uint256" }, { - "astId": 20224, + "astId": 31416, "contract": "contracts/RewardsController.sol:RewardsController", "label": "releaseRate", "offset": 0, @@ -1858,7 +2002,7 @@ "type": "t_uint256" }, { - "astId": 20226, + "astId": 31418, "contract": "contracts/RewardsController.sol:RewardsController", "label": "totalDistribution", "offset": 0, @@ -1866,7 +2010,7 @@ "type": "t_uint256" }, { - "astId": 20228, + "astId": 31420, "contract": "contracts/RewardsController.sol:RewardsController", "label": "undistributedFactor", "offset": 0, @@ -1874,7 +2018,7 @@ "type": "t_uint256" }, { - "astId": 20230, + "astId": 31422, "contract": "contracts/RewardsController.sol:RewardsController", "label": "lastUndistributed", "offset": 0, @@ -1882,7 +2026,7 @@ "type": "t_uint256" }, { - "astId": 20232, + "astId": 31424, "contract": "contracts/RewardsController.sol:RewardsController", "label": "flipSpeed", "offset": 0, @@ -1890,7 +2034,7 @@ "type": "t_int128" }, { - "astId": 20234, + "astId": 31426, "contract": "contracts/RewardsController.sol:RewardsController", "label": "compensationFactor", "offset": 16, @@ -1898,7 +2042,7 @@ "type": "t_uint64" }, { - "astId": 20236, + "astId": 31428, "contract": "contracts/RewardsController.sol:RewardsController", "label": "transitionFactor", "offset": 24, @@ -1906,7 +2050,7 @@ "type": "t_uint64" }, { - "astId": 20238, + "astId": 31430, "contract": "contracts/RewardsController.sol:RewardsController", "label": "borrowAllocationWeightFactor", "offset": 0, @@ -1914,7 +2058,7 @@ "type": "t_uint64" }, { - "astId": 20240, + "astId": 31432, "contract": "contracts/RewardsController.sol:RewardsController", "label": "depositAllocationWeightAddend", "offset": 8, @@ -1922,7 +2066,7 @@ "type": "t_uint64" }, { - "astId": 20242, + "astId": 31434, "contract": "contracts/RewardsController.sol:RewardsController", "label": "depositAllocationWeightFactor", "offset": 16, @@ -1930,7 +2074,7 @@ "type": "t_uint64" }, { - "astId": 20244, + "astId": 31436, "contract": "contracts/RewardsController.sol:RewardsController", "label": "borrowIndex", "offset": 0, @@ -1938,7 +2082,7 @@ "type": "t_uint128" }, { - "astId": 20246, + "astId": 31438, "contract": "contracts/RewardsController.sol:RewardsController", "label": "depositIndex", "offset": 16, @@ -1946,7 +2090,7 @@ "type": "t_uint128" }, { - "astId": 20248, + "astId": 31440, "contract": "contracts/RewardsController.sol:RewardsController", "label": "start", "offset": 0, @@ -1954,7 +2098,7 @@ "type": "t_uint32" }, { - "astId": 20250, + "astId": 31442, "contract": "contracts/RewardsController.sol:RewardsController", "label": "end", "offset": 4, @@ -1962,7 +2106,7 @@ "type": "t_uint32" }, { - "astId": 20252, + "astId": 31444, "contract": "contracts/RewardsController.sol:RewardsController", "label": "lastUpdate", "offset": 8, @@ -1970,7 +2114,7 @@ "type": "t_uint32" }, { - "astId": 20254, + "astId": 31446, "contract": "contracts/RewardsController.sol:RewardsController", "label": "lastConfig", "offset": 12, @@ -1978,7 +2122,7 @@ "type": "t_uint32" }, { - "astId": 20256, + "astId": 31448, "contract": "contracts/RewardsController.sol:RewardsController", "label": "lastConfigReleased", "offset": 0, @@ -1986,30 +2130,30 @@ "type": "t_uint256" }, { - "astId": 20259, + "astId": 31451, "contract": "contracts/RewardsController.sol:RewardsController", "label": "priceFeed", "offset": 0, "slot": "10", - "type": "t_contract(IPriceFeed)30856" + "type": "t_contract(IPriceFeed)46863" }, { - "astId": 20266, + "astId": 31458, "contract": "contracts/RewardsController.sol:RewardsController", "label": "accounts", "offset": 0, "slot": "11", - "type": "t_mapping(t_address,t_mapping(t_bool,t_struct(Account)20188_storage))" + "type": "t_mapping(t_address,t_mapping(t_bool,t_struct(Account)31380_storage))" } ], "numberOfBytes": "384" }, - "t_struct(RoleData)34_storage": { + "t_struct(RoleData)23_storage": { "encoding": "inplace", "label": "struct AccessControlUpgradeable.RoleData", "members": [ { - "astId": 31, + "astId": 20, "contract": "contracts/RewardsController.sol:RewardsController", "label": "members", "offset": 0, @@ -2017,7 +2161,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 33, + "astId": 22, "contract": "contracts/RewardsController.sol:RewardsController", "label": "adminRole", "offset": 0, diff --git a/deployments/optimism/StakingPreviewer.json b/deployments/optimism/StakingPreviewer.json new file mode 100644 index 00000000..8c543a7a --- /dev/null +++ b/deployments/optimism/StakingPreviewer.json @@ -0,0 +1,623 @@ +{ + "address": "0x5C79494Df50D9dc56DE627f46d0b2E217683C641", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "allClaimable", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct RewardAmount[]", + "name": "claimableRewards", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "allClaimable", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct RewardAmount[]", + "name": "claimableRewards", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "allClaimed", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct RewardAmount[]", + "name": "claimedRewards", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "allEarned", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct RewardAmount[]", + "name": "earnedRewards", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "allRewards", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "finishAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimable", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "earned", + "type": "uint256" + } + ], + "internalType": "struct RewardAccount[]", + "name": "rewards", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "claimable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "earned", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "parameters", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "refTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "excessFactor", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "penaltyGrowth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "penaltyThreshold", + "type": "uint256" + }, + { + "internalType": "contract Market", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "internalType": "address", + "name": "savings", + "type": "address" + }, + { + "internalType": "uint40", + "name": "duration", + "type": "uint40" + }, + { + "internalType": "uint256", + "name": "providerRatio", + "type": "uint256" + } + ], + "internalType": "struct Parameters", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stEXA", + "outputs": [ + { + "internalType": "contract StakedEXA", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "staking", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "refTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "excessFactor", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "penaltyGrowth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "penaltyThreshold", + "type": "uint256" + }, + { + "internalType": "contract Market", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "internalType": "address", + "name": "savings", + "type": "address" + }, + { + "internalType": "uint40", + "name": "duration", + "type": "uint40" + }, + { + "internalType": "uint256", + "name": "providerRatio", + "type": "uint256" + } + ], + "internalType": "struct Parameters", + "name": "parameters", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "totalAssets", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "finishAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimable", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "earned", + "type": "uint256" + } + ], + "internalType": "struct RewardAccount[]", + "name": "rewards", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "internalType": "struct StakingAccount", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "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": "0x19a623d8af594827b9111358c5ffb5a3ede098d039e01fec9580d27c7cc17c42", + "receipt": { + "to": null, + "from": "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", + "contractAddress": "0x5C79494Df50D9dc56DE627f46d0b2E217683C641", + "transactionIndex": 7, + "gasUsed": "517910", + "logsBloom": "0x00000000000000000000000200000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000002004000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000100000000000000000000020000000000000000000000000000000000400000000008000000000000000000000000000000000000000000000000000000000000040000000000000", + "blockHash": "0x87df506add7ba37c84de51e15e172a7e07b998ce3375c44c8fc94a634e374cfc", + "transactionHash": "0x19a623d8af594827b9111358c5ffb5a3ede098d039e01fec9580d27c7cc17c42", + "logs": [ + { + "transactionIndex": 7, + "blockNumber": 124901386, + "transactionHash": "0x19a623d8af594827b9111358c5ffb5a3ede098d039e01fec9580d27c7cc17c42", + "address": "0x5C79494Df50D9dc56DE627f46d0b2E217683C641", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000615ddf715d8696d0553021ae7363191de8443584" + ], + "data": "0x", + "logIndex": 42, + "blockHash": "0x87df506add7ba37c84de51e15e172a7e07b998ce3375c44c8fc94a634e374cfc" + }, + { + "transactionIndex": 7, + "blockNumber": 124901386, + "transactionHash": "0x19a623d8af594827b9111358c5ffb5a3ede098d039e01fec9580d27c7cc17c42", + "address": "0x5C79494Df50D9dc56DE627f46d0b2E217683C641", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a", + "logIndex": 43, + "blockHash": "0x87df506add7ba37c84de51e15e172a7e07b998ce3375c44c8fc94a634e374cfc" + } + ], + "blockNumber": 124901386, + "cumulativeGasUsed": "1682840", + "status": 1, + "byzantium": true + }, + "args": [ + "0x615dDF715D8696d0553021aE7363191de8443584", + "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "6a557ee70d62b80968609ef7922ee609", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"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\"},{\"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. NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to fully implement transparency without decoding reverts caused by selector clashes between the proxy and the implementation. WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is changed.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"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}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1111},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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": "0x6080604052604051610b2a380380610b2a833981016040819052610022916102b7565b828161002f82825f610043565b5061003b90508261006e565b50505061039e565b61004c836100db565b5f825111806100585750805b1561006957610067838361011a565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6100ad5f80516020610ae3833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a16100d881610146565b50565b6100e481610189565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b606061013f8383604051806060016040528060278152602001610b03602791396101c3565b9392505050565b6001600160a01b038116610158575f80fd5b805f80516020610ae38339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b61019c575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610168565b60605f80856001600160a01b0316856040516101df9190610388565b5f60405180830381855af49150503d805f8114610217576040519150601f19603f3d011682016040523d82523d5f602084013e61021c565b606091505b50909250905061022e86838387610238565b9695505050505050565b606083156102625782515f0361025b576001600160a01b0385163b61025b575f80fd5b508161026c565b61026c8383610274565b949350505050565b8151156102845781518083602001fd5b5f80fd5b80516001600160a01b038116811461029e575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f805f606084860312156102c9575f80fd5b6102d284610288565b92506102e060208501610288565b60408501519092506001600160401b038111156102fb575f80fd5b8401601f8101861361030b575f80fd5b80516001600160401b03811115610324576103246102a3565b604051601f8201601f19908116603f011681016001600160401b0381118282101715610352576103526102a3565b604052818152828201602001881015610369575f80fd5b8160208401602083015e5f602083830101528093505050509250925092565b5f82518060208501845e5f920191825250919050565b610738806103ab5f395ff3fe60806040523661001357610011610017565b005b6100115b61001f61016c565b6001600160a01b031633036101625760606001600160e01b03195f35167fc9a6301a0000000000000000000000000000000000000000000000000000000081016100725761006b61019e565b915061015a565b7fb0e10d7a000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100ab5761006b6101f1565b7f70d7c690000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100e45761006b610235565b7f07ae5bc0000000000000000000000000000000000000000000000000000000006001600160e01b031982160161011d5761006b610265565b7fa39f25e5000000000000000000000000000000000000000000000000000000006001600160e01b03198216016101565761006b6102a4565b5f80fd5b815160208301f35b61016a6102b7565b565b5f7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a86102c7565b5f6101b63660048184610579565b8101906101c391906105bb565b90506101de8160405180602001604052805f8152505f6102d1565b505060408051602081019091525f815290565b60605f806102023660048184610579565b81019061020f9190610601565b9150915061021f828260016102d1565b60405180602001604052805f8152509250505090565b606061023f6102c7565b5f61024d3660048184610579565b81019061025a91906105bb565b90506101de816102fc565b606061026f6102c7565b5f61027861016c565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102ae6102c7565b5f610278610353565b61016a6102c2610353565b610361565b341561016a575f80fd5b6102da8361037f565b5f825111806102e65750805b156102f7576102f583836103be565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032561016c565b604080516001600160a01b03928316815291841660208301520160405180910390a1610350816103ea565b50565b5f61035c610458565b905090565b365f80375f80365f845af43d5f803e80801561037b573d5ff35b3d5ffd5b6103888161047f565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b60606103e383836040518060600160405280602781526020016106dc602791396104b9565b9392505050565b6001600160a01b0381166103fc575f80fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905550565b5f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018f565b6001600160a01b0381163b610492575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61041f565b60605f80856001600160a01b0316856040516104d591906106c5565b5f60405180830381855af49150503d805f811461050d576040519150601f19603f3d011682016040523d82523d5f602084013e610512565b606091505b50915091506105238683838761052d565b9695505050505050565b606083156105575782515f03610550576001600160a01b0385163b610550575f80fd5b5081610561565b6105618383610569565b949350505050565b8151156101565781518083602001fd5b5f8085851115610587575f80fd5b83861115610593575f80fd5b5050820193919092039150565b80356001600160a01b03811681146105b6575f80fd5b919050565b5f602082840312156105cb575f80fd5b6103e3826105a0565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f8060408385031215610612575f80fd5b61061b836105a0565b9150602083013567ffffffffffffffff811115610636575f80fd5b8301601f81018513610646575f80fd5b803567ffffffffffffffff811115610660576106606105d4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561068f5761068f6105d4565b6040528181528282016020018710156106a6575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82518060208501845e5f92019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d8c251ecd4d394863339f9bcd6f97d3ee0a2ad0067aa7a46ebd15dc85a73cc5464736f6c634300081a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61001f61016c565b6001600160a01b031633036101625760606001600160e01b03195f35167fc9a6301a0000000000000000000000000000000000000000000000000000000081016100725761006b61019e565b915061015a565b7fb0e10d7a000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100ab5761006b6101f1565b7f70d7c690000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100e45761006b610235565b7f07ae5bc0000000000000000000000000000000000000000000000000000000006001600160e01b031982160161011d5761006b610265565b7fa39f25e5000000000000000000000000000000000000000000000000000000006001600160e01b03198216016101565761006b6102a4565b5f80fd5b815160208301f35b61016a6102b7565b565b5f7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a86102c7565b5f6101b63660048184610579565b8101906101c391906105bb565b90506101de8160405180602001604052805f8152505f6102d1565b505060408051602081019091525f815290565b60605f806102023660048184610579565b81019061020f9190610601565b9150915061021f828260016102d1565b60405180602001604052805f8152509250505090565b606061023f6102c7565b5f61024d3660048184610579565b81019061025a91906105bb565b90506101de816102fc565b606061026f6102c7565b5f61027861016c565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102ae6102c7565b5f610278610353565b61016a6102c2610353565b610361565b341561016a575f80fd5b6102da8361037f565b5f825111806102e65750805b156102f7576102f583836103be565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032561016c565b604080516001600160a01b03928316815291841660208301520160405180910390a1610350816103ea565b50565b5f61035c610458565b905090565b365f80375f80365f845af43d5f803e80801561037b573d5ff35b3d5ffd5b6103888161047f565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b60606103e383836040518060600160405280602781526020016106dc602791396104b9565b9392505050565b6001600160a01b0381166103fc575f80fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905550565b5f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018f565b6001600160a01b0381163b610492575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61041f565b60605f80856001600160a01b0316856040516104d591906106c5565b5f60405180830381855af49150503d805f811461050d576040519150601f19603f3d011682016040523d82523d5f602084013e610512565b606091505b50915091506105238683838761052d565b9695505050505050565b606083156105575782515f03610550576001600160a01b0385163b610550575f80fd5b5081610561565b6105618383610569565b949350505050565b8151156101565781518083602001fd5b5f8085851115610587575f80fd5b83861115610593575f80fd5b5050820193919092039150565b80356001600160a01b03811681146105b6575f80fd5b919050565b5f602082840312156105cb575f80fd5b6103e3826105a0565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f8060408385031215610612575f80fd5b61061b836105a0565b9150602083013567ffffffffffffffff811115610636575f80fd5b8301601f81018513610646575f80fd5b803567ffffffffffffffff811115610660576106606105d4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561068f5761068f6105d4565b6040528181528282016020018710156106a6575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82518060208501845e5f92019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d8c251ecd4d394863339f9bcd6f97d3ee0a2ad0067aa7a46ebd15dc85a73cc5464736f6c634300081a0033", + "implementation": "0x615dDF715D8696d0553021aE7363191de8443584", + "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. NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to fully implement transparency without decoding reverts caused by selector clashes between the proxy and the implementation. WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.", + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is changed." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + }, + "kind": "dev", + "methods": { + "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}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/optimism/StakingPreviewer_Implementation.json b/deployments/optimism/StakingPreviewer_Implementation.json new file mode 100644 index 00000000..025a7eb5 --- /dev/null +++ b/deployments/optimism/StakingPreviewer_Implementation.json @@ -0,0 +1,602 @@ +{ + "address": "0x615dDF715D8696d0553021aE7363191de8443584", + "abi": [ + { + "inputs": [ + { + "internalType": "contract StakedEXA", + "name": "stEXA_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "allClaimable", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct RewardAmount[]", + "name": "claimableRewards", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "allClaimable", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct RewardAmount[]", + "name": "claimableRewards", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "allClaimed", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct RewardAmount[]", + "name": "claimedRewards", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "allEarned", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct RewardAmount[]", + "name": "earnedRewards", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "allRewards", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "finishAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimable", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "earned", + "type": "uint256" + } + ], + "internalType": "struct RewardAccount[]", + "name": "rewards", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "claimable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "earned", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "parameters", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "refTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "excessFactor", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "penaltyGrowth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "penaltyThreshold", + "type": "uint256" + }, + { + "internalType": "contract Market", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "internalType": "address", + "name": "savings", + "type": "address" + }, + { + "internalType": "uint40", + "name": "duration", + "type": "uint40" + }, + { + "internalType": "uint256", + "name": "providerRatio", + "type": "uint256" + } + ], + "internalType": "struct Parameters", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stEXA", + "outputs": [ + { + "internalType": "contract StakedEXA", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "staking", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "refTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "excessFactor", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "penaltyGrowth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "penaltyThreshold", + "type": "uint256" + }, + { + "internalType": "contract Market", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "internalType": "address", + "name": "savings", + "type": "address" + }, + { + "internalType": "uint40", + "name": "duration", + "type": "uint40" + }, + { + "internalType": "uint256", + "name": "providerRatio", + "type": "uint256" + } + ], + "internalType": "struct Parameters", + "name": "parameters", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "totalAssets", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "finishAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimable", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "earned", + "type": "uint256" + } + ], + "internalType": "struct RewardAccount[]", + "name": "rewards", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "internalType": "struct StakingAccount", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xf3a5a1ce8d6575f867f3fba279d2d6cfd338e11caffa8c8db0155032105f7885", + "receipt": { + "to": null, + "from": "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", + "contractAddress": "0x615dDF715D8696d0553021aE7363191de8443584", + "transactionIndex": 6, + "gasUsed": "1678645", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x455262a87887f87fe2b1ce58f9592dabc48ae9e48da7b0ef4bc79342b3d23db5", + "transactionHash": "0xf3a5a1ce8d6575f867f3fba279d2d6cfd338e11caffa8c8db0155032105f7885", + "logs": [], + "blockNumber": 124901382, + "cumulativeGasUsed": "3205914", + "status": 1, + "byzantium": true + }, + "args": [ + "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b" + ], + "numDeployments": 1, + "solcInputHash": "6a557ee70d62b80968609ef7922ee609", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract StakedEXA\",\"name\":\"stEXA_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"allClaimable\",\"outputs\":[{\"components\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct RewardAmount[]\",\"name\":\"claimableRewards\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"allClaimable\",\"outputs\":[{\"components\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct RewardAmount[]\",\"name\":\"claimableRewards\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"allClaimed\",\"outputs\":[{\"components\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct RewardAmount[]\",\"name\":\"claimedRewards\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"allEarned\",\"outputs\":[{\"components\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct RewardAmount[]\",\"name\":\"earnedRewards\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"allRewards\",\"outputs\":[{\"components\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"finishAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimable\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"earned\",\"type\":\"uint256\"}],\"internalType\":\"struct RewardAccount[]\",\"name\":\"rewards\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"claimable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"earned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"parameters\",\"outputs\":[{\"components\":[{\"internalType\":\"contract IERC20\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"refTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"excessFactor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"penaltyGrowth\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"penaltyThreshold\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"savings\",\"type\":\"address\"},{\"internalType\":\"uint40\",\"name\":\"duration\",\"type\":\"uint40\"},{\"internalType\":\"uint256\",\"name\":\"providerRatio\",\"type\":\"uint256\"}],\"internalType\":\"struct Parameters\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stEXA\",\"outputs\":[{\"internalType\":\"contract StakedEXA\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"staking\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"contract IERC20\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"refTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"excessFactor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"penaltyGrowth\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"penaltyThreshold\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"savings\",\"type\":\"address\"},{\"internalType\":\"uint40\",\"name\":\"duration\",\"type\":\"uint40\"},{\"internalType\":\"uint256\",\"name\":\"providerRatio\",\"type\":\"uint256\"}],\"internalType\":\"struct Parameters\",\"name\":\"parameters\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"totalAssets\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"finishAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimable\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"earned\",\"type\":\"uint256\"}],\"internalType\":\"struct RewardAccount[]\",\"name\":\"rewards\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"internalType\":\"struct StakingAccount\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allClaimable(address)\":{\"params\":{\"account\":\"The address of the user for whom to calculate the claimable rewards.\"},\"returns\":{\"claimableRewards\":\"An array of `RewardAmount`, with the reward token and the amount.\"}},\"allClaimable(address,uint256)\":{\"params\":{\"account\":\"The address of the user for whom to calculate the claimable rewards.\",\"shares\":\"The number of shares for which to calculate the claimable rewards.\"},\"returns\":{\"claimableRewards\":\"An array of `RewardAmount`, with the reward token and the amount.\"}},\"allClaimed(address)\":{\"params\":{\"account\":\"The address of the user for whom to calculate the claimed rewards.\"},\"returns\":{\"claimedRewards\":\"An array of `RewardAmount`, with the reward token and the amount.\"}},\"allEarned(address)\":{\"params\":{\"account\":\"The address of the user for whom to calculate the earned rewards.\"},\"returns\":{\"earnedRewards\":\"An array of `RewardAmount`, with the reward token and the amount.\"}},\"claimable(address,address)\":{\"params\":{\"account\":\"The address of the user for whom to calculate the claimable rewards.\",\"reward\":\"The reward token for which to calculate the claimable rewards.\"},\"returns\":{\"_0\":\"The total amount of claimable rewards for the specified user.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"earned(address,address)\":{\"details\":\"Computes earned rewards by taking the product of the account's balance and the difference between the global reward per token and the reward per token already paid to the user. This result is then added to any rewards that have already been accumulated but not yet paid out.\",\"params\":{\"account\":\"The address of the user for whom to calculate the rewards.\"},\"returns\":{\"_0\":\"The total amount of earned rewards for the specified user.\"}}},\"stateVariables\":{\"stEXA\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"StakingPreviewer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"allClaimable(address)\":{\"notice\":\"Returns the rewards and amounts that an account can currently claim.\"},\"allClaimable(address,uint256)\":{\"notice\":\"Returns the rewards and amounts that an account can currently claim for the given shares.\"},\"allClaimed(address)\":{\"notice\":\"Returns the rewards and amounts that an account has already claimed.\"},\"allEarned(address)\":{\"notice\":\"Returns the rewards and amounts that an account has generated.\"},\"claimable(address,address)\":{\"notice\":\"Calculates the amount of rewards that an account can claim.\"},\"earned(address,address)\":{\"notice\":\"Calculates the amount of rewards that an account has earned.\"},\"parameters()\":{\"notice\":\"Returns the staking model parameters.\"},\"staking(address)\":{\"notice\":\"Returns the staking model parameters and account details for a given account.\"}},\"notice\":\"Contract to be consumed as a helper for `StakedEXA`\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/StakingPreviewer.sol\":\"StakingPreviewer\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1111},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable-v4/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 {Initializable} from \\\"../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 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 function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_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(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\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-v4/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-v4/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-v4/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\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\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-v4/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-v4/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport {Initializable} from \\\"../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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\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\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-v4/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-v4/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 {Initializable} from \\\"../../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\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-v4/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-v4/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-v4/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/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAccessControl} from \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\nimport {ContextUpgradeable} from \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {ERC165Upgradeable} from \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport {Initializable} from \\\"../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, IAccessControl, ERC165Upgradeable {\\n struct RoleData {\\n mapping(address account => bool) hasRole;\\n bytes32 adminRole;\\n }\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n\\n /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl\\n struct AccessControlStorage {\\n mapping(bytes32 role => RoleData) _roles;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.AccessControl\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800;\\n\\n function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) {\\n assembly {\\n $.slot := AccessControlStorageLocation\\n }\\n }\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with an {AccessControlUnauthorizedAccount} error including the required role.\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_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(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual returns (bool) {\\n AccessControlStorage storage $ = _getAccessControlStorage();\\n return $._roles[role].hasRole[account];\\n }\\n\\n /**\\n * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`\\n * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`\\n * is missing `role`.\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert AccessControlUnauthorizedAccount(account, role);\\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 returns (bytes32) {\\n AccessControlStorage storage $ = _getAccessControlStorage();\\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 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 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 `callerConfirmation`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address callerConfirmation) public virtual {\\n if (callerConfirmation != _msgSender()) {\\n revert AccessControlBadConfirmation();\\n }\\n\\n _revokeRole(role, callerConfirmation);\\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 AccessControlStorage storage $ = _getAccessControlStorage();\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n $._roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual returns (bool) {\\n AccessControlStorage storage $ = _getAccessControlStorage();\\n if (!hasRole(role, account)) {\\n $._roles[role].hasRole[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {\\n AccessControlStorage storage $ = _getAccessControlStorage();\\n if (hasRole(role, account)) {\\n $._roles[role].hasRole[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n return true;\\n } else {\\n return false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6662ec4e5cefca03eeadd073e9469df8d2944bb2ee8ec8f7622c2c46aab5f225\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.20;\\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 Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error InvalidInitialization();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 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 in the context of a constructor an `initializer` may be invoked any\\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\\n * production.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n // Cache values to avoid duplicated sloads\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n\\n // Allowed calls:\\n // - initialSetup: the contract is not in the initializing state and no previous version was\\n // initialized\\n // - construction: the contract is initialized at version 1 (no reininitialization) and the\\n // current contract is just being deployed\\n bool initialSetup = initialized == 0 && isTopLevelCall;\\n bool construction = initialized == 1 && address(this).code.length == 0;\\n\\n if (!initialSetup && !construction) {\\n revert InvalidInitialization();\\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 2**64 - 1 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert InvalidInitialization();\\n }\\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 _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\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 // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert InvalidInitialization();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._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 _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC20Metadata} from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport {ContextUpgradeable} from \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport {IERC20Errors} from \\\"@openzeppelin/contracts/interfaces/draft-IERC6093.sol\\\";\\nimport {Initializable} from \\\"../../proxy/utils/Initializable.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 *\\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 */\\nabstract contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20, IERC20Metadata, IERC20Errors {\\n /// @custom:storage-location erc7201:openzeppelin.storage.ERC20\\n struct ERC20Storage {\\n mapping(address account => uint256) _balances;\\n\\n mapping(address account => mapping(address spender => uint256)) _allowances;\\n\\n uint256 _totalSupply;\\n\\n string _name;\\n string _symbol;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.ERC20\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant ERC20StorageLocation = 0x52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00;\\n\\n function _getERC20Storage() private pure returns (ERC20Storage storage $) {\\n assembly {\\n $.slot := ERC20StorageLocation\\n }\\n }\\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 function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n ERC20Storage storage $ = _getERC20Storage();\\n $._name = name_;\\n $._symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n ERC20Storage storage $ = _getERC20Storage();\\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 returns (string memory) {\\n ERC20Storage storage $ = _getERC20Storage();\\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 returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual returns (uint256) {\\n ERC20Storage storage $ = _getERC20Storage();\\n return $._totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual returns (uint256) {\\n ERC20Storage storage $ = _getERC20Storage();\\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 `value`.\\n */\\n function transfer(address to, uint256 value) public virtual returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, value);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual returns (uint256) {\\n ERC20Storage storage $ = _getERC20Storage();\\n return $._allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `value` 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 value) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, value);\\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 `value`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `value`.\\n */\\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, value);\\n _transfer(from, to, value);\\n return true;\\n }\\n\\n /**\\n * @dev Moves a `value` 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 * NOTE: This function is not virtual, {_update} should be overridden instead.\\n */\\n function _transfer(address from, address to, uint256 value) internal {\\n if (from == address(0)) {\\n revert ERC20InvalidSender(address(0));\\n }\\n if (to == address(0)) {\\n revert ERC20InvalidReceiver(address(0));\\n }\\n _update(from, to, value);\\n }\\n\\n /**\\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\\n * this function.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _update(address from, address to, uint256 value) internal virtual {\\n ERC20Storage storage $ = _getERC20Storage();\\n if (from == address(0)) {\\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\\n $._totalSupply += value;\\n } else {\\n uint256 fromBalance = $._balances[from];\\n if (fromBalance < value) {\\n revert ERC20InsufficientBalance(from, fromBalance, value);\\n }\\n unchecked {\\n // Overflow not possible: value <= fromBalance <= totalSupply.\\n $._balances[from] = fromBalance - value;\\n }\\n }\\n\\n if (to == address(0)) {\\n unchecked {\\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\\n $._totalSupply -= value;\\n }\\n } else {\\n unchecked {\\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\\n $._balances[to] += value;\\n }\\n }\\n\\n emit Transfer(from, to, value);\\n }\\n\\n /**\\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\\n * Relies on the `_update` mechanism\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * NOTE: This function is not virtual, {_update} should be overridden instead.\\n */\\n function _mint(address account, uint256 value) internal {\\n if (account == address(0)) {\\n revert ERC20InvalidReceiver(address(0));\\n }\\n _update(address(0), account, value);\\n }\\n\\n /**\\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\\n * Relies on the `_update` mechanism.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * NOTE: This function is not virtual, {_update} should be overridden instead\\n */\\n function _burn(address account, uint256 value) internal {\\n if (account == address(0)) {\\n revert ERC20InvalidSender(address(0));\\n }\\n _update(account, address(0), value);\\n }\\n\\n /**\\n * @dev Sets `value` 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 * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\\n */\\n function _approve(address owner, address spender, uint256 value) internal {\\n _approve(owner, spender, value, true);\\n }\\n\\n /**\\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\\n *\\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\\n * `Approval` event during `transferFrom` operations.\\n *\\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\\n * true using the following override:\\n * ```\\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\\n * super._approve(owner, spender, value, true);\\n * }\\n * ```\\n *\\n * Requirements are the same as {_approve}.\\n */\\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\\n ERC20Storage storage $ = _getERC20Storage();\\n if (owner == address(0)) {\\n revert ERC20InvalidApprover(address(0));\\n }\\n if (spender == address(0)) {\\n revert ERC20InvalidSpender(address(0));\\n }\\n $._allowances[owner][spender] = value;\\n if (emitEvent) {\\n emit Approval(owner, spender, value);\\n }\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\\n *\\n * Does not update the allowance value in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Does not emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n if (currentAllowance < value) {\\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\\n }\\n unchecked {\\n _approve(owner, spender, currentAllowance - value, false);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9a1766b1921bf91b3e61eb53c7a6e70725254befd4bdcbbcd3af40bd9f66856f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20Permit} from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\\\";\\nimport {ERC20Upgradeable} from \\\"../ERC20Upgradeable.sol\\\";\\nimport {ECDSA} from \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport {EIP712Upgradeable} from \\\"../../../utils/cryptography/EIP712Upgradeable.sol\\\";\\nimport {NoncesUpgradeable} from \\\"../../../utils/NoncesUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation 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 */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20Permit, EIP712Upgradeable, NoncesUpgradeable {\\n bytes32 private constant PERMIT_TYPEHASH =\\n keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");\\n\\n /**\\n * @dev Permit deadline has expired.\\n */\\n error ERC2612ExpiredSignature(uint256 deadline);\\n\\n /**\\n * @dev Mismatched signature.\\n */\\n error ERC2612InvalidSigner(address signer, address owner);\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal onlyInitializing {\\n __EIP712_init_unchained(name, \\\"1\\\");\\n }\\n\\n function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\\n\\n /**\\n * @inheritdoc IERC20Permit\\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 ) public virtual {\\n if (block.timestamp > deadline) {\\n revert ERC2612ExpiredSignature(deadline);\\n }\\n\\n bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSA.recover(hash, v, r, s);\\n if (signer != owner) {\\n revert ERC2612InvalidSigner(signer, owner);\\n }\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @inheritdoc IERC20Permit\\n */\\n function nonces(address owner) public view virtual override(IERC20Permit, NoncesUpgradeable) returns (uint256) {\\n return super.nonces(owner);\\n }\\n\\n /**\\n * @inheritdoc IERC20Permit\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n}\\n\",\"keccak256\":\"0x8a97653aeba40e9f0c2e8df1a1379b29b927b6dc3534040c668e71ad9ae89d88\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC4626Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC4626.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC20Metadata} from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport {ERC20Upgradeable} from \\\"../ERC20Upgradeable.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {IERC4626} from \\\"@openzeppelin/contracts/interfaces/IERC4626.sol\\\";\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport {Initializable} from \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the ERC4626 \\\"Tokenized Vault Standard\\\" as defined in\\n * https://eips.ethereum.org/EIPS/eip-4626[EIP-4626].\\n *\\n * This extension allows the minting and burning of \\\"shares\\\" (represented using the ERC20 inheritance) in exchange for\\n * underlying \\\"assets\\\" through standardized {deposit}, {mint}, {redeem} and {burn} workflows. This contract extends\\n * the ERC20 standard. Any additional extensions included along it would affect the \\\"shares\\\" token represented by this\\n * contract and not the \\\"assets\\\" token which is an independent contract.\\n *\\n * [CAUTION]\\n * ====\\n * In empty (or nearly empty) ERC-4626 vaults, deposits are at high risk of being stolen through frontrunning\\n * with a \\\"donation\\\" to the vault that inflates the price of a share. This is variously known as a donation or inflation\\n * attack and is essentially a problem of slippage. Vault deployers can protect against this attack by making an initial\\n * deposit of a non-trivial amount of the asset, such that price manipulation becomes infeasible. Withdrawals may\\n * similarly be affected by slippage. Users can protect against this attack as well as unexpected slippage in general by\\n * verifying the amount received is as expected, using a wrapper that performs these checks such as\\n * https://github.com/fei-protocol/ERC4626#erc4626router-and-base[ERC4626Router].\\n *\\n * Since v4.9, this implementation uses virtual assets and shares to mitigate that risk. The `_decimalsOffset()`\\n * corresponds to an offset in the decimal representation between the underlying asset's decimals and the vault\\n * decimals. This offset also determines the rate of virtual shares to virtual assets in the vault, which itself\\n * determines the initial exchange rate. While not fully preventing the attack, analysis shows that the default offset\\n * (0) makes it non-profitable, as a result of the value being captured by the virtual shares (out of the attacker's\\n * donation) matching the attacker's expected gains. With a larger offset, the attack becomes orders of magnitude more\\n * expensive than it is profitable. More details about the underlying math can be found\\n * xref:erc4626.adoc#inflation-attack[here].\\n *\\n * The drawback of this approach is that the virtual shares do capture (a very small) part of the value being accrued\\n * to the vault. Also, if the vault experiences losses, the users try to exit the vault, the virtual shares and assets\\n * will cause the first user to exit to experience reduced losses in detriment to the last users that will experience\\n * bigger losses. Developers willing to revert back to the pre-v4.9 behavior just need to override the\\n * `_convertToShares` and `_convertToAssets` functions.\\n *\\n * To learn more, check out our xref:ROOT:erc4626.adoc[ERC-4626 guide].\\n * ====\\n */\\nabstract contract ERC4626Upgradeable is Initializable, ERC20Upgradeable, IERC4626 {\\n using Math for uint256;\\n\\n /// @custom:storage-location erc7201:openzeppelin.storage.ERC4626\\n struct ERC4626Storage {\\n IERC20 _asset;\\n uint8 _underlyingDecimals;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.ERC4626\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant ERC4626StorageLocation = 0x0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00;\\n\\n function _getERC4626Storage() private pure returns (ERC4626Storage storage $) {\\n assembly {\\n $.slot := ERC4626StorageLocation\\n }\\n }\\n\\n /**\\n * @dev Attempted to deposit more assets than the max amount for `receiver`.\\n */\\n error ERC4626ExceededMaxDeposit(address receiver, uint256 assets, uint256 max);\\n\\n /**\\n * @dev Attempted to mint more shares than the max amount for `receiver`.\\n */\\n error ERC4626ExceededMaxMint(address receiver, uint256 shares, uint256 max);\\n\\n /**\\n * @dev Attempted to withdraw more assets than the max amount for `receiver`.\\n */\\n error ERC4626ExceededMaxWithdraw(address owner, uint256 assets, uint256 max);\\n\\n /**\\n * @dev Attempted to redeem more shares than the max amount for `receiver`.\\n */\\n error ERC4626ExceededMaxRedeem(address owner, uint256 shares, uint256 max);\\n\\n /**\\n * @dev Set the underlying asset contract. This must be an ERC20-compatible contract (ERC20 or ERC777).\\n */\\n function __ERC4626_init(IERC20 asset_) internal onlyInitializing {\\n __ERC4626_init_unchained(asset_);\\n }\\n\\n function __ERC4626_init_unchained(IERC20 asset_) internal onlyInitializing {\\n ERC4626Storage storage $ = _getERC4626Storage();\\n (bool success, uint8 assetDecimals) = _tryGetAssetDecimals(asset_);\\n $._underlyingDecimals = success ? assetDecimals : 18;\\n $._asset = asset_;\\n }\\n\\n /**\\n * @dev Attempts to fetch the asset decimals. A return value of false indicates that the attempt failed in some way.\\n */\\n function _tryGetAssetDecimals(IERC20 asset_) private view returns (bool, uint8) {\\n (bool success, bytes memory encodedDecimals) = address(asset_).staticcall(\\n abi.encodeCall(IERC20Metadata.decimals, ())\\n );\\n if (success && encodedDecimals.length >= 32) {\\n uint256 returnedDecimals = abi.decode(encodedDecimals, (uint256));\\n if (returnedDecimals <= type(uint8).max) {\\n return (true, uint8(returnedDecimals));\\n }\\n }\\n return (false, 0);\\n }\\n\\n /**\\n * @dev Decimals are computed by adding the decimal offset on top of the underlying asset's decimals. This\\n * \\\"original\\\" value is cached during construction of the vault contract. If this read operation fails (e.g., the\\n * asset has not been created yet), a default of 18 is used to represent the underlying asset's decimals.\\n *\\n * See {IERC20Metadata-decimals}.\\n */\\n function decimals() public view virtual override(IERC20Metadata, ERC20Upgradeable) returns (uint8) {\\n ERC4626Storage storage $ = _getERC4626Storage();\\n return $._underlyingDecimals + _decimalsOffset();\\n }\\n\\n /** @dev See {IERC4626-asset}. */\\n function asset() public view virtual returns (address) {\\n ERC4626Storage storage $ = _getERC4626Storage();\\n return address($._asset);\\n }\\n\\n /** @dev See {IERC4626-totalAssets}. */\\n function totalAssets() public view virtual returns (uint256) {\\n ERC4626Storage storage $ = _getERC4626Storage();\\n return $._asset.balanceOf(address(this));\\n }\\n\\n /** @dev See {IERC4626-convertToShares}. */\\n function convertToShares(uint256 assets) public view virtual returns (uint256) {\\n return _convertToShares(assets, Math.Rounding.Floor);\\n }\\n\\n /** @dev See {IERC4626-convertToAssets}. */\\n function convertToAssets(uint256 shares) public view virtual returns (uint256) {\\n return _convertToAssets(shares, Math.Rounding.Floor);\\n }\\n\\n /** @dev See {IERC4626-maxDeposit}. */\\n function maxDeposit(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n /** @dev See {IERC4626-maxMint}. */\\n function maxMint(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n /** @dev See {IERC4626-maxWithdraw}. */\\n function maxWithdraw(address owner) public view virtual returns (uint256) {\\n return _convertToAssets(balanceOf(owner), Math.Rounding.Floor);\\n }\\n\\n /** @dev See {IERC4626-maxRedeem}. */\\n function maxRedeem(address owner) public view virtual returns (uint256) {\\n return balanceOf(owner);\\n }\\n\\n /** @dev See {IERC4626-previewDeposit}. */\\n function previewDeposit(uint256 assets) public view virtual returns (uint256) {\\n return _convertToShares(assets, Math.Rounding.Floor);\\n }\\n\\n /** @dev See {IERC4626-previewMint}. */\\n function previewMint(uint256 shares) public view virtual returns (uint256) {\\n return _convertToAssets(shares, Math.Rounding.Ceil);\\n }\\n\\n /** @dev See {IERC4626-previewWithdraw}. */\\n function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\\n return _convertToShares(assets, Math.Rounding.Ceil);\\n }\\n\\n /** @dev See {IERC4626-previewRedeem}. */\\n function previewRedeem(uint256 shares) public view virtual returns (uint256) {\\n return _convertToAssets(shares, Math.Rounding.Floor);\\n }\\n\\n /** @dev See {IERC4626-deposit}. */\\n function deposit(uint256 assets, address receiver) public virtual returns (uint256) {\\n uint256 maxAssets = maxDeposit(receiver);\\n if (assets > maxAssets) {\\n revert ERC4626ExceededMaxDeposit(receiver, assets, maxAssets);\\n }\\n\\n uint256 shares = previewDeposit(assets);\\n _deposit(_msgSender(), receiver, assets, shares);\\n\\n return shares;\\n }\\n\\n /** @dev See {IERC4626-mint}.\\n *\\n * As opposed to {deposit}, minting is allowed even if the vault is in a state where the price of a share is zero.\\n * In this case, the shares will be minted without requiring any assets to be deposited.\\n */\\n function mint(uint256 shares, address receiver) public virtual returns (uint256) {\\n uint256 maxShares = maxMint(receiver);\\n if (shares > maxShares) {\\n revert ERC4626ExceededMaxMint(receiver, shares, maxShares);\\n }\\n\\n uint256 assets = previewMint(shares);\\n _deposit(_msgSender(), receiver, assets, shares);\\n\\n return assets;\\n }\\n\\n /** @dev See {IERC4626-withdraw}. */\\n function withdraw(uint256 assets, address receiver, address owner) public virtual returns (uint256) {\\n uint256 maxAssets = maxWithdraw(owner);\\n if (assets > maxAssets) {\\n revert ERC4626ExceededMaxWithdraw(owner, assets, maxAssets);\\n }\\n\\n uint256 shares = previewWithdraw(assets);\\n _withdraw(_msgSender(), receiver, owner, assets, shares);\\n\\n return shares;\\n }\\n\\n /** @dev See {IERC4626-redeem}. */\\n function redeem(uint256 shares, address receiver, address owner) public virtual returns (uint256) {\\n uint256 maxShares = maxRedeem(owner);\\n if (shares > maxShares) {\\n revert ERC4626ExceededMaxRedeem(owner, shares, maxShares);\\n }\\n\\n uint256 assets = previewRedeem(shares);\\n _withdraw(_msgSender(), receiver, owner, assets, shares);\\n\\n return assets;\\n }\\n\\n /**\\n * @dev Internal conversion function (from assets to shares) with support for rounding direction.\\n */\\n function _convertToShares(uint256 assets, Math.Rounding rounding) internal view virtual returns (uint256) {\\n return assets.mulDiv(totalSupply() + 10 ** _decimalsOffset(), totalAssets() + 1, rounding);\\n }\\n\\n /**\\n * @dev Internal conversion function (from shares to assets) with support for rounding direction.\\n */\\n function _convertToAssets(uint256 shares, Math.Rounding rounding) internal view virtual returns (uint256) {\\n return shares.mulDiv(totalAssets() + 1, totalSupply() + 10 ** _decimalsOffset(), rounding);\\n }\\n\\n /**\\n * @dev Deposit/mint common workflow.\\n */\\n function _deposit(address caller, address receiver, uint256 assets, uint256 shares) internal virtual {\\n ERC4626Storage storage $ = _getERC4626Storage();\\n // If _asset is ERC777, `transferFrom` can trigger a reentrancy BEFORE the transfer happens through the\\n // `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer,\\n // calls the vault, which is assumed not malicious.\\n //\\n // Conclusion: we need to do the transfer before we mint so that any reentrancy would happen before the\\n // assets are transferred and before the shares are minted, which is a valid state.\\n // slither-disable-next-line reentrancy-no-eth\\n SafeERC20.safeTransferFrom($._asset, caller, address(this), assets);\\n _mint(receiver, shares);\\n\\n emit Deposit(caller, receiver, assets, shares);\\n }\\n\\n /**\\n * @dev Withdraw/redeem common workflow.\\n */\\n function _withdraw(\\n address caller,\\n address receiver,\\n address owner,\\n uint256 assets,\\n uint256 shares\\n ) internal virtual {\\n ERC4626Storage storage $ = _getERC4626Storage();\\n if (caller != owner) {\\n _spendAllowance(owner, caller, shares);\\n }\\n\\n // If _asset is ERC777, `transfer` can trigger a reentrancy AFTER the transfer happens through the\\n // `tokensReceived` hook. On the other hand, the `tokensToSend` hook, that is triggered before the transfer,\\n // calls the vault, which is assumed not malicious.\\n //\\n // Conclusion: we need to do the transfer after the burn so that any reentrancy would happen after the\\n // shares are burned and after the assets are transferred, which is a valid state.\\n _burn(owner, shares);\\n SafeERC20.safeTransfer($._asset, receiver, assets);\\n\\n emit Withdraw(caller, receiver, owner, assets, shares);\\n }\\n\\n function _decimalsOffset() internal view virtual returns (uint8) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0x965c2122f57aa6b11e715d089065310dc72d757a873a4c68a171950853fddbc1\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\nimport {Initializable} from \\\"../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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)\\npragma solidity ^0.8.20;\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides tracking nonces for addresses. Nonces will only increment.\\n */\\nabstract contract NoncesUpgradeable is Initializable {\\n /**\\n * @dev The nonce used for an `account` is not the expected current nonce.\\n */\\n error InvalidAccountNonce(address account, uint256 currentNonce);\\n\\n /// @custom:storage-location erc7201:openzeppelin.storage.Nonces\\n struct NoncesStorage {\\n mapping(address account => uint256) _nonces;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Nonces\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant NoncesStorageLocation = 0x5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00;\\n\\n function _getNoncesStorage() private pure returns (NoncesStorage storage $) {\\n assembly {\\n $.slot := NoncesStorageLocation\\n }\\n }\\n\\n function __Nonces_init() internal onlyInitializing {\\n }\\n\\n function __Nonces_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev Returns the next unused nonce for an address.\\n */\\n function nonces(address owner) public view virtual returns (uint256) {\\n NoncesStorage storage $ = _getNoncesStorage();\\n return $._nonces[owner];\\n }\\n\\n /**\\n * @dev Consumes a nonce.\\n *\\n * Returns the current value and increments nonce.\\n */\\n function _useNonce(address owner) internal virtual returns (uint256) {\\n NoncesStorage storage $ = _getNoncesStorage();\\n // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be\\n // decremented or reset. This guarantees that the nonce never overflows.\\n unchecked {\\n // It is important to do x++ and not ++x here.\\n return $._nonces[owner]++;\\n }\\n }\\n\\n /**\\n * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.\\n */\\n function _useCheckedNonce(address owner, uint256 nonce) internal virtual {\\n uint256 current = _useNonce(owner);\\n if (nonce != current) {\\n revert InvalidAccountNonce(owner, current);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x778f4a1546a1c6c726ecc8e2348a2789690fb8f26e12bd9d89537669167b79a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {ContextUpgradeable} from \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /// @custom:storage-location erc7201:openzeppelin.storage.Pausable\\n struct PausableStorage {\\n bool _paused;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Pausable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300;\\n\\n function _getPausableStorage() private pure returns (PausableStorage storage $) {\\n assembly {\\n $.slot := PausableStorageLocation\\n }\\n }\\n\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n /**\\n * @dev The operation failed because the contract is paused.\\n */\\n error EnforcedPause();\\n\\n /**\\n * @dev The operation failed because the contract is not paused.\\n */\\n error ExpectedPause();\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n PausableStorage storage $ = _getPausableStorage();\\n $._paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n PausableStorage storage $ = _getPausableStorage();\\n return $._paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n if (paused()) {\\n revert EnforcedPause();\\n }\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n if (!paused()) {\\n revert ExpectedPause();\\n }\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n PausableStorage storage $ = _getPausableStorage();\\n $._paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n PausableStorage storage $ = _getPausableStorage();\\n $._paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x92915b7f7f642c6be3f65bfd1522feb5d5b6ef25f755f4dbb51df32c868f2f97\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {MessageHashUtils} from \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\nimport {IERC5267} from \\\"@openzeppelin/contracts/interfaces/IERC5267.sol\\\";\\nimport {Initializable} from \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\\n */\\nabstract contract EIP712Upgradeable is Initializable, IERC5267 {\\n bytes32 private constant TYPE_HASH =\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /// @custom:storage-location erc7201:openzeppelin.storage.EIP712\\n struct EIP712Storage {\\n /// @custom:oz-renamed-from _HASHED_NAME\\n bytes32 _hashedName;\\n /// @custom:oz-renamed-from _HASHED_VERSION\\n bytes32 _hashedVersion;\\n\\n string _name;\\n string _version;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.EIP712\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100;\\n\\n function _getEIP712Storage() private pure returns (EIP712Storage storage $) {\\n assembly {\\n $.slot := EIP712StorageLocation\\n }\\n }\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n EIP712Storage storage $ = _getEIP712Storage();\\n $._name = name;\\n $._version = version;\\n\\n // Reset prior values in storage if upgrading\\n $._hashedName = 0;\\n $._hashedVersion = 0;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator();\\n }\\n\\n function _buildDomainSeparator() private view returns (bytes32) {\\n return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev See {IERC-5267}.\\n */\\n function eip712Domain()\\n public\\n view\\n virtual\\n returns (\\n bytes1 fields,\\n string memory name,\\n string memory version,\\n uint256 chainId,\\n address verifyingContract,\\n bytes32 salt,\\n uint256[] memory extensions\\n )\\n {\\n EIP712Storage storage $ = _getEIP712Storage();\\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\\n // and the EIP712 domain is not reliable, as it will be missing name and version.\\n require($._hashedName == 0 && $._hashedVersion == 0, \\\"EIP712: Uninitialized\\\");\\n\\n return (\\n hex\\\"0f\\\", // 01111\\n _EIP712Name(),\\n _EIP712Version(),\\n block.chainid,\\n address(this),\\n bytes32(0),\\n new uint256[](0)\\n );\\n }\\n\\n /**\\n * @dev The name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712Name() internal view virtual returns (string memory) {\\n EIP712Storage storage $ = _getEIP712Storage();\\n return $._name;\\n }\\n\\n /**\\n * @dev The version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712Version() internal view virtual returns (string memory) {\\n EIP712Storage storage $ = _getEIP712Storage();\\n return $._version;\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\\n */\\n function _EIP712NameHash() internal view returns (bytes32) {\\n EIP712Storage storage $ = _getEIP712Storage();\\n string memory name = _EIP712Name();\\n if (bytes(name).length > 0) {\\n return keccak256(bytes(name));\\n } else {\\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\\n bytes32 hashedName = $._hashedName;\\n if (hashedName != 0) {\\n return hashedName;\\n } else {\\n return keccak256(\\\"\\\");\\n }\\n }\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\\n */\\n function _EIP712VersionHash() internal view returns (bytes32) {\\n EIP712Storage storage $ = _getEIP712Storage();\\n string memory version = _EIP712Version();\\n if (bytes(version).length > 0) {\\n return keccak256(bytes(version));\\n } else {\\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\\n bytes32 hashedVersion = $._hashedVersion;\\n if (hashedVersion != 0) {\\n return hashedVersion;\\n } else {\\n return keccak256(\\\"\\\");\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x85462422a22578744581e012e9aa0a391958cb360288b0b63f29bf0431d70327\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC165} from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport {Initializable} from \\\"../../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 */\\nabstract contract ERC165Upgradeable is Initializable, IERC165 {\\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 returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xdaba3f7c42c55b2896353f32bd27d4d5f8bae741b3b05d4c53f67abc4dc47ce8\",\"license\":\"MIT\"},\"@openzeppelin/contracts-v4/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-v4/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/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev The `account` is missing a role.\\n */\\n error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);\\n\\n /**\\n * @dev The caller of a function is not the expected one.\\n *\\n * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\\n */\\n error AccessControlBadConfirmation();\\n\\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 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 `callerConfirmation`.\\n */\\n function renounceRole(bytes32 role, address callerConfirmation) external;\\n}\\n\",\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4626.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\nimport {IERC20Metadata} from \\\"../token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\n/**\\n * @dev Interface of the ERC4626 \\\"Tokenized Vault Standard\\\", as defined in\\n * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].\\n */\\ninterface IERC4626 is IERC20, IERC20Metadata {\\n event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed sender,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /**\\n * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.\\n *\\n * - MUST be an ERC-20 token contract.\\n * - MUST NOT revert.\\n */\\n function asset() external view returns (address assetTokenAddress);\\n\\n /**\\n * @dev Returns the total amount of the underlying asset that is \\u201cmanaged\\u201d by Vault.\\n *\\n * - SHOULD include any compounding that occurs from yield.\\n * - MUST be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT revert.\\n */\\n function totalAssets() external view returns (uint256 totalManagedAssets);\\n\\n /**\\n * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal\\n * scenario where all the conditions are met.\\n *\\n * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT show any variations depending on the caller.\\n * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\\n * - MUST NOT revert.\\n *\\n * NOTE: This calculation MAY NOT reflect the \\u201cper-user\\u201d price-per-share, and instead should reflect the\\n * \\u201caverage-user\\u2019s\\u201d price-per-share, meaning what the average user should expect to see when exchanging to and\\n * from.\\n */\\n function convertToShares(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal\\n * scenario where all the conditions are met.\\n *\\n * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT show any variations depending on the caller.\\n * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\\n * - MUST NOT revert.\\n *\\n * NOTE: This calculation MAY NOT reflect the \\u201cper-user\\u201d price-per-share, and instead should reflect the\\n * \\u201caverage-user\\u2019s\\u201d price-per-share, meaning what the average user should expect to see when exchanging to and\\n * from.\\n */\\n function convertToAssets(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,\\n * through a deposit call.\\n *\\n * - MUST return a limited value if receiver is subject to some deposit limit.\\n * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.\\n * - MUST NOT revert.\\n */\\n function maxDeposit(address receiver) external view returns (uint256 maxAssets);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given\\n * current on-chain conditions.\\n *\\n * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit\\n * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called\\n * in the same transaction.\\n * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the\\n * deposit would be accepted, regardless if the user has enough tokens approved, etc.\\n * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by depositing.\\n */\\n function previewDeposit(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.\\n *\\n * - MUST emit the Deposit event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * deposit execution, and are accounted for during deposit.\\n * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not\\n * approving enough underlying tokens to the Vault contract, etc).\\n *\\n * NOTE: most implementations will require pre-approval of the Vault with the Vault\\u2019s underlying asset token.\\n */\\n function deposit(uint256 assets, address receiver) external returns (uint256 shares);\\n\\n /**\\n * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.\\n * - MUST return a limited value if receiver is subject to some mint limit.\\n * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.\\n * - MUST NOT revert.\\n */\\n function maxMint(address receiver) external view returns (uint256 maxShares);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given\\n * current on-chain conditions.\\n *\\n * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call\\n * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the\\n * same transaction.\\n * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint\\n * would be accepted, regardless if the user has enough tokens approved, etc.\\n * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by minting.\\n */\\n function previewMint(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.\\n *\\n * - MUST emit the Deposit event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint\\n * execution, and are accounted for during mint.\\n * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not\\n * approving enough underlying tokens to the Vault contract, etc).\\n *\\n * NOTE: most implementations will require pre-approval of the Vault with the Vault\\u2019s underlying asset token.\\n */\\n function mint(uint256 shares, address receiver) external returns (uint256 assets);\\n\\n /**\\n * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the\\n * Vault, through a withdraw call.\\n *\\n * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\\n * - MUST NOT revert.\\n */\\n function maxWithdraw(address owner) external view returns (uint256 maxAssets);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,\\n * given current on-chain conditions.\\n *\\n * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw\\n * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if\\n * called\\n * in the same transaction.\\n * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though\\n * the withdrawal would be accepted, regardless if the user has enough shares, etc.\\n * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by depositing.\\n */\\n function previewWithdraw(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.\\n *\\n * - MUST emit the Withdraw event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * withdraw execution, and are accounted for during withdraw.\\n * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner\\n * not having enough shares, etc).\\n *\\n * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\\n * Those methods should be performed separately.\\n */\\n function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);\\n\\n /**\\n * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,\\n * through a redeem call.\\n *\\n * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\\n * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.\\n * - MUST NOT revert.\\n */\\n function maxRedeem(address owner) external view returns (uint256 maxShares);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,\\n * given current on-chain conditions.\\n *\\n * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call\\n * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the\\n * same transaction.\\n * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the\\n * redemption would be accepted, regardless if the user has enough shares, etc.\\n * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by redeeming.\\n */\\n function previewRedeem(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.\\n *\\n * - MUST emit the Withdraw event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * redeem execution, and are accounted for during redeem.\\n * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner\\n * not having enough shares, etc).\\n *\\n * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\\n * Those methods should be performed separately.\\n */\\n function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);\\n}\\n\",\"keccak256\":\"0x207f64371bc0fcc5be86713aa5da109a870cc3a6da50e93b64ee881e369b593d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC5267.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\\n\\npragma solidity ^0.8.20;\\n\\ninterface IERC5267 {\\n /**\\n * @dev MAY be emitted to signal that the domain could have changed.\\n */\\n event EIP712DomainChanged();\\n\\n /**\\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\\n * signature.\\n */\\n function eip712Domain()\\n external\\n view\\n returns (\\n bytes1 fields,\\n string memory name,\\n string memory version,\\n uint256 chainId,\\n address verifyingContract,\\n bytes32 salt,\\n uint256[] memory extensions\\n );\\n}\\n\",\"keccak256\":\"0x92aa1df62dc3d33f1656d63bede0923e0df0b706ad4137c8b10b0a8fe549fd92\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC6372.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC6372.sol)\\n\\npragma solidity ^0.8.20;\\n\\ninterface IERC6372 {\\n /**\\n * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).\\n */\\n function clock() external view returns (uint48);\\n\\n /**\\n * @dev Description of the clock\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function CLOCK_MODE() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xeb2857b7dafb7e0d8526dbfe794e6c047df2851c9e6ee91dc4a55f3c34af5d33\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard ERC20 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\\n */\\ninterface IERC20Errors {\\n /**\\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param balance Current balance for the interacting account.\\n * @param needed Minimum amount required to perform a transfer.\\n */\\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC20InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC20InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\\n * @param spender Address that may be allowed to operate on tokens without being their owner.\\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\\n * @param needed Minimum amount required to perform a transfer.\\n */\\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC20InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\\n * @param spender Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC20InvalidSpender(address spender);\\n}\\n\\n/**\\n * @dev Standard ERC721 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\\n */\\ninterface IERC721Errors {\\n /**\\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\\n * Used in balance queries.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC721InvalidOwner(address owner);\\n\\n /**\\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC721NonexistentToken(uint256 tokenId);\\n\\n /**\\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param tokenId Identifier number of a token.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC721InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC721InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC721InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC721InvalidOperator(address operator);\\n}\\n\\n/**\\n * @dev Standard ERC1155 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\\n */\\ninterface IERC1155Errors {\\n /**\\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param balance Current balance for the interacting account.\\n * @param needed Minimum amount required to perform a transfer.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC1155InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC1155InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC1155MissingApprovalForAll(address operator, address owner);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC1155InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC1155InvalidOperator(address operator);\\n\\n /**\\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\\n * Used in batch transfers.\\n * @param idsLength Length of the array of token identifiers\\n * @param valuesLength Length of the array of token amounts\\n */\\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\\n}\\n\",\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC20Metadata} from \\\"./extensions/IERC20Metadata.sol\\\";\\nimport {Context} from \\\"../../utils/Context.sol\\\";\\nimport {IERC20Errors} from \\\"../../interfaces/draft-IERC6093.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 *\\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 */\\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\\n mapping(address account => uint256) private _balances;\\n\\n mapping(address account => mapping(address spender => 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 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 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 returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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 `value`.\\n */\\n function transfer(address to, uint256 value) public virtual returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, value);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `value` 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 value) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, value);\\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 `value`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `value`.\\n */\\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, value);\\n _transfer(from, to, value);\\n return true;\\n }\\n\\n /**\\n * @dev Moves a `value` 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 * NOTE: This function is not virtual, {_update} should be overridden instead.\\n */\\n function _transfer(address from, address to, uint256 value) internal {\\n if (from == address(0)) {\\n revert ERC20InvalidSender(address(0));\\n }\\n if (to == address(0)) {\\n revert ERC20InvalidReceiver(address(0));\\n }\\n _update(from, to, value);\\n }\\n\\n /**\\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\\n * this function.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _update(address from, address to, uint256 value) internal virtual {\\n if (from == address(0)) {\\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\\n _totalSupply += value;\\n } else {\\n uint256 fromBalance = _balances[from];\\n if (fromBalance < value) {\\n revert ERC20InsufficientBalance(from, fromBalance, value);\\n }\\n unchecked {\\n // Overflow not possible: value <= fromBalance <= totalSupply.\\n _balances[from] = fromBalance - value;\\n }\\n }\\n\\n if (to == address(0)) {\\n unchecked {\\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\\n _totalSupply -= value;\\n }\\n } else {\\n unchecked {\\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\\n _balances[to] += value;\\n }\\n }\\n\\n emit Transfer(from, to, value);\\n }\\n\\n /**\\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\\n * Relies on the `_update` mechanism\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * NOTE: This function is not virtual, {_update} should be overridden instead.\\n */\\n function _mint(address account, uint256 value) internal {\\n if (account == address(0)) {\\n revert ERC20InvalidReceiver(address(0));\\n }\\n _update(address(0), account, value);\\n }\\n\\n /**\\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\\n * Relies on the `_update` mechanism.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * NOTE: This function is not virtual, {_update} should be overridden instead\\n */\\n function _burn(address account, uint256 value) internal {\\n if (account == address(0)) {\\n revert ERC20InvalidSender(address(0));\\n }\\n _update(account, address(0), value);\\n }\\n\\n /**\\n * @dev Sets `value` 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 * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\\n */\\n function _approve(address owner, address spender, uint256 value) internal {\\n _approve(owner, spender, value, true);\\n }\\n\\n /**\\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\\n *\\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\\n * `Approval` event during `transferFrom` operations.\\n *\\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\\n * true using the following override:\\n * ```\\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\\n * super._approve(owner, spender, value, true);\\n * }\\n * ```\\n *\\n * Requirements are the same as {_approve}.\\n */\\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\\n if (owner == address(0)) {\\n revert ERC20InvalidApprover(address(0));\\n }\\n if (spender == address(0)) {\\n revert ERC20InvalidSpender(address(0));\\n }\\n _allowances[owner][spender] = value;\\n if (emitEvent) {\\n emit Approval(owner, spender, value);\\n }\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\\n *\\n * Does not update the allowance value in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Does not emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n if (currentAllowance < value) {\\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\\n }\\n unchecked {\\n _approve(owner, spender, currentAllowance - value, false);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\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 value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens as the allowance of `spender` over the\\n * 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 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` 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 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\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\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.20;\\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 *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\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 * CAUTION: See Security Considerations above.\\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\":\"0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC20Permit} from \\\"../extensions/IERC20Permit.sol\\\";\\nimport {Address} from \\\"../../../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 An operation with an ERC20 token failed.\\n */\\n error SafeERC20FailedOperation(address token);\\n\\n /**\\n * @dev Indicates a failed `decreaseAllowance` request.\\n */\\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\\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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, 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 forceApprove(token, spender, oldAllowance + value);\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\\n * value, non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\\n unchecked {\\n uint256 currentAllowance = token.allowance(address(this), spender);\\n if (currentAllowance < requestedDecrease) {\\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\\n }\\n forceApprove(token, spender, currentAllowance - requestedDecrease);\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data);\\n if (returndata.length != 0 && !abi.decode(returndata, (bool))) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * 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 success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;\\n }\\n}\\n\",\"keccak256\":\"0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev The ETH balance of the account is not enough to perform the operation.\\n */\\n error AddressInsufficientBalance(address account);\\n\\n /**\\n * @dev There's no code at `target` (it is not a contract).\\n */\\n error AddressEmptyCode(address target);\\n\\n /**\\n * @dev A call to an address target failed. The target may have reverted.\\n */\\n error FailedInnerCall();\\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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n if (address(this).balance < amount) {\\n revert AddressInsufficientBalance(address(this));\\n }\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n if (!success) {\\n revert FailedInnerCall();\\n }\\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 or custom error, it is bubbled\\n * up by this function (like regular Solidity function calls). However, if\\n * the call reverted with no returned reason, this function reverts with a\\n * {FailedInnerCall} error.\\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 function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0);\\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 function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n if (address(this).balance < value) {\\n revert AddressInsufficientBalance(address(this));\\n }\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\\n * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an\\n * unsuccessful call.\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata\\n ) internal view returns (bytes memory) {\\n if (!success) {\\n _revert(returndata);\\n } else {\\n // only check if target is a contract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n if (returndata.length == 0 && target.code.length == 0) {\\n revert AddressEmptyCode(target);\\n }\\n return returndata;\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\\n * revert reason or with a default {FailedInnerCall} error.\\n */\\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\\n if (!success) {\\n _revert(returndata);\\n } else {\\n return returndata;\\n }\\n }\\n\\n /**\\n * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.\\n */\\n function _revert(bytes memory returndata) 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 FailedInnerCall();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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 = Math.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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.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, Math.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 uint256 localValue = value;\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS\\n }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS, s);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\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 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 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 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 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 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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.20;\\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 */\\nlibrary SafeCast {\\n /**\\n * @dev Value doesn't fit in an uint of `bits` size.\\n */\\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\\n\\n /**\\n * @dev An int value doesn't fit in an uint of `bits` size.\\n */\\n error SafeCastOverflowedIntToUint(int256 value);\\n\\n /**\\n * @dev Value doesn't fit in an int of `bits` size.\\n */\\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\\n\\n /**\\n * @dev An uint value doesn't fit in an int of `bits` size.\\n */\\n error SafeCastOverflowedUintToInt(uint256 value);\\n\\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 function toUint248(uint256 value) internal pure returns (uint248) {\\n if (value > type(uint248).max) {\\n revert SafeCastOverflowedUintDowncast(248, value);\\n }\\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 function toUint240(uint256 value) internal pure returns (uint240) {\\n if (value > type(uint240).max) {\\n revert SafeCastOverflowedUintDowncast(240, value);\\n }\\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 function toUint232(uint256 value) internal pure returns (uint232) {\\n if (value > type(uint232).max) {\\n revert SafeCastOverflowedUintDowncast(232, value);\\n }\\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 function toUint224(uint256 value) internal pure returns (uint224) {\\n if (value > type(uint224).max) {\\n revert SafeCastOverflowedUintDowncast(224, value);\\n }\\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 function toUint216(uint256 value) internal pure returns (uint216) {\\n if (value > type(uint216).max) {\\n revert SafeCastOverflowedUintDowncast(216, value);\\n }\\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 function toUint208(uint256 value) internal pure returns (uint208) {\\n if (value > type(uint208).max) {\\n revert SafeCastOverflowedUintDowncast(208, value);\\n }\\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 function toUint200(uint256 value) internal pure returns (uint200) {\\n if (value > type(uint200).max) {\\n revert SafeCastOverflowedUintDowncast(200, value);\\n }\\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 function toUint192(uint256 value) internal pure returns (uint192) {\\n if (value > type(uint192).max) {\\n revert SafeCastOverflowedUintDowncast(192, value);\\n }\\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 function toUint184(uint256 value) internal pure returns (uint184) {\\n if (value > type(uint184).max) {\\n revert SafeCastOverflowedUintDowncast(184, value);\\n }\\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 function toUint176(uint256 value) internal pure returns (uint176) {\\n if (value > type(uint176).max) {\\n revert SafeCastOverflowedUintDowncast(176, value);\\n }\\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 function toUint168(uint256 value) internal pure returns (uint168) {\\n if (value > type(uint168).max) {\\n revert SafeCastOverflowedUintDowncast(168, value);\\n }\\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 function toUint160(uint256 value) internal pure returns (uint160) {\\n if (value > type(uint160).max) {\\n revert SafeCastOverflowedUintDowncast(160, value);\\n }\\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 function toUint152(uint256 value) internal pure returns (uint152) {\\n if (value > type(uint152).max) {\\n revert SafeCastOverflowedUintDowncast(152, value);\\n }\\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 function toUint144(uint256 value) internal pure returns (uint144) {\\n if (value > type(uint144).max) {\\n revert SafeCastOverflowedUintDowncast(144, value);\\n }\\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 function toUint136(uint256 value) internal pure returns (uint136) {\\n if (value > type(uint136).max) {\\n revert SafeCastOverflowedUintDowncast(136, value);\\n }\\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 function toUint128(uint256 value) internal pure returns (uint128) {\\n if (value > type(uint128).max) {\\n revert SafeCastOverflowedUintDowncast(128, value);\\n }\\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 function toUint120(uint256 value) internal pure returns (uint120) {\\n if (value > type(uint120).max) {\\n revert SafeCastOverflowedUintDowncast(120, value);\\n }\\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 function toUint112(uint256 value) internal pure returns (uint112) {\\n if (value > type(uint112).max) {\\n revert SafeCastOverflowedUintDowncast(112, value);\\n }\\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 function toUint104(uint256 value) internal pure returns (uint104) {\\n if (value > type(uint104).max) {\\n revert SafeCastOverflowedUintDowncast(104, value);\\n }\\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 function toUint96(uint256 value) internal pure returns (uint96) {\\n if (value > type(uint96).max) {\\n revert SafeCastOverflowedUintDowncast(96, value);\\n }\\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 function toUint88(uint256 value) internal pure returns (uint88) {\\n if (value > type(uint88).max) {\\n revert SafeCastOverflowedUintDowncast(88, value);\\n }\\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 function toUint80(uint256 value) internal pure returns (uint80) {\\n if (value > type(uint80).max) {\\n revert SafeCastOverflowedUintDowncast(80, value);\\n }\\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 function toUint72(uint256 value) internal pure returns (uint72) {\\n if (value > type(uint72).max) {\\n revert SafeCastOverflowedUintDowncast(72, value);\\n }\\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 function toUint64(uint256 value) internal pure returns (uint64) {\\n if (value > type(uint64).max) {\\n revert SafeCastOverflowedUintDowncast(64, value);\\n }\\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 function toUint56(uint256 value) internal pure returns (uint56) {\\n if (value > type(uint56).max) {\\n revert SafeCastOverflowedUintDowncast(56, value);\\n }\\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 function toUint48(uint256 value) internal pure returns (uint48) {\\n if (value > type(uint48).max) {\\n revert SafeCastOverflowedUintDowncast(48, value);\\n }\\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 function toUint40(uint256 value) internal pure returns (uint40) {\\n if (value > type(uint40).max) {\\n revert SafeCastOverflowedUintDowncast(40, value);\\n }\\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 function toUint32(uint256 value) internal pure returns (uint32) {\\n if (value > type(uint32).max) {\\n revert SafeCastOverflowedUintDowncast(32, value);\\n }\\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 function toUint24(uint256 value) internal pure returns (uint24) {\\n if (value > type(uint24).max) {\\n revert SafeCastOverflowedUintDowncast(24, value);\\n }\\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 function toUint16(uint256 value) internal pure returns (uint16) {\\n if (value > type(uint16).max) {\\n revert SafeCastOverflowedUintDowncast(16, value);\\n }\\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 function toUint8(uint256 value) internal pure returns (uint8) {\\n if (value > type(uint8).max) {\\n revert SafeCastOverflowedUintDowncast(8, value);\\n }\\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 function toUint256(int256 value) internal pure returns (uint256) {\\n if (value < 0) {\\n revert SafeCastOverflowedIntToUint(value);\\n }\\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 function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(248, value);\\n }\\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 function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(240, value);\\n }\\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 function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(232, value);\\n }\\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 function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(224, value);\\n }\\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 function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(216, value);\\n }\\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 function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(208, value);\\n }\\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 function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(200, value);\\n }\\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 function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(192, value);\\n }\\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 function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(184, value);\\n }\\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 function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(176, value);\\n }\\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 function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(168, value);\\n }\\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 function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(160, value);\\n }\\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 function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(152, value);\\n }\\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 function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(144, value);\\n }\\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 function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(136, value);\\n }\\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 function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(128, value);\\n }\\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 function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(120, value);\\n }\\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 function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(112, value);\\n }\\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 function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(104, value);\\n }\\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 function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(96, value);\\n }\\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 function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(88, value);\\n }\\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 function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(80, value);\\n }\\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 function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(72, value);\\n }\\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 function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(64, value);\\n }\\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 function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(56, value);\\n }\\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 function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(48, value);\\n }\\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 function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(40, value);\\n }\\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 function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(32, value);\\n }\\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 function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(24, value);\\n }\\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 function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(16, value);\\n }\\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 function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(8, value);\\n }\\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 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 if (value > uint256(type(int256).max)) {\\n revert SafeCastOverflowedUintToInt(value);\\n }\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0xe19a4d5f31d2861e7344e8e535e2feafb913d806d3e2b5fe7782741a2a7094fe\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"contracts/Auditor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract Auditor is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n\\n /// @notice Address that a market should have as price feed to consider as base price and avoid external price call.\\n address public constant BASE_FEED = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n /// @notice Target health factor that the account should have after it's liquidated to prevent cascade liquidations.\\n uint256 public constant TARGET_HEALTH = 1.25e18;\\n /// @notice Maximum value the liquidator can send and still have granular control of max assets.\\n /// Above this threshold, they should send `type(uint256).max`.\\n uint256 public constant ASSETS_THRESHOLD = type(uint256).max / 1e18;\\n\\n /// @notice Decimals that the answer of all price feeds should have.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 public immutable priceDecimals;\\n /// @notice Base factor to scale the price returned by the feed to 18 decimals.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable baseFactor;\\n /// @notice Base price used if the feed to fetch the price from is `BASE_FEED`.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable basePrice;\\n\\n /// @notice Tracks the markets' indexes that an account has entered as collateral.\\n mapping(address => uint256) public accountMarkets;\\n /// @notice Stores market parameters per each enabled market.\\n mapping(Market => MarketData) public markets;\\n /// @notice Array of all enabled markets.\\n Market[] public marketList;\\n\\n /// @notice Liquidation incentive factors for the liquidator and the lenders of the market where the debt is repaid.\\n LiquidationIncentive public liquidationIncentive;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(uint256 priceDecimals_) {\\n priceDecimals = priceDecimals_;\\n baseFactor = 10 ** (18 - priceDecimals_);\\n basePrice = 10 ** priceDecimals_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(LiquidationIncentive memory liquidationIncentive_) external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setLiquidationIncentive(liquidationIncentive_);\\n }\\n\\n /// @notice Allows assets of a certain market to be used as collateral for borrowing other assets.\\n /// @param market market to enabled as collateral.\\n function enterMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) != 0) return;\\n accountMarkets[msg.sender] = marketMap | marketMask;\\n\\n emit MarketEntered(market, msg.sender);\\n }\\n\\n /// @notice Removes market from sender's account liquidity calculation.\\n /// @dev Sender must not have an outstanding borrow balance in the asset, or be providing necessary collateral\\n /// for an outstanding borrow.\\n /// @param market market to be disabled as collateral.\\n function exitMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n (uint256 assets, uint256 debt) = market.accountSnapshot(msg.sender);\\n\\n // fail if the sender has a borrow balance\\n if (debt != 0) revert RemainingDebt();\\n\\n // fail if the sender is not permitted to redeem all of their assets\\n checkShortfall(market, msg.sender, assets);\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) == 0) return;\\n accountMarkets[msg.sender] = marketMap & ~marketMask;\\n\\n emit MarketExited(market, msg.sender);\\n }\\n\\n /// @notice Returns account's liquidity calculation.\\n /// @param account account in which the liquidity will be calculated.\\n /// @param marketToSimulate market in which to simulate withdraw operation.\\n /// @param withdrawAmount amount to simulate as withdraw.\\n /// @return sumCollateral sum of all collateral, already multiplied by each adjust factor (denominated in base).\\n /// @return sumDebtPlusEffects sum of all debt divided by adjust factor considering withdrawal (denominated in base).\\n function accountLiquidity(\\n address account,\\n Market marketToSimulate,\\n uint256 withdrawAmount\\n ) public view returns (uint256 sumCollateral, uint256 sumDebtPlusEffects) {\\n AccountLiquidity memory vars; // holds all our calculation results\\n\\n // for each asset the account is in\\n uint256 marketMap = accountMarkets[account];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 baseUnit = 10 ** m.decimals;\\n uint256 adjustFactor = m.adjustFactor;\\n\\n // read the balances\\n (vars.balance, vars.borrowBalance) = market.accountSnapshot(account);\\n\\n // get the normalized price of the asset (18 decimals)\\n vars.price = assetPrice(m.priceFeed);\\n\\n // sum all the collateral prices\\n sumCollateral += vars.balance.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n\\n // sum all the debt\\n sumDebtPlusEffects += vars.borrowBalance.mulDivUp(vars.price, baseUnit).divWadUp(adjustFactor);\\n\\n // simulate the effects of withdrawing from a pool\\n if (market == marketToSimulate) {\\n // calculate the effects of redeeming markets\\n // (having less collateral is the same as having more debt for this calculation)\\n if (withdrawAmount != 0) {\\n sumDebtPlusEffects += withdrawAmount.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n }\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Validates that the current state of the position and system are valid.\\n /// @dev To be called after adding the borrowed debt to the account position.\\n /// @param market address of the market where the borrow is made.\\n /// @param borrower address of the account that will repay the debt.\\n function checkBorrow(Market market, address borrower) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[borrower];\\n uint256 marketMask = 1 << m.index;\\n\\n // validate borrow state\\n if ((marketMap & marketMask) == 0) {\\n // only markets may call checkBorrow if borrower not in market\\n if (msg.sender != address(market)) revert NotMarket();\\n\\n accountMarkets[borrower] = marketMap | marketMask;\\n emit MarketEntered(market, borrower);\\n }\\n\\n // verify that current liquidity is not short\\n (uint256 collateral, uint256 debt) = accountLiquidity(borrower, Market(address(0)), 0);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Checks if the account has liquidity shortfall.\\n /// @param market address of the market where the operation will happen.\\n /// @param account address of the account to check for possible shortfall.\\n /// @param amount amount that the account wants to withdraw or transfer.\\n function checkShortfall(Market market, address account, uint256 amount) public view {\\n // if the account is not 'in' the market, bypass the liquidity check\\n if ((accountMarkets[account] & (1 << markets[market].index)) == 0) return;\\n\\n // otherwise, perform a hypothetical liquidity check to guard against shortfall\\n (uint256 collateral, uint256 debt) = accountLiquidity(account, market, amount);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Allows/rejects liquidation of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt is being repaid.\\n /// @param seizeMarket market from where the liquidator will seize assets.\\n /// @param borrower address in which the assets are being liquidated.\\n /// @param maxLiquidatorAssets maximum amount of debt the liquidator is willing to accept.\\n /// @return maxRepayAssets capped amount of debt the liquidator is allowed to repay.\\n function checkLiquidation(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 maxLiquidatorAssets\\n ) external view returns (uint256 maxRepayAssets) {\\n // if markets are listed, they have the same auditor\\n if (!markets[repayMarket].isListed || !markets[seizeMarket].isListed) revert MarketNotListed();\\n\\n MarketVars memory repay;\\n LiquidityVars memory base;\\n uint256 marketMap = accountMarkets[borrower];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage marketData = markets[market];\\n MarketVars memory m = MarketVars({\\n price: assetPrice(marketData.priceFeed),\\n adjustFactor: marketData.adjustFactor,\\n baseUnit: 10 ** marketData.decimals\\n });\\n\\n if (market == repayMarket) repay = m;\\n\\n (uint256 collateral, uint256 debt) = market.accountSnapshot(borrower);\\n\\n uint256 value = debt.mulDivUp(m.price, m.baseUnit);\\n base.totalDebt += value;\\n base.adjustedDebt += value.divWadUp(m.adjustFactor);\\n\\n value = collateral.mulDivDown(m.price, m.baseUnit);\\n base.totalCollateral += value;\\n base.adjustedCollateral += value.mulWadDown(m.adjustFactor);\\n if (market == seizeMarket) base.seizeAvailable = value;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (base.adjustedCollateral >= base.adjustedDebt) revert InsufficientShortfall();\\n\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n uint256 adjustFactor = base.adjustedCollateral.mulWadDown(base.totalDebt).divWadUp(\\n base.adjustedDebt.mulWadUp(base.totalCollateral)\\n );\\n uint256 closeFactor = (TARGET_HEALTH - base.adjustedCollateral.divWadUp(base.adjustedDebt)).divWadUp(\\n TARGET_HEALTH - adjustFactor.mulWadDown(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n );\\n maxRepayAssets = Math.min(\\n Math\\n .min(\\n base.totalDebt.mulWadUp(Math.min(1e18, closeFactor)),\\n base.seizeAvailable.divWadUp(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n )\\n .mulDivUp(repay.baseUnit, repay.price),\\n maxLiquidatorAssets < ASSETS_THRESHOLD\\n ? maxLiquidatorAssets.divWadDown(1e18 + memIncentive.lenders)\\n : maxLiquidatorAssets\\n );\\n }\\n\\n /// @notice Allow/rejects seizing of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market where the assets will be seized.\\n function checkSeize(Market repayMarket, Market seizeMarket) external view {\\n // if markets are listed, they also point to the same Auditor\\n if (!markets[seizeMarket].isListed || !markets[repayMarket].isListed) revert MarketNotListed();\\n }\\n\\n /// @notice Calculates the amount of collateral to be seized when a position is undercollateralized.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market from where the assets will be seized by the liquidator.\\n /// @param borrower account in which assets are being seized.\\n /// @param actualRepayAssets amount being repaid.\\n /// @return lendersAssets amount to be added for other lenders as a compensation of bad debt clearing.\\n /// @return seizeAssets amount that can be seized by the liquidator.\\n function calculateSeize(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 actualRepayAssets\\n ) external view returns (uint256 lendersAssets, uint256 seizeAssets) {\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n lendersAssets = actualRepayAssets.mulWadDown(memIncentive.lenders);\\n\\n // read prices for borrowed and collateral markets\\n uint256 priceBorrowed = assetPrice(markets[repayMarket].priceFeed);\\n uint256 priceCollateral = assetPrice(markets[seizeMarket].priceFeed);\\n uint256 baseAmount = actualRepayAssets.mulDivUp(priceBorrowed, 10 ** markets[repayMarket].decimals);\\n\\n seizeAssets = Math.min(\\n baseAmount.mulDivUp(10 ** markets[seizeMarket].decimals, priceCollateral).mulWadUp(\\n 1e18 + memIncentive.liquidator + memIncentive.lenders\\n ),\\n seizeMarket.maxWithdraw(borrower)\\n );\\n }\\n\\n /// @notice Checks if account has debt with no collateral, if so then call `clearBadDebt` from each market.\\n /// @dev Collateral is multiplied by price and adjust factor to be accurately evaluated as positive collateral asset.\\n /// @param account account in which debt is being checked.\\n function handleBadDebt(address account) external {\\n uint256 memMarketMap = accountMarkets[account];\\n uint256 marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 assets = market.maxWithdraw(account);\\n if (assets.mulDivDown(assetPrice(m.priceFeed), 10 ** m.decimals).mulWadDown(m.adjustFactor) > 0) return;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) marketList[i].clearBadDebt(account);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the asset price of a price feed.\\n /// @dev If Chainlink's asset price is <= 0 the call is reverted.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price.\\n /// @return The price of the asset scaled to 18-digit decimals.\\n function assetPrice(IPriceFeed priceFeed) public view returns (uint256) {\\n if (address(priceFeed) == BASE_FEED) return basePrice;\\n\\n int256 price = priceFeed.latestAnswer();\\n if (price <= 0) revert InvalidPrice();\\n return uint256(price) * baseFactor;\\n }\\n\\n /// @notice Retrieves all markets.\\n function allMarkets() external view returns (Market[] memory) {\\n return marketList;\\n }\\n\\n /// @notice Enables a certain market.\\n /// @dev Enabling more than 256 markets will cause an overflow when casting market index to uint8.\\n /// @param market market to add to the protocol.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n /// @param adjustFactor market's adjust factor for the underlying asset.\\n function enableMarket(\\n Market market,\\n IPriceFeed priceFeed,\\n uint128 adjustFactor\\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (market.auditor() != this) revert AuditorMismatch();\\n if (markets[market].isListed) revert MarketAlreadyListed();\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n\\n uint8 decimals = market.decimals();\\n markets[market] = MarketData({\\n isListed: true,\\n adjustFactor: adjustFactor,\\n decimals: decimals,\\n index: uint8(marketList.length),\\n priceFeed: priceFeed\\n });\\n\\n marketList.push(market);\\n\\n emit MarketListed(market, decimals);\\n emit PriceFeedSet(market, priceFeed);\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the adjust factor for a certain market.\\n /// @param market address of the market to change adjust factor for.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n function setAdjustFactor(Market market, uint128 adjustFactor) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (!markets[market].isListed) revert MarketNotListed();\\n\\n markets[market].adjustFactor = adjustFactor;\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the Chainlink Price Feed Aggregator source for a market.\\n /// @param market market address of the asset.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n function setPriceFeed(Market market, IPriceFeed priceFeed) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n markets[market].priceFeed = priceFeed;\\n emit PriceFeedSet(market, priceFeed);\\n }\\n\\n /// @notice Sets liquidation incentive (liquidator and lenders) for the whole ecosystem.\\n /// @param liquidationIncentive_ new liquidation incentive.\\n function setLiquidationIncentive(\\n LiquidationIncentive memory liquidationIncentive_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n liquidationIncentive = liquidationIncentive_;\\n emit LiquidationIncentiveSet(liquidationIncentive_);\\n }\\n\\n /// @notice Emitted when a new market is listed for borrow/lending.\\n /// @param market address of the market that was listed.\\n /// @param decimals decimals of the market's underlying asset.\\n event MarketListed(Market indexed market, uint8 decimals);\\n\\n /// @notice Emitted when an account enters a market to use his deposit as collateral for a loan.\\n /// @param market address of the market that the account entered.\\n /// @param account address of the account that just entered a market.\\n event MarketEntered(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when an account leaves a market.\\n /// Means that they would stop using their deposit as collateral and won't ask for any loans in this market.\\n /// @param market address of the market that the account just left.\\n /// @param account address of the account that just left a market.\\n event MarketExited(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when a adjust factor is changed by admin.\\n /// @param market address of the market that has a new adjust factor.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n event AdjustFactorSet(Market indexed market, uint256 adjustFactor);\\n\\n /// @notice Emitted when a new liquidationIncentive has been set.\\n /// @param liquidationIncentive represented with 18 decimals.\\n event LiquidationIncentiveSet(LiquidationIncentive liquidationIncentive);\\n\\n /// @notice Emitted when a market and prie feed is changed by admin.\\n /// @param market address of the asset used to get the price.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n event PriceFeedSet(Market indexed market, IPriceFeed indexed priceFeed);\\n\\n /// @notice Stores the market parameters used for liquidity calculations.\\n /// @param adjustFactor used to asses the lending power of the market's underlying asset.\\n /// @param decimals number of decimals of the market's underlying asset.\\n /// @param index index of the market in the `marketList`.\\n /// @param isListed true if the market is enabled.\\n /// @param priceFeed address of the price feed used to query the asset's price.\\n struct MarketData {\\n uint128 adjustFactor;\\n uint8 decimals;\\n uint8 index;\\n bool isListed;\\n IPriceFeed priceFeed;\\n }\\n\\n /// @notice Stores the liquidator and lenders factors used in liquidations to calculate the amount to seize.\\n /// @param liquidator factor used to calculate the extra bonus a liquidator can seize.\\n /// @param lenders factor used to calculate the bonus that the pool lenders receive.\\n struct LiquidationIncentive {\\n uint128 liquidator;\\n uint128 lenders;\\n }\\n\\n /// @notice Used as memory access to temporary store account liquidity data.\\n /// @param balance collateral balance of the account.\\n /// @param borrowBalance borrow balance of the account.\\n /// @param price asset price returned by the price feed with 18 decimals.\\n struct AccountLiquidity {\\n uint256 balance;\\n uint256 borrowBalance;\\n uint256 price;\\n }\\n}\\n\\nerror AuditorMismatch();\\nerror InsufficientAccountLiquidity();\\nerror InsufficientShortfall();\\nerror InvalidPrice();\\nerror InvalidPriceFeed();\\nerror MarketAlreadyListed();\\nerror MarketNotListed();\\nerror NotMarket();\\nerror RemainingDebt();\\n\\nstruct MarketVars {\\n uint256 price;\\n uint256 baseUnit;\\n uint128 adjustFactor;\\n}\\n\\nstruct LiquidityVars {\\n uint256 totalDebt;\\n uint256 totalCollateral;\\n uint256 adjustedDebt;\\n uint256 adjustedCollateral;\\n uint256 seizeAvailable;\\n}\\n\",\"keccak256\":\"0x5110a03bc02c12d47bc64ccb39250e2c9eaa4c4089e63ed143e0513bf7ede5d8\",\"license\":\"BUSL-1.1\"},\"contracts/InterestRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts-v4/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts-v4/utils/math/SafeCast.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract InterestRateModel {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for int256;\\n using SafeCast for uint256;\\n using SafeCast for int256;\\n\\n /// @notice Scale factor of the floating curve.\\n uint256 public immutable floatingCurveA;\\n /// @notice Origin intercept of the floating curve.\\n int256 public immutable floatingCurveB;\\n /// @notice Asymptote of the floating curve.\\n uint256 public immutable floatingMaxUtilization;\\n\\n /// @notice natural level of utilization, represented with 18 decimals.\\n uint256 public immutable naturalUtilization;\\n /// @notice speed of growth for the base rate, represented with 18 decimals.\\n int256 public immutable growthSpeed;\\n /// @notice speed of the sigmoid curve, represented with 18 decimals.\\n int256 public immutable sigmoidSpeed;\\n /// @notice spread factor for the fixed rate, represented with 18 decimals.\\n int256 public immutable spreadFactor;\\n /// @notice speed of maturity for the fixed rate, represented with 18 decimals.\\n int256 public immutable maturitySpeed;\\n /// @notice time preference for the fixed rate, represented with 18 decimals.\\n int256 public immutable timePreference;\\n /// @notice liquidity naturally designated to fixed pools, represented with 18 decimals.\\n uint256 public immutable fixedAllocation;\\n /// @notice maximum interest rate, represented with 18 decimals.\\n uint256 public immutable maxRate;\\n\\n /// @dev maximum input value for expWad, ~ln((2^255 - 1) / 1e18), represented with 18 decimals.\\n int256 internal constant EXP_THRESHOLD = 135305999368893231588;\\n /// @dev auxiliary variable to save an extra operation.\\n int256 internal immutable auxSigmoid;\\n\\n /// @notice set of parameters used to initialize the interest rate model.\\n Parameters internal _parameters;\\n\\n constructor(Parameters memory p, Market market_) {\\n assert(\\n p.minRate > 0 &&\\n p.naturalRate > 0 &&\\n p.maxUtilization > 1e18 &&\\n p.naturalUtilization > 0 &&\\n p.naturalUtilization < 1e18 &&\\n p.growthSpeed > 0 &&\\n p.sigmoidSpeed > 0 &&\\n p.spreadFactor > 0 &&\\n p.maturitySpeed > 0 &&\\n p.maxRate > 0 &&\\n p.maxRate <= 15_000e16\\n );\\n\\n _parameters = p;\\n growthSpeed = p.growthSpeed.toInt256();\\n sigmoidSpeed = p.sigmoidSpeed.toInt256();\\n spreadFactor = p.spreadFactor.toInt256();\\n maturitySpeed = p.maturitySpeed.toInt256();\\n floatingMaxUtilization = p.maxUtilization;\\n naturalUtilization = p.naturalUtilization;\\n\\n floatingCurveA =\\n ((p.naturalRate.mulWadUp(\\n uint256(((growthSpeed * (1e18 - int256(p.naturalUtilization / 2)).lnWad()) / 1e18).expWad())\\n ) - p.minRate) *\\n (p.maxUtilization - p.naturalUtilization) *\\n (p.maxUtilization)) /\\n (p.naturalUtilization * 1e18);\\n floatingCurveB = int256(p.minRate) - int256(floatingCurveA.divWadDown(p.maxUtilization));\\n\\n market = market_;\\n fixedCurveA = address(market_) != address(0) ? floatingCurveA : 0;\\n fixedCurveB = address(market_) != address(0) ? floatingCurveB : int256(0);\\n fixedMaxUtilization = address(market_) != address(0) ? p.maxUtilization : 0;\\n\\n timePreference = p.timePreference;\\n fixedAllocation = p.fixedAllocation;\\n maxRate = p.maxRate;\\n\\n auxSigmoid = int256(naturalUtilization.divWadDown(1e18 - naturalUtilization)).lnWad();\\n\\n // reverts if it's an invalid curve (such as one yielding a negative interest rate).\\n fixedRate(block.timestamp + FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL), 2, 1, 1, 2);\\n baseRate(1e18 - 1, 1e18 - 1);\\n }\\n\\n /// @notice fixed rate with given conditions, represented with 18 decimals.\\n /// @param maturity maturity of the pool.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param uFixed fixed utilization of the pool.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `base * spread` and `maxRate` with given conditions.\\n function fixedRate(\\n uint256 maturity,\\n uint256 maxPools,\\n uint256 uFixed,\\n uint256 uFloating,\\n uint256 uGlobal\\n ) public view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n if (uFixed > uGlobal) revert UtilizationExceeded();\\n if (uGlobal == 0) return baseRate(uFloating, 0);\\n\\n FixedVars memory v;\\n v.sqFNatPools = (maxPools * 1e18).divWadDown(fixedAllocation);\\n v.fNatPools = (v.sqFNatPools * 1e18).sqrt();\\n v.fixedFactor = (maxPools * uFixed).mulDivDown(1e36, uGlobal * fixedAllocation);\\n v.natPools =\\n ((2e18 - v.sqFNatPools.toInt256()) * 1e36) /\\n (v.fNatPools.toInt256() * (1e18 - v.fNatPools.toInt256()));\\n v.maturityFactor = (maturity - block.timestamp).divWadDown(maxPools * FixedLib.INTERVAL);\\n\\n uint256 spread = (1e18 +\\n (((maturitySpeed * (v.maturityFactor).toInt256().lnWad()) / 1e18).expWad() *\\n (timePreference +\\n (spreadFactor *\\n ((v.natPools * (v.fixedFactor * 1e18).sqrt().toInt256()) /\\n 1e18 +\\n ((1e18 - v.natPools) * v.fixedFactor.toInt256()) /\\n 1e18 -\\n 1e18)) /\\n 1e18)) /\\n 1e18).toUint256();\\n uint256 base = baseRate(uFloating, uGlobal);\\n\\n if (base >= maxRate.divWadDown(spread)) return maxRate;\\n return base.mulWadUp(spread);\\n }\\n\\n /// @notice base rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the base rate, without capping.\\n function baseRate(uint256 uFloating, uint256 uGlobal) internal view returns (uint256) {\\n if (uFloating > uGlobal) revert UtilizationExceeded();\\n if (uGlobal >= 1e18) return type(uint256).max;\\n\\n uint256 r = ((floatingCurveA.divWadDown(floatingMaxUtilization - uFloating)).toInt256() + floatingCurveB)\\n .toUint256();\\n\\n if (uGlobal == 0) return r;\\n\\n int256 x = -((sigmoidSpeed * (int256(uGlobal.divWadDown(1e18 - uGlobal)).lnWad() - auxSigmoid)) / 1e18);\\n uint256 sigmoid = x > EXP_THRESHOLD ? 0 : uint256(1e18).divWadDown(1e18 + x.expWad().toUint256());\\n x = (-growthSpeed * (1e18 - sigmoid.mulWadDown(uGlobal)).toInt256().lnWad()) / 1e18;\\n uint256 globalFactor = ((x > EXP_THRESHOLD ? EXP_THRESHOLD : x).expWad()).toUint256();\\n\\n if (globalFactor > type(uint256).max / r) return type(uint256).max;\\n\\n return r.mulWadUp(globalFactor);\\n }\\n\\n /// @notice floating rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `baseRate` and `maxRate` with given conditions.\\n function floatingRate(uint256 uFloating, uint256 uGlobal) public view returns (uint256) {\\n return Math.min(baseRate(uFloating, uGlobal), maxRate);\\n }\\n\\n function parameters() external view returns (Parameters memory) {\\n return _parameters;\\n }\\n\\n // Legacy interface, kept for compatibility.\\n\\n /// @notice Market where the interest rate model is used. Keeps compatibility with legacy interest rate model.\\n Market public immutable market;\\n uint256 public immutable fixedCurveA;\\n int256 public immutable fixedCurveB;\\n uint256 public immutable fixedMaxUtilization;\\n\\n /// @dev Deprecated in favor of `floatingRate(uFloating, uGlobal)`.\\n function floatingRate(uint256) public view returns (uint256) {\\n uint256 floatingAssets = market.floatingAssets();\\n uint256 floatingDebt = market.floatingDebt();\\n return\\n floatingRate(\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed())\\n );\\n }\\n\\n /// @dev Deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function fixedBorrowRate(\\n uint256 maturity,\\n uint256 amount,\\n uint256 borrowed,\\n uint256 supplied,\\n uint256\\n ) external view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n uint256 floatingAssets = previewFloatingAssetsAverage(maturity);\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n uint256 newBorrowed = borrowed + amount;\\n uint256 backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, supplied), newBorrowed);\\n\\n return\\n fixedRate(\\n maturity,\\n market.maxFuturePools(),\\n fixedUtilization(supplied, newBorrowed, floatingAssets),\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed() + backupDebtAddition)\\n ).mulDivDown(maturity - block.timestamp, 365 days);\\n }\\n\\n /// @dev deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function minFixedRate(uint256, uint256, uint256) external view returns (uint256 rate, uint256 utilization) {\\n uint256 floatingAssets = market.floatingAssetsAverage();\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n utilization = globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed());\\n rate = baseRate(floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0, utilization);\\n }\\n\\n function previewFloatingAssetsAverage(uint256 maturity) internal view returns (uint256) {\\n FixedLib.Pool memory pool;\\n (pool.borrowed, pool.supplied, pool.unassignedEarnings, pool.lastAccrual) = market.fixedPools(maturity);\\n uint256 memFloatingAssets = market.floatingAssets() +\\n pool.unassignedEarnings.mulDivDown(block.timestamp - pool.lastAccrual, maturity - pool.lastAccrual);\\n uint256 memFloatingAssetsAverage = market.floatingAssetsAverage();\\n uint256 averageFactor = (1e18 -\\n (\\n -int256(\\n memFloatingAssets < memFloatingAssetsAverage\\n ? market.dampSpeedDown()\\n : market.dampSpeedUp() * (block.timestamp - market.lastAverageUpdate())\\n )\\n ).expWad()).toUint256();\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n function globalUtilization(\\n uint256 floatingAssets,\\n uint256 floatingDebt,\\n uint256 backupBorrowed\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 ? (floatingDebt + backupBorrowed).divWadUp(floatingAssets) : 0;\\n }\\n\\n function fixedUtilization(\\n uint256 supplied,\\n uint256 borrowed,\\n uint256 floatingAssets\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(floatingAssets) : 0;\\n }\\n}\\n\\nerror AlreadyMatured();\\nerror UtilizationExceeded();\\n\\nstruct Parameters {\\n uint256 minRate;\\n uint256 naturalRate;\\n uint256 maxUtilization;\\n uint256 naturalUtilization;\\n uint256 growthSpeed;\\n uint256 sigmoidSpeed;\\n uint256 spreadFactor;\\n uint256 maturitySpeed;\\n int256 timePreference;\\n uint256 fixedAllocation;\\n uint256 maxRate;\\n}\\n\\nstruct FixedVars {\\n uint256 sqFNatPools;\\n uint256 fNatPools;\\n uint256 fixedFactor;\\n int256 natPools;\\n uint256 maturityFactor;\\n}\\n\",\"keccak256\":\"0x21b3897afb0da4e23559f3122f2292deb79516d8850a4995ece47b8c4d278004\",\"license\":\"BUSL-1.1\"},\"contracts/Market.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { PausableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\\\";\\nimport { ERC4626, ERC20, SafeTransferLib } from \\\"solmate/src/mixins/ERC4626.sol\\\";\\nimport { InterestRateModel } from \\\"./InterestRateModel.sol\\\";\\nimport { RewardsController } from \\\"./RewardsController.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Auditor } from \\\"./Auditor.sol\\\";\\n\\ncontract Market is Initializable, AccessControlUpgradeable, PausableUpgradeable, ERC4626 {\\n using FixedPointMathLib for int256;\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint128;\\n using SafeTransferLib for ERC20;\\n using FixedLib for FixedLib.Pool;\\n using FixedLib for FixedLib.Position;\\n using FixedLib for uint256;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant EMERGENCY_ADMIN_ROLE = keccak256(\\\"EMERGENCY_ADMIN_ROLE\\\");\\n\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n Auditor public immutable auditor;\\n\\n /// @notice Tracks account's fixed deposit positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedDepositPositions;\\n /// @notice Tracks account's fixed borrow positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedBorrowPositions;\\n /// @notice Tracks fixed pools state by maturity.\\n mapping(uint256 => FixedLib.Pool) public fixedPools;\\n\\n /// @notice Tracks fixed deposit and borrow map and floating borrow shares of an account.\\n mapping(address => Account) public accounts;\\n\\n /// @notice Amount of assets lent by the floating pool to the fixed pools.\\n uint256 public floatingBackupBorrowed;\\n /// @notice Amount of assets lent by the floating pool to accounts.\\n uint256 public floatingDebt;\\n\\n /// @notice Accumulated earnings from extraordinary sources to be gradually distributed.\\n uint256 public earningsAccumulator;\\n /// @notice Rate per second to be charged to delayed fixed pools borrowers after maturity.\\n uint256 public penaltyRate;\\n /// @notice Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\\n uint256 public backupFeeRate;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\\n uint256 public dampSpeedUp;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\\n uint256 public dampSpeedDown;\\n\\n /// @notice Number of fixed pools to be active at the same time.\\n uint8 public maxFuturePools;\\n /// @notice Last time the accumulator distributed earnings.\\n uint32 public lastAccumulatorAccrual;\\n /// @notice Last time the floating debt was updated.\\n uint32 public lastFloatingDebtUpdate;\\n /// @notice Last time the floating assets average was updated.\\n uint32 public lastAverageUpdate;\\n\\n /// @notice Interest rate model contract used to get the borrow rates.\\n InterestRateModel public interestRateModel;\\n\\n /// @notice Factor used for gradual accrual of earnings to the floating pool.\\n uint128 public earningsAccumulatorSmoothFactor;\\n /// @notice Percentage factor that represents the liquidity reserves that can't be borrowed.\\n uint128 public reserveFactor;\\n\\n /// @notice Amount of floating assets deposited to the pool.\\n uint256 public floatingAssets;\\n /// @notice Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\\n uint256 public floatingAssetsAverage;\\n\\n /// @notice Total amount of floating borrow shares assigned to floating borrow accounts.\\n uint256 public totalFloatingBorrowShares;\\n\\n /// @dev gap from deprecated state.\\n /// @custom:oz-renamed-from floatingUtilization\\n uint256 private __gap;\\n\\n /// @notice Address of the treasury that will receive the allocated earnings.\\n address public treasury;\\n /// @notice Rate to be charged by the treasury to floating and fixed borrows.\\n uint256 public treasuryFeeRate;\\n\\n /// @notice Address of the rewards controller that will accrue rewards for accounts operating with the Market.\\n RewardsController public rewardsController;\\n\\n /// @notice Flag to prevent new borrows and deposits.\\n bool public isFrozen;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(ERC20 asset_, Auditor auditor_) ERC4626(asset_, \\\"\\\", \\\"\\\") {\\n auditor = auditor_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(\\n string calldata assetSymbol,\\n uint8 maxFuturePools_,\\n uint128 earningsAccumulatorSmoothFactor_,\\n InterestRateModel interestRateModel_,\\n uint256 penaltyRate_,\\n uint256 backupFeeRate_,\\n uint128 reserveFactor_,\\n uint256 dampSpeedUp_,\\n uint256 dampSpeedDown_\\n ) external initializer {\\n __AccessControl_init();\\n __Pausable_init();\\n\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n lastAverageUpdate = uint32(block.timestamp);\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setAssetSymbol(assetSymbol);\\n setMaxFuturePools(maxFuturePools_);\\n setEarningsAccumulatorSmoothFactor(earningsAccumulatorSmoothFactor_);\\n setInterestRateModel(interestRateModel_);\\n setPenaltyRate(penaltyRate_);\\n setBackupFeeRate(backupFeeRate_);\\n setReserveFactor(reserveFactor_);\\n setDampSpeed(dampSpeedUp_, dampSpeedDown_);\\n }\\n\\n /// @notice Borrows a certain amount from the floating pool.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return borrowShares shares corresponding to the borrowed assets.\\n function borrow(\\n uint256 assets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 borrowShares) {\\n if (assets == 0) revert ZeroBorrow();\\n spendAllowance(borrower, assets);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n\\n borrowShares = previewBorrow(assets);\\n\\n uint256 newFloatingDebt = floatingDebt + assets;\\n floatingDebt = newFloatingDebt;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed, also considering the reserves\\n if (floatingBackupBorrowed + newFloatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n\\n totalFloatingBorrowShares += borrowShares;\\n accounts[borrower].floatingBorrowShares += borrowShares;\\n\\n emit Borrow(msg.sender, receiver, borrower, assets, borrowShares);\\n emitMarketUpdate();\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Repays a certain amount of assets to the floating pool.\\n /// @param assets assets to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepay the actual amount that should be transferred into the protocol.\\n /// @return borrowShares subtracted shares from the borrower's accountability.\\n function repay(\\n uint256 assets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepay, uint256 borrowShares) {\\n (actualRepay, borrowShares) = noTransferRefund(previewRepay(assets), borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), actualRepay);\\n }\\n\\n /// @notice Repays a certain amount of shares to the floating pool.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return assets subtracted assets from the borrower's accountability.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function refund(\\n uint256 borrowShares,\\n address borrower\\n ) external whenNotPaused returns (uint256 assets, uint256 actualShares) {\\n (assets, actualShares) = noTransferRefund(borrowShares, borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Allows to (partially) repay a floating borrow. It does not transfer assets.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower the address of the account that has the debt.\\n /// @return assets the actual amount that should be transferred into the protocol.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function noTransferRefund(\\n uint256 borrowShares,\\n address borrower\\n ) internal returns (uint256 assets, uint256 actualShares) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n Account storage account = accounts[borrower];\\n uint256 accountBorrowShares = account.floatingBorrowShares;\\n actualShares = Math.min(borrowShares, accountBorrowShares);\\n assets = previewRefund(actualShares);\\n\\n if (assets == 0) revert ZeroRepay();\\n\\n floatingDebt -= assets;\\n account.floatingBorrowShares = accountBorrowShares - actualShares;\\n totalFloatingBorrowShares -= actualShares;\\n\\n emit Repay(msg.sender, borrower, assets, actualShares);\\n }\\n\\n /// @notice Deposits a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be deposited.\\n /// @param assets amount to receive from the msg.sender.\\n /// @param minAssetsRequired minimum amount of assets required by the depositor for the transaction to be accepted.\\n /// @param receiver address that will be able to withdraw the deposited assets.\\n /// @return positionAssets total amount of assets (principal + fee) to be withdrawn at maturity.\\n function depositAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 minAssetsRequired,\\n address receiver\\n ) external whenNotPaused whenNotFrozen returns (uint256 positionAssets) {\\n if (assets == 0) revert ZeroDeposit();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n depositToTreasury(updateFloatingDebt());\\n floatingAssets += backupEarnings;\\n\\n (uint256 fee, uint256 backupFee) = pool.calculateDeposit(assets, backupFeeRate);\\n positionAssets = assets + fee;\\n if (positionAssets < minAssetsRequired) revert Disagreement();\\n\\n floatingBackupBorrowed -= pool.deposit(assets);\\n pool.unassignedEarnings -= fee + backupFee;\\n earningsAccumulator += backupFee;\\n\\n // update account's position\\n FixedLib.Position storage position = fixedDepositPositions[maturity][receiver];\\n\\n // if account doesn't have a current position, add it to the list\\n if (position.principal == 0) {\\n Account storage account = accounts[receiver];\\n account.fixedDeposits = account.fixedDeposits.setMaturity(maturity);\\n }\\n\\n position.principal += assets;\\n position.fee += fee;\\n\\n emit DepositAtMaturity(maturity, msg.sender, receiver, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Borrows a certain amount from a maturity.\\n /// @param maturity maturity date for repayment.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return assetsOwed total amount of assets (principal + fee) to be repaid at maturity.\\n function borrowAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 maxAssets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 assetsOwed) {\\n if (assets == 0) revert ZeroBorrow();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n depositToTreasury(updateFloatingDebt());\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n {\\n uint256 backupDebtAddition = pool.borrow(assets);\\n if (backupDebtAddition != 0) {\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed + backupDebtAddition;\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n }\\n uint256 fee;\\n {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, floatingBackupBorrowed)\\n );\\n fee = assets.mulWadUp(fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n }\\n assetsOwed = assets + fee;\\n\\n // validate that the account is not taking arbitrary fees\\n if (assetsOwed > maxAssets) revert Disagreement();\\n\\n spendAllowance(borrower, assetsOwed);\\n\\n {\\n // if account doesn't have a current position, add it to the list\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n if (position.principal == 0) {\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.setMaturity(maturity);\\n }\\n\\n // calculate what portion of the fees are to be accrued and what portion goes to earnings accumulator\\n (uint256 newUnassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(fee),\\n assets\\n );\\n if (newUnassignedEarnings != 0) pool.unassignedEarnings += newUnassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n fixedBorrowPositions[maturity][borrower] = FixedLib.Position(position.principal + assets, position.fee + fee);\\n }\\n\\n emit BorrowAtMaturity(maturity, msg.sender, receiver, borrower, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Withdraws a certain amount from a maturity.\\n /// @param maturity maturity date where the assets will be withdrawn.\\n /// @param positionAssets position size to be reduced.\\n /// @param minAssetsRequired minimum amount required by the account (if discount included for early withdrawal).\\n /// @param receiver address that will receive the withdrawn assets.\\n /// @param owner address that previously deposited the assets.\\n /// @return assetsDiscounted amount of assets withdrawn (can include a discount for early withdraw).\\n function withdrawAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 minAssetsRequired,\\n address receiver,\\n address owner\\n ) external whenNotPaused returns (uint256 assetsDiscounted) {\\n if (positionAssets == 0) revert ZeroWithdraw();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n depositToTreasury(updateFloatingDebt());\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n FixedLib.Position memory position = fixedDepositPositions[maturity][owner];\\n\\n if (positionAssets > position.principal + position.fee) positionAssets = position.principal + position.fee;\\n\\n {\\n // remove the supply from the fixed rate pool\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed +\\n pool.withdraw(\\n FixedLib.Position(position.principal, position.fee).scaleProportionally(positionAssets).principal\\n );\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets) revert InsufficientProtocolLiquidity();\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n\\n // verify if there are any penalties/fee for the account because of early withdrawal, if so discount\\n if (block.timestamp < maturity) {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingBackupBorrowed = floatingBackupBorrowed;\\n\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, memFloatingBackupBorrowed)\\n );\\n assetsDiscounted = positionAssets.divWadDown(1e18 + fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n } else {\\n assetsDiscounted = positionAssets;\\n }\\n\\n if (assetsDiscounted < minAssetsRequired) revert Disagreement();\\n\\n spendAllowance(owner, assetsDiscounted);\\n\\n // all the fees go to unassigned or to the floating pool\\n (uint256 unassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(positionAssets - assetsDiscounted),\\n assetsDiscounted\\n );\\n pool.unassignedEarnings += unassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n // the account gets discounted the full amount\\n position.reduceProportionally(positionAssets);\\n if (position.principal | position.fee == 0) {\\n delete fixedDepositPositions[maturity][owner];\\n Account storage account = accounts[owner];\\n account.fixedDeposits = account.fixedDeposits.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedDepositPositions[maturity][owner] = position;\\n }\\n\\n emit WithdrawAtMaturity(maturity, msg.sender, receiver, owner, positionAssets, assetsDiscounted);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransfer(receiver, assetsDiscounted);\\n }\\n\\n /// @notice Repays a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be repaid.\\n /// @param positionAssets amount to be paid for the borrower's debt.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepayAssets the actual amount that was transferred into the protocol.\\n function repayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepayAssets) {\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n actualRepayAssets = noTransferRepayAtMaturity(maturity, positionAssets, maxAssets, borrower, true);\\n emitMarketUpdate();\\n\\n asset.safeTransferFrom(msg.sender, address(this), actualRepayAssets);\\n }\\n\\n /// @notice Allows to (partially) repay a fixed rate position. It does not transfer assets.\\n /// @param maturity the maturity to access the pool.\\n /// @param positionAssets the amount of debt of the pool that should be paid.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower the address of the account that has the debt.\\n /// @param canDiscount should early repay discounts be applied.\\n /// @return actualRepayAssets the actual amount that should be transferred into the protocol.\\n function noTransferRepayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower,\\n bool canDiscount\\n ) internal returns (uint256 actualRepayAssets) {\\n if (positionAssets == 0) revert ZeroRepay();\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n depositToTreasury(updateFloatingDebt());\\n floatingAssets += backupEarnings;\\n\\n FixedLib.Position memory position = fixedBorrowPositions[maturity][borrower];\\n\\n uint256 debtCovered = Math.min(positionAssets, position.principal + position.fee);\\n\\n uint256 principalCovered = FixedLib\\n .Position(position.principal, position.fee)\\n .scaleProportionally(debtCovered)\\n .principal;\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n // early repayment allows a discount from the unassigned earnings\\n if (block.timestamp < maturity) {\\n // calculate the deposit fee considering the amount of debt the account'll pay\\n (uint256 discountFee, uint256 backupFee) = pool.calculateDeposit(principalCovered, backupFeeRate);\\n\\n // remove the fee from unassigned earnings\\n pool.unassignedEarnings -= discountFee + backupFee;\\n if (canDiscount) {\\n // the fee charged to the fixed pool supplier goes to the earnings accumulator\\n earningsAccumulator += backupFee;\\n\\n // the fee gets discounted from the account through `actualRepayAssets`\\n actualRepayAssets = debtCovered - discountFee;\\n } else {\\n // all fees go to the earnings accumulator\\n earningsAccumulator += discountFee + backupFee;\\n\\n // there is no discount due to liquidation\\n actualRepayAssets = debtCovered;\\n }\\n } else {\\n actualRepayAssets = debtCovered + debtCovered.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n\\n // all penalties go to the earnings accumulator\\n earningsAccumulator += actualRepayAssets - debtCovered;\\n }\\n\\n // verify that the account agrees to this discount or penalty\\n if (actualRepayAssets > maxAssets) revert Disagreement();\\n\\n // reduce the borrowed from the pool and might decrease the floating backup borrowed\\n floatingBackupBorrowed -= pool.repay(principalCovered);\\n\\n // update the account position\\n position.reduceProportionally(debtCovered);\\n if (position.principal | position.fee == 0) {\\n delete fixedBorrowPositions[maturity][borrower];\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedBorrowPositions[maturity][borrower] = position;\\n }\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, actualRepayAssets, debtCovered);\\n emitFixedEarningsUpdate(maturity);\\n }\\n\\n /// @notice Liquidates undercollateralized fixed/floating (or both) position(s).\\n /// @dev Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool,\\n /// or/and for multiple fixed pools, seizing a portion of borrower's collateral.\\n /// @param borrower account that has an outstanding debt across floating or fixed pools.\\n /// @param maxAssets maximum amount of debt that the liquidator is willing to accept. (it can be less)\\n /// @param seizeMarket market from which the collateral will be seized to give to the liquidator.\\n /// @return repaidAssets actual amount repaid.\\n function liquidate(\\n address borrower,\\n uint256 maxAssets,\\n Market seizeMarket\\n ) external whenNotPaused returns (uint256 repaidAssets) {\\n if (msg.sender == borrower) revert SelfLiquidation();\\n floatingAssets += accrueAccumulatedEarnings();\\n\\n maxAssets = auditor.checkLiquidation(this, seizeMarket, borrower, maxAssets);\\n if (maxAssets == 0) revert ZeroRepay();\\n\\n Account storage account = accounts[borrower];\\n\\n {\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0 && maxAssets != 0) {\\n if (packedMaturities & 1 != 0) {\\n uint256 actualRepay;\\n if (block.timestamp < maturity) {\\n actualRepay = noTransferRepayAtMaturity(maturity, maxAssets, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n } else {\\n uint256 position;\\n {\\n FixedLib.Position storage p = fixedBorrowPositions[maturity][borrower];\\n position = p.principal + p.fee;\\n }\\n uint256 debt = position + position.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n actualRepay = debt > maxAssets ? maxAssets.mulDivDown(position, debt) : maxAssets;\\n\\n if (actualRepay == 0) maxAssets = 0;\\n else {\\n actualRepay = noTransferRepayAtMaturity(maturity, actualRepay, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n }\\n }\\n repaidAssets += actualRepay;\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n\\n if (maxAssets != 0 && account.floatingBorrowShares != 0) {\\n uint256 borrowShares = previewRepay(maxAssets);\\n if (borrowShares != 0) {\\n (uint256 actualRepayAssets, ) = noTransferRefund(borrowShares, borrower);\\n repaidAssets += actualRepayAssets;\\n }\\n }\\n\\n // reverts on failure\\n (uint256 lendersAssets, uint256 seizeAssets) = auditor.calculateSeize(this, seizeMarket, borrower, repaidAssets);\\n earningsAccumulator += lendersAssets;\\n\\n asset.safeTransferFrom(msg.sender, address(this), repaidAssets + lendersAssets);\\n\\n if (address(seizeMarket) == address(this)) {\\n internalSeize(this, msg.sender, borrower, seizeAssets);\\n } else {\\n seizeMarket.seize(msg.sender, borrower, seizeAssets);\\n\\n emitMarketUpdate();\\n }\\n\\n emit Liquidate(msg.sender, borrower, repaidAssets, lendersAssets, seizeMarket, seizeAssets);\\n\\n auditor.handleBadDebt(borrower);\\n }\\n\\n /// @notice Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\\n /// @dev Can only be called from the auditor.\\n /// @param borrower account with insufficient collateral to be cleared the debt.\\n function clearBadDebt(address borrower) external {\\n if (msg.sender != address(auditor)) revert NotAuditor();\\n\\n floatingAssets += accrueAccumulatedEarnings();\\n Account storage account = accounts[borrower];\\n uint256 accumulator = earningsAccumulator;\\n uint256 totalBadDebt = 0;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 badDebt = position.principal + position.fee;\\n if (accumulator >= badDebt) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n accumulator -= badDebt;\\n totalBadDebt += badDebt;\\n uint256 backupDebtReduction = fixedPools[maturity].repay(position.principal);\\n\\n if (backupDebtReduction != 0) {\\n floatingBackupBorrowed -= backupDebtReduction;\\n uint256 yield = fixedPools[maturity].unassignedEarnings.mulDivDown(\\n Math.min(position.principal, backupDebtReduction),\\n backupDebtReduction\\n );\\n fixedPools[maturity].unassignedEarnings -= yield;\\n earningsAccumulator += yield;\\n accumulator += yield;\\n }\\n\\n delete fixedBorrowPositions[maturity][borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, badDebt, badDebt);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n if (account.floatingBorrowShares != 0 && (accumulator = previewRepay(accumulator)) != 0) {\\n (uint256 badDebt, ) = noTransferRefund(accumulator, borrower);\\n totalBadDebt += badDebt;\\n }\\n if (totalBadDebt != 0) {\\n earningsAccumulator -= totalBadDebt;\\n emit SpreadBadDebt(borrower, totalBadDebt);\\n }\\n emitMarketUpdate();\\n }\\n\\n /// @notice Public function to seize a certain amount of assets.\\n /// @dev Public function for liquidator to seize borrowers assets in the floating pool.\\n /// This function will only be called from another Market, on `liquidation` calls.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function seize(address liquidator, address borrower, uint256 assets) external whenNotPaused {\\n internalSeize(Market(msg.sender), liquidator, borrower, assets);\\n }\\n\\n /// @notice Internal function to seize a certain amount of assets.\\n /// @dev Internal function for liquidator to seize borrowers assets in the floating pool.\\n /// Will only be called from this Market on `liquidation` or through `seize` calls from another Market.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param seizeMarket address which is calling the seize function (see `seize` public function).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function internalSeize(Market seizeMarket, address liquidator, address borrower, uint256 assets) internal {\\n if (assets == 0) revert ZeroWithdraw();\\n\\n // reverts on failure\\n auditor.checkSeize(seizeMarket, this);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(borrower);\\n uint256 shares = previewWithdraw(assets);\\n beforeWithdraw(assets, shares);\\n _burn(borrower, shares);\\n emit Withdraw(msg.sender, liquidator, borrower, assets, shares);\\n emit Seize(liquidator, borrower, assets);\\n emitMarketUpdate();\\n\\n asset.safeTransfer(liquidator, assets);\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be withdrawn from the floating pool.\\n function beforeWithdraw(uint256 assets, uint256) internal override whenNotPaused {\\n updateFloatingAssetsAverage();\\n depositToTreasury(updateFloatingDebt());\\n uint256 earnings = accrueAccumulatedEarnings();\\n uint256 newFloatingAssets = floatingAssets + earnings - assets;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed\\n if (floatingBackupBorrowed + floatingDebt > newFloatingAssets) revert InsufficientProtocolLiquidity();\\n floatingAssets = newFloatingAssets;\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be deposited to the floating pool.\\n function afterDeposit(uint256 assets, uint256) internal override whenNotPaused whenNotFrozen {\\n updateFloatingAssetsAverage();\\n uint256 treasuryFee = updateFloatingDebt();\\n uint256 earnings = accrueAccumulatedEarnings();\\n floatingAssets += earnings + assets;\\n depositToTreasury(treasuryFee);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Withdraws the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param assets amount of underlying to be withdrawn.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return shares amount of shares redeemed for underlying asset.\\n function withdraw(uint256 assets, address receiver, address owner) public override returns (uint256 shares) {\\n auditor.checkShortfall(this, owner, assets);\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n shares = super.withdraw(assets, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Redeems the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param shares amount of shares to be redeemed for underlying asset.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return assets amount of underlying asset that was withdrawn.\\n function redeem(uint256 shares, address receiver, address owner) public override returns (uint256 assets) {\\n auditor.checkShortfall(this, owner, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n assets = super.redeem(shares, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n function _mint(address to, uint256 amount) internal override {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(to);\\n super._mint(to, amount);\\n }\\n\\n /// @notice Moves amount of shares from the caller's account to `to`.\\n /// @dev Makes sure that the caller doesn't have shortfall after transferring.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transfer(address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, msg.sender, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(msg.sender);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transfer(to, shares);\\n }\\n\\n /// @notice Moves amount of shares from `from` to `to` using the allowance mechanism.\\n /// @dev Makes sure that `from` address doesn't have shortfall after transferring.\\n /// @param from address from which the assets will be transferred.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transferFrom(address from, address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, from, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(from);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transferFrom(from, to, shares);\\n }\\n\\n /// @notice Gets current snapshot for an account across all maturities.\\n /// @param account account to return status snapshot in the specified maturity date.\\n /// @return the amount deposited to the floating pool and the amount owed to floating and fixed pools.\\n function accountSnapshot(address account) external view returns (uint256, uint256) {\\n return (convertToAssets(balanceOf[account]), previewDebt(account));\\n }\\n\\n /// @notice Gets all borrows and penalties for an account.\\n /// @param borrower account to return status snapshot for fixed and floating borrows.\\n /// @return debt the total debt, denominated in number of assets.\\n function previewDebt(address borrower) public view returns (uint256 debt) {\\n Account storage account = accounts[borrower];\\n uint256 memPenaltyRate = penaltyRate;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n // calculate all maturities using the base maturity and the following bits representing the following intervals\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 positionAssets = position.principal + position.fee;\\n\\n debt += positionAssets;\\n\\n if (block.timestamp > maturity) {\\n debt += positionAssets.mulWadDown((block.timestamp - maturity) * memPenaltyRate);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n // calculate floating borrowed debt\\n uint256 shares = account.floatingBorrowShares;\\n if (shares != 0) debt += previewRefund(shares);\\n }\\n\\n /// @notice Charges treasury fee to certain amount of earnings.\\n /// @param earnings amount of earnings.\\n /// @return earnings minus the fees charged by the treasury.\\n function chargeTreasuryFee(uint256 earnings) internal returns (uint256) {\\n uint256 fee = earnings.mulWadDown(treasuryFeeRate);\\n depositToTreasury(fee);\\n return earnings - fee;\\n }\\n\\n /// @notice Collects all earnings that are charged to borrowers that make use of fixed pool deposits' assets.\\n /// @param earnings amount of earnings.\\n function collectFreeLunch(uint256 earnings) internal {\\n if (earnings == 0) return;\\n\\n if (treasuryFeeRate != 0) {\\n depositToTreasury(earnings);\\n } else {\\n earningsAccumulator += earnings;\\n }\\n }\\n\\n /// @notice Deposits amount of assets on behalf of the treasury address.\\n /// @param fee amount of assets to be deposited.\\n function depositToTreasury(uint256 fee) internal {\\n if (fee != 0) {\\n _mint(treasury, previewDeposit(fee));\\n floatingAssets += fee;\\n }\\n }\\n\\n /// @notice Calculates the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings to be distributed from the accumulator.\\n function accumulatedEarnings() internal view returns (uint256 earnings) {\\n uint256 elapsed = block.timestamp - lastAccumulatorAccrual;\\n if (elapsed == 0) return 0;\\n return\\n earningsAccumulator.mulDivDown(\\n elapsed,\\n elapsed + earningsAccumulatorSmoothFactor.mulWadDown(maxFuturePools * FixedLib.INTERVAL)\\n );\\n }\\n\\n /// @notice Accrues the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings distributed from the accumulator.\\n function accrueAccumulatedEarnings() internal returns (uint256 earnings) {\\n earnings = accumulatedEarnings();\\n\\n earningsAccumulator -= earnings;\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n emit AccumulatorAccrual(block.timestamp);\\n }\\n\\n /// @notice Updates the `floatingAssetsAverage`.\\n function updateFloatingAssetsAverage() internal {\\n floatingAssetsAverage = previewFloatingAssetsAverage();\\n lastAverageUpdate = uint32(block.timestamp);\\n }\\n\\n /// @notice Returns the current `floatingAssetsAverage` without updating the storage variable.\\n /// @return projected `floatingAssetsAverage`.\\n function previewFloatingAssetsAverage() public view returns (uint256) {\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 memFloatingAssetsAverage = floatingAssetsAverage;\\n uint256 dampSpeedFactor = memFloatingAssets < memFloatingAssetsAverage ? dampSpeedDown : dampSpeedUp;\\n uint256 averageFactor = uint256(1e18 - (-int256(dampSpeedFactor * (block.timestamp - lastAverageUpdate))).expWad());\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n /// @notice Updates the floating pool borrows' variables.\\n /// @return treasuryFee amount of fees charged by the treasury to the new calculated floating debt.\\n function updateFloatingDebt() internal returns (uint256 treasuryFee) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 utilization = floatingUtilization(memFloatingAssets, memFloatingDebt);\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(utilization, globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed))\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n\\n memFloatingDebt += newDebt;\\n treasuryFee = newDebt.mulWadDown(treasuryFeeRate);\\n floatingAssets = memFloatingAssets + newDebt - treasuryFee;\\n floatingDebt = memFloatingDebt;\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n emit FloatingDebtUpdate(block.timestamp, utilization);\\n }\\n\\n /// @notice Calculates the total floating debt, considering elapsed time since last update and current interest rate.\\n /// @return actual floating debt plus projected interest.\\n function totalFloatingBorrowAssets() public view returns (uint256) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(\\n floatingUtilization(memFloatingAssets, memFloatingDebt),\\n globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed)\\n )\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n return memFloatingDebt + newDebt;\\n }\\n\\n /// @notice Calculates the floating pool balance plus earnings to be accrued at current timestamp\\n /// from maturities and accumulator.\\n /// @return actual floatingAssets plus earnings to be accrued at current timestamp.\\n function totalAssets() public view override returns (uint256) {\\n unchecked {\\n uint256 backupEarnings = 0;\\n\\n uint256 latestMaturity = block.timestamp - (block.timestamp % FixedLib.INTERVAL);\\n uint256 maxMaturity = latestMaturity + maxFuturePools * FixedLib.INTERVAL;\\n\\n for (uint256 maturity = latestMaturity; maturity <= maxMaturity; maturity += FixedLib.INTERVAL) {\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (maturity > lastAccrual) {\\n backupEarnings += block.timestamp < maturity\\n ? pool.unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual)\\n : pool.unassignedEarnings;\\n }\\n }\\n\\n return\\n floatingAssets +\\n backupEarnings +\\n accumulatedEarnings() +\\n (totalFloatingBorrowAssets() - floatingDebt).mulWadDown(1e18 - treasuryFeeRate);\\n }\\n }\\n\\n /// @notice Simulates the effects of a borrow at the current time, given current contract conditions.\\n /// @param assets amount of assets to borrow.\\n /// @return amount of shares that will be asigned to the account after the borrow.\\n function previewBorrow(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a repay at the current time, given current contract conditions.\\n /// @param assets amount of assets to repay.\\n /// @return amount of shares that will be subtracted from the account after the repay.\\n function previewRepay(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a refund at the current time, given current contract conditions.\\n /// @param shares amount of shares to subtract from caller's accountability.\\n /// @return amount of assets that will be repaid.\\n function previewRefund(uint256 shares) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalFloatingBorrowAssets(), supply);\\n }\\n\\n /// @notice Checks msg.sender's allowance over account's assets.\\n /// @param account account in which the allowance will be checked.\\n /// @param assets assets from account that msg.sender wants to operate on.\\n function spendAllowance(address account, uint256 assets) internal {\\n if (msg.sender != account) {\\n uint256 allowed = allowance[account][msg.sender]; // saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[account][msg.sender] = allowed - previewWithdraw(assets);\\n }\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed amount of the fixed pool.\\n function fixedPoolBorrowed(uint256 maturity) external view returns (uint256) {\\n return fixedPools[maturity].borrowed;\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed and supplied amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed and supplied amount of the fixed pool.\\n function fixedPoolBalance(uint256 maturity) external view returns (uint256, uint256) {\\n return (fixedPools[maturity].borrowed, fixedPools[maturity].supplied);\\n }\\n\\n /// @notice Retrieves fixed utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function fixedUtilization(uint256 supplied, uint256 borrowed, uint256 assets) internal pure returns (uint256) {\\n return assets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves global utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function globalUtilization(uint256 assets, uint256 debt, uint256 backupBorrowed) internal pure returns (uint256) {\\n return assets != 0 ? (debt + backupBorrowed).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves floating utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function floatingUtilization(uint256 assets, uint256 debt) internal pure returns (uint256) {\\n return assets != 0 ? debt.divWadUp(assets) : 0;\\n }\\n\\n /// @notice Emits MarketUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitMarketUpdate() internal {\\n emit MarketUpdate(\\n block.timestamp,\\n totalSupply,\\n floatingAssets,\\n totalFloatingBorrowShares,\\n floatingDebt,\\n earningsAccumulator\\n );\\n }\\n\\n /// @notice Emits FixedEarningsUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitFixedEarningsUpdate(uint256 maturity) internal {\\n emit FixedEarningsUpdate(block.timestamp, maturity, fixedPools[maturity].unassignedEarnings);\\n }\\n\\n /// @notice Sets name and symbol for the Market.\\n /// @param assetSymbol the symbol for the underlying asset.\\n function setAssetSymbol(string calldata assetSymbol) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n name = string.concat(\\\"exactly \\\", assetSymbol);\\n symbol = string.concat(\\\"exa\\\", assetSymbol);\\n }\\n\\n /// @notice Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially\\n /// providing liquidity.\\n /// @param backupFeeRate_ percentage amount represented with 18 decimals.\\n function setBackupFeeRate(uint256 backupFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n backupFeeRate = backupFeeRate_;\\n emit BackupFeeRateSet(backupFeeRate_);\\n }\\n\\n /// @notice Sets the damp speed used to update the floatingAssetsAverage.\\n /// @param up damp speed up, represented with 18 decimals.\\n /// @param down damp speed down, represented with 18 decimals.\\n function setDampSpeed(uint256 up, uint256 down) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n updateFloatingAssetsAverage();\\n dampSpeedUp = up;\\n dampSpeedDown = down;\\n emit DampSpeedSet(up, down);\\n }\\n\\n /// @notice Sets the factor used when smoothly accruing earnings to the floating pool.\\n /// @param earningsAccumulatorSmoothFactor_ represented with 18 decimals.\\n function setEarningsAccumulatorSmoothFactor(\\n uint128 earningsAccumulatorSmoothFactor_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n floatingAssets += accrueAccumulatedEarnings();\\n emitMarketUpdate();\\n earningsAccumulatorSmoothFactor = earningsAccumulatorSmoothFactor_;\\n emit EarningsAccumulatorSmoothFactorSet(earningsAccumulatorSmoothFactor_);\\n }\\n\\n /// @notice Sets the interest rate model to be used to calculate rates.\\n /// @param interestRateModel_ new interest rate model.\\n function setInterestRateModel(InterestRateModel interestRateModel_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(interestRateModel) != address(0)) depositToTreasury(updateFloatingDebt());\\n\\n interestRateModel = interestRateModel_;\\n emitMarketUpdate();\\n emit InterestRateModelSet(interestRateModel_);\\n }\\n\\n /// @notice Sets the rewards controller to update account rewards when operating with the Market.\\n /// @param rewardsController_ new rewards controller.\\n function setRewardsController(RewardsController rewardsController_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n rewardsController = rewardsController_;\\n emit RewardsControllerSet(rewardsController_);\\n }\\n\\n /// @notice Sets the protocol's max future pools for fixed borrowing and lending.\\n /// @dev If value is decreased, VALID maturities will become NOT_READY.\\n /// @param futurePools number of pools to be active at the same time.\\n function setMaxFuturePools(uint8 futurePools) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n maxFuturePools = futurePools;\\n emit MaxFuturePoolsSet(futurePools);\\n }\\n\\n /// @notice Sets the penalty rate per second.\\n /// @param penaltyRate_ percentage represented with 18 decimals.\\n function setPenaltyRate(uint256 penaltyRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n penaltyRate = penaltyRate_;\\n emit PenaltyRateSet(penaltyRate_);\\n }\\n\\n /// @notice Sets the percentage that represents the liquidity reserves that can't be borrowed.\\n /// @param reserveFactor_ parameter represented with 18 decimals.\\n function setReserveFactor(uint128 reserveFactor_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n reserveFactor = reserveFactor_;\\n emit ReserveFactorSet(reserveFactor_);\\n }\\n\\n /// @notice Sets the treasury variables.\\n /// @param treasury_ address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate_ represented with 18 decimals.\\n function setTreasury(address treasury_, uint256 treasuryFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n depositToTreasury(updateFloatingDebt());\\n treasury = treasury_;\\n treasuryFeeRate = treasuryFeeRate_;\\n emit TreasurySet(treasury_, treasuryFeeRate_);\\n }\\n\\n /// @notice Sets the pause state to true in case of emergency, triggered by an authorized account.\\n function pause() external onlyPausingRoles {\\n _pause();\\n }\\n\\n /// @notice Sets the pause state to false when threat is gone, triggered by an authorized account.\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @notice Sets `isFrozen` state, triggered by an authorized account.\\n function setFrozen(bool isFrozen_) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (isFrozen == isFrozen_) return;\\n isFrozen = isFrozen_;\\n emit Frozen(msg.sender, isFrozen_);\\n }\\n\\n /// @dev Throws if the market is frozen.\\n function requireNotFrozen() internal view {\\n if (isFrozen) revert MarketFrozen();\\n }\\n\\n /// @dev Modifier to make a function callable only when the market is not frozen.\\n modifier whenNotFrozen() {\\n requireNotFrozen();\\n _;\\n }\\n\\n /// @dev Throws if the caller is not an `EMERGENCY_ADMIN_ROLE` or `PAUSER_ROLE`.\\n function requirePausingRoles() internal view {\\n if (!hasRole(EMERGENCY_ADMIN_ROLE, msg.sender) && !hasRole(PAUSER_ROLE, msg.sender)) {\\n revert NotPausingRole();\\n }\\n }\\n\\n /// @dev Modifier to make a function callable only by pausing roles.\\n modifier onlyPausingRoles() {\\n requirePausingRoles();\\n _;\\n }\\n\\n /// @notice Event emitted when an account borrows amount of assets from a floating pool.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of assets that were borrowed.\\n /// @param shares amount of borrow shares assigned to the account.\\n event Borrow(\\n address indexed caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /// @notice Emitted when an account repays amount of assets to a floating pool.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of assets that was repaid.\\n /// @param shares amount of borrow shares that were subtracted from the account's accountability.\\n event Repay(address indexed caller, address indexed borrower, uint256 assets, uint256 shares);\\n\\n /// @notice Emitted when an account deposits an amount of an asset to a certain fixed rate pool,\\n /// collecting fees at the end of the period.\\n /// @param maturity maturity at which the account will be able to collect his deposit + his fee.\\n /// @param caller address which deposited the assets.\\n /// @param owner address that will be able to withdraw the deposited assets.\\n /// @param assets amount of the asset that were deposited.\\n /// @param fee is the extra amount that it will be collected at maturity.\\n event DepositAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed owner,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account withdraws from a fixed rate pool.\\n /// @param maturity maturity where the account withdraw its deposits.\\n /// @param caller address which withdraw the asset.\\n /// @param receiver address which will be collecting the assets.\\n /// @param owner address which had the assets withdrawn.\\n /// @param positionAssets position size reduced.\\n /// @param assets amount of assets withdrawn (can include a discount for early withdraw).\\n event WithdrawAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 positionAssets,\\n uint256 assets\\n );\\n\\n /// @notice Emitted when an account borrows amount of an asset from a certain maturity date.\\n /// @param maturity maturity in which the account will have to repay the loan.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of the asset that were borrowed.\\n /// @param fee extra amount that will need to be paid at maturity.\\n event BorrowAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account repays its borrows after maturity.\\n /// @param maturity maturity where the account repaid its borrowed amounts.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount that was repaid.\\n /// @param positionAssets amount of the debt that was covered in this repayment (penalties could have been repaid).\\n event RepayAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed borrower,\\n uint256 assets,\\n uint256 positionAssets\\n );\\n\\n /// @notice Emitted when an account's position had a liquidation.\\n /// @param receiver address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of the asset that were repaid.\\n /// @param lendersAssets incentive paid to lenders.\\n /// @param seizeMarket address of the asset that were seized by the liquidator.\\n /// @param seizedAssets amount seized of the collateral.\\n event Liquidate(\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 lendersAssets,\\n Market indexed seizeMarket,\\n uint256 seizedAssets\\n );\\n\\n /// @notice Emitted when an account's collateral has been seized.\\n /// @param liquidator address which seized this collateral.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount seized of the collateral.\\n event Seize(address indexed liquidator, address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when an account is cleared from bad debt.\\n /// @param borrower address which was cleared from bad debt.\\n /// @param assets amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\\n event SpreadBadDebt(address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when the backupFeeRate parameter is changed by admin.\\n /// @param backupFeeRate rate charged to the fixed pools to be accrued by the floating depositors.\\n event BackupFeeRateSet(uint256 backupFeeRate);\\n\\n /// @notice Emitted when the damp speeds are changed by admin.\\n /// @param dampSpeedUp represented with 18 decimals.\\n /// @param dampSpeedDown represented with 18 decimals.\\n event DampSpeedSet(uint256 dampSpeedUp, uint256 dampSpeedDown);\\n\\n /// @notice Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\\n /// @param earningsAccumulatorSmoothFactor factor represented with 18 decimals.\\n event EarningsAccumulatorSmoothFactorSet(uint256 earningsAccumulatorSmoothFactor);\\n\\n /// @notice Emitted when the interestRateModel is changed by admin.\\n /// @param interestRateModel new interest rate model to be used to calculate rates.\\n event InterestRateModelSet(InterestRateModel indexed interestRateModel);\\n\\n /// @notice Emitted when the maxFuturePools is changed by admin.\\n /// @param maxFuturePools represented with 0 decimals.\\n event MaxFuturePoolsSet(uint256 maxFuturePools);\\n\\n /// @notice Emitted when the penaltyRate is changed by admin.\\n /// @param penaltyRate penaltyRate percentage per second represented with 18 decimals.\\n event PenaltyRateSet(uint256 penaltyRate);\\n\\n /// @notice Emitted when the reserveFactor is changed by admin.\\n /// @param reserveFactor reserveFactor percentage.\\n event ReserveFactorSet(uint256 reserveFactor);\\n\\n /// @notice Emitted when the treasury variables are changed by admin.\\n /// @param treasury address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate represented with 18 decimals.\\n event TreasurySet(address indexed treasury, uint256 treasuryFeeRate);\\n\\n /// @notice Emitted when the rewardsController is changed by admin.\\n /// @param rewardsController new rewards controller to update account rewards when operating with the Market.\\n event RewardsControllerSet(RewardsController indexed rewardsController);\\n\\n /// @notice Emitted when market state is updated.\\n /// @param timestamp current timestamp.\\n /// @param floatingDepositShares total floating supply shares.\\n /// @param floatingAssets total floating supply assets.\\n /// @param floatingBorrowShares total floating borrow shares.\\n /// @param floatingDebt total floating borrow assets.\\n /// @param earningsAccumulator earnings accumulator.\\n event MarketUpdate(\\n uint256 timestamp,\\n uint256 floatingDepositShares,\\n uint256 floatingAssets,\\n uint256 floatingBorrowShares,\\n uint256 floatingDebt,\\n uint256 earningsAccumulator\\n );\\n\\n /// @notice Emitted when the earnings of a maturity are updated.\\n /// @param timestamp current timestamp.\\n /// @param maturity maturity date where the earnings were updated.\\n /// @param unassignedEarnings pending unassigned earnings.\\n event FixedEarningsUpdate(uint256 timestamp, uint256 indexed maturity, uint256 unassignedEarnings);\\n\\n /// @notice Emitted when accumulator distributes earnings.\\n /// @param timestamp current timestamp.\\n event AccumulatorAccrual(uint256 timestamp);\\n\\n /// @notice Emitted when the floating debt is updated.\\n /// @param timestamp current timestamp.\\n /// @param utilization new floating utilization.\\n event FloatingDebtUpdate(uint256 timestamp, uint256 utilization);\\n\\n /// @notice Emitted when `account` sets the `isFrozen` flag.\\n event Frozen(address indexed account, bool isFrozen);\\n\\n /// @notice Stores fixed deposits and fixed borrows map and floating borrow shares of an account.\\n /// @param fixedDeposits encoded map maturity dates where the account supplied to.\\n /// @param fixedBorrows encoded map maturity dates where the account borrowed from.\\n /// @param floatingBorrowShares number of floating borrow shares assigned to the account.\\n struct Account {\\n uint256 fixedDeposits;\\n uint256 fixedBorrows;\\n uint256 floatingBorrowShares;\\n }\\n}\\n\\nerror Disagreement();\\nerror InsufficientProtocolLiquidity();\\nerror MarketFrozen();\\nerror NotAuditor();\\nerror NotPausingRole();\\nerror SelfLiquidation();\\nerror ZeroBorrow();\\nerror ZeroDeposit();\\nerror ZeroRepay();\\nerror ZeroWithdraw();\\n\",\"keccak256\":\"0xea262e9a46d356f8626b4ea1d2bf9017e009b3d4f95809f5f33331b0236b3ce6\",\"license\":\"BUSL-1.1\"},\"contracts/RewardsController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { SafeTransferLib } from \\\"solmate/src/utils/SafeTransferLib.sol\\\";\\nimport { ERC20 } from \\\"solmate/src/tokens/ERC20.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract RewardsController is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint64;\\n using FixedPointMathLib for int256;\\n using SafeTransferLib for ERC20;\\n\\n /// @notice Max utilization supported by the sigmoid function not to cause a division by zero (1e18 = WAD).\\n uint256 public constant UTILIZATION_CAP = 1e18 - 1;\\n /// @notice Tracks the reward distribution data for a given market.\\n mapping(Market => Distribution) public distribution;\\n /// @notice Tracks enabled asset rewards.\\n mapping(ERC20 => bool) public rewardEnabled;\\n /// @notice Stores registered asset rewards.\\n ERC20[] public rewardList;\\n /// @notice Stores Markets with distributions set.\\n Market[] public marketList;\\n /// @notice Tracks the owner nonces for the claim permit.\\n mapping(address => uint256) public nonces;\\n /// @notice Temporarily stores the claim permit owner or `msg.sender` of the claim call.\\n address private _claimSender;\\n /// @notice Tracks the allowed `keeper` to claim on behalf of `account`.\\n mapping(address account => address keeper) public keepers;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev Can only be called once.\\n function initialize() external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded deposit.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleDeposit(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n ops[0] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n update(account, market, dist.availableRewards[r], ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded borrow.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleBorrow(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n (, , uint256 accountFloatingBorrowShares) = market.accounts(account);\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n ERC20 reward = dist.availableRewards[r];\\n ops[0] = AccountOperation({\\n operation: true,\\n balance: accountFloatingBorrowShares + accountFixedBorrowShares(market, account, dist.rewards[reward].start)\\n });\\n update(account, Market(msg.sender), reward, ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Claims `account` rewards for the given operations and reward assets.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param account The account to claim the rewards for.\\n /// @param rewardsList The list of rewards assets to claim.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claimOnBehalfOf(\\n MarketOperation[] memory marketOps,\\n address account,\\n ERC20[] memory rewardsList\\n ) external returns (ERC20[] memory, uint256[] memory) {\\n if (keepers[account] != msg.sender) revert NotKeeper();\\n return claim(marketOps, account, account, rewardsList);\\n }\\n\\n /// @notice Claims all `msg.sender` rewards to the given account.\\n /// @param to The address to send the rewards to.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claimAll(address to) external returns (ERC20[] memory rewardsList, uint256[] memory claimedAmounts) {\\n return claim(allMarketsOperations(), to, rewardList);\\n }\\n\\n /// @notice Claims `msg.sender` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param to The address to send the rewards to.\\n /// @param rewardsList The list of rewards assets to claim.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n address to,\\n ERC20[] memory rewardsList\\n ) public claimSender returns (ERC20[] memory, uint256[] memory) {\\n return claim(marketOps, _claimSender, to, rewardsList);\\n }\\n\\n function claim(\\n MarketOperation[] memory marketOps,\\n address account,\\n address to,\\n ERC20[] memory rewardsList\\n ) internal returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n claimedAmounts = new uint256[](rewardsList.length);\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n for (uint128 r = 0; r < dist.availableRewardsCount; ) {\\n update(\\n account,\\n marketOperation.market,\\n dist.availableRewards[r],\\n accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n account,\\n dist.rewards[dist.availableRewards[r]].start\\n )\\n );\\n unchecked {\\n ++r;\\n }\\n }\\n for (uint256 r = 0; r < rewardsList.length; ) {\\n RewardData storage rewardData = dist.rewards[rewardsList[r]];\\n for (uint256 o = 0; o < marketOperation.operations.length; ) {\\n uint256 rewardAmount = rewardData.accounts[account][marketOperation.operations[o]].accrued;\\n if (rewardAmount != 0) {\\n claimedAmounts[r] += rewardAmount;\\n rewardData.accounts[account][marketOperation.operations[o]].accrued = 0;\\n }\\n unchecked {\\n ++o;\\n }\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 r = 0; r < rewardsList.length; ) {\\n uint256 claimedAmount = claimedAmounts[r];\\n if (claimedAmount > 0) {\\n rewardsList[r].safeTransfer(to, claimedAmount);\\n emit Claim(account, rewardsList[r], to, claimedAmount);\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n return (rewardsList, claimedAmounts);\\n }\\n\\n /// @notice Claims `permit.owner` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param permit Arguments and signature from `permit.owner`.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n ClaimPermit calldata permit\\n ) external permitSender(permit) returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n return claim(marketOps, msg.sender, permit.assets);\\n }\\n\\n /// @notice Gets the configuration of a given distribution.\\n /// @param market The market to get the distribution configuration for.\\n /// @param reward The reward asset.\\n /// @return The distribution configuration.\\n function rewardConfig(Market market, ERC20 reward) external view returns (Config memory) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return\\n Config({\\n market: market,\\n reward: reward,\\n priceFeed: rewardData.priceFeed,\\n start: rewardData.start,\\n distributionPeriod: rewardData.end - rewardData.start,\\n targetDebt: rewardData.targetDebt,\\n totalDistribution: rewardData.totalDistribution,\\n undistributedFactor: rewardData.undistributedFactor,\\n flipSpeed: rewardData.flipSpeed,\\n compensationFactor: rewardData.compensationFactor,\\n transitionFactor: rewardData.transitionFactor,\\n borrowAllocationWeightFactor: rewardData.borrowAllocationWeightFactor,\\n depositAllocationWeightAddend: rewardData.depositAllocationWeightAddend,\\n depositAllocationWeightFactor: rewardData.depositAllocationWeightFactor\\n });\\n }\\n\\n /// @notice Gets the amount of reward assets that are being distributed for a Market.\\n /// @param market Market to get the number of available rewards to distribute.\\n /// @return The amount reward assets set to a Market.\\n function availableRewardsCount(Market market) external view returns (uint256) {\\n return distribution[market].availableRewardsCount;\\n }\\n\\n /// @notice Gets the account data of a given account, Market, operation and reward asset.\\n /// @param account The account to get the operation data from.\\n /// @param market The market in which the operation was made.\\n /// @param operation True if the operation was a borrow, false if it was a deposit.\\n /// @param reward The reward asset.\\n /// @return accrued The accrued amount.\\n /// @return index The account index.\\n function accountOperation(\\n address account,\\n Market market,\\n bool operation,\\n ERC20 reward\\n ) external view returns (uint256, uint256) {\\n Account storage operationAccount = distribution[market].rewards[reward].accounts[account][operation];\\n return (operationAccount.accrued, operationAccount.index);\\n }\\n\\n /// @notice Gets the distribution `start`, `end` and `lastUpdate` value of a given market and reward.\\n /// @param market The market to get the distribution times.\\n /// @param reward The reward asset.\\n /// @return The distribution `start`, `end` and `lastUpdate` time.\\n function distributionTime(Market market, ERC20 reward) external view returns (uint32, uint32, uint32) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.start, rewardData.end, rewardData.lastUpdate);\\n }\\n\\n /// @notice Retrieves all rewards addresses.\\n function allRewards() external view returns (ERC20[] memory) {\\n return rewardList;\\n }\\n\\n /// @notice Gets all market and operations.\\n /// @return marketOps The list of market operations.\\n function allMarketsOperations() public view returns (MarketOperation[] memory marketOps) {\\n Market[] memory markets = marketList;\\n marketOps = new MarketOperation[](markets.length);\\n for (uint256 m = 0; m < markets.length; ) {\\n bool[] memory ops = new bool[](2);\\n ops[0] = true;\\n ops[1] = false;\\n marketOps[m] = MarketOperation({ market: markets[m], operations: ops });\\n unchecked {\\n ++m;\\n }\\n }\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account and reward asset.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function allClaimable(address account, ERC20 reward) external view returns (uint256 unclaimedRewards) {\\n return claimable(allMarketsOperations(), account, reward);\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account, Market operations and reward asset.\\n /// @param marketOps The list of Market operations to get the accrued and pending rewards from.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function claimable(\\n MarketOperation[] memory marketOps,\\n address account,\\n ERC20 reward\\n ) public view returns (uint256 unclaimedRewards) {\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n RewardData storage rewardData = dist.rewards[reward];\\n if (dist.availableRewardsCount == 0) {\\n unchecked {\\n ++i;\\n }\\n continue;\\n }\\n\\n AccountOperation[] memory ops = accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n account,\\n rewardData.start\\n );\\n uint256 balance;\\n for (uint256 o = 0; o < ops.length; ) {\\n unclaimedRewards += rewardData.accounts[account][ops[o].operation].accrued;\\n balance += ops[o].balance;\\n unchecked {\\n ++o;\\n }\\n }\\n if (balance > 0) {\\n unclaimedRewards += pendingRewards(\\n account,\\n reward,\\n AccountMarketOperation({ market: marketOperation.market, accountOperations: ops })\\n );\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Iterates and accrues all rewards for the operations of the given account in the given market.\\n /// @param account The account to accrue the rewards for.\\n /// @param market The Market in which the operations where made.\\n /// @param reward The reward asset.\\n /// @param ops The operations to accrue the rewards for.\\n function update(address account, Market market, ERC20 reward, AccountOperation[] memory ops) internal {\\n uint256 baseUnit = distribution[market].baseUnit;\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n {\\n uint256 lastUpdate = rewardData.lastUpdate;\\n // `lastUpdate` can be greater than `block.timestamp` if distribution is set to start on a future date\\n if (block.timestamp > lastUpdate && (lastUpdate < rewardData.end || rewardData.lastUndistributed != 0)) {\\n (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) = previewAllocation(\\n rewardData,\\n market,\\n block.timestamp - lastUpdate\\n );\\n if (borrowIndex > type(uint128).max || depositIndex > type(uint128).max) revert IndexOverflow();\\n rewardData.borrowIndex = uint128(borrowIndex);\\n rewardData.depositIndex = uint128(depositIndex);\\n rewardData.lastUpdate = uint32(block.timestamp);\\n rewardData.lastUndistributed = newUndistributed;\\n emit IndexUpdate(market, reward, borrowIndex, depositIndex, newUndistributed, block.timestamp);\\n }\\n }\\n\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 i = 0; i < ops.length; ) {\\n AccountOperation memory op = ops[i];\\n Account storage accountData = operationAccount[op.operation];\\n uint256 accountIndex = accountData.index;\\n uint256 newAccountIndex;\\n if (op.operation) {\\n newAccountIndex = rewardData.borrowIndex;\\n } else {\\n newAccountIndex = rewardData.depositIndex;\\n }\\n if (accountIndex != newAccountIndex) {\\n accountData.index = uint128(newAccountIndex);\\n if (op.balance != 0) {\\n uint256 rewardsAccrued = accountRewards(op.balance, newAccountIndex, accountIndex, baseUnit);\\n accountData.accrued += uint128(rewardsAccrued);\\n emit Accrue(market, reward, account, op.operation, accountIndex, newAccountIndex, rewardsAccrued);\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the equivalent of borrow shares from fixed pool principal borrows of an account.\\n /// @param market The Market to get the fixed borrows from.\\n /// @param account The account that borrowed from fixed pools.\\n /// @return fixedDebt The fixed borrow shares.\\n function accountFixedBorrowShares(\\n Market market,\\n address account,\\n uint32 start\\n ) internal view returns (uint256 fixedDebt) {\\n uint256 firstMaturity = start - (start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 principal, ) = market.fixedBorrowPositions(maturity, account);\\n fixedDebt += principal;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n fixedDebt = market.previewRepay(fixedDebt);\\n }\\n\\n /// @notice Gets the reward indexes and last amount of undistributed rewards for a given market and reward asset.\\n /// @param market The market to get the reward indexes for.\\n /// @param reward The reward asset to get the reward indexes for.\\n /// @return borrowIndex The index for the floating and fixed borrow operation.\\n /// @return depositIndex The index for the floating deposit operation.\\n /// @return lastUndistributed The last amount of undistributed rewards.\\n function rewardIndexes(Market market, ERC20 reward) external view returns (uint256, uint256, uint256) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.borrowIndex, rewardData.depositIndex, rewardData.lastUndistributed);\\n }\\n\\n /// @notice Calculates the rewards not accrued yet for the given operations of a given account and reward asset.\\n /// @param account The account to get the pending rewards for.\\n /// @param reward The reward asset to get the pending rewards for.\\n /// @param ops The operations to get the pending rewards for.\\n /// @return rewards The pending rewards for the given operations.\\n function pendingRewards(\\n address account,\\n ERC20 reward,\\n AccountMarketOperation memory ops\\n ) internal view returns (uint256 rewards) {\\n RewardData storage rewardData = distribution[ops.market].rewards[reward];\\n uint256 baseUnit = distribution[ops.market].baseUnit;\\n uint256 lastUpdate = rewardData.lastUpdate;\\n (uint256 borrowIndex, uint256 depositIndex, ) = previewAllocation(\\n rewardData,\\n ops.market,\\n block.timestamp > lastUpdate ? block.timestamp - lastUpdate : 0\\n );\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 o = 0; o < ops.accountOperations.length; ) {\\n uint256 nextIndex;\\n if (ops.accountOperations[o].operation) {\\n nextIndex = borrowIndex;\\n } else {\\n nextIndex = depositIndex;\\n }\\n\\n rewards += accountRewards(\\n ops.accountOperations[o].balance,\\n nextIndex,\\n operationAccount[ops.accountOperations[o].operation].index,\\n baseUnit\\n );\\n unchecked {\\n ++o;\\n }\\n }\\n }\\n\\n /// @notice Calculates and returns the new amount of rewards given by the difference between the `accountIndex` and\\n /// the `globalIndex`.\\n /// @param balance The account's balance in the operation's pool.\\n /// @param globalIndex Current index of the distribution.\\n /// @param accountIndex Last index stored for the account.\\n /// @param baseUnit One unit of the Market's asset (10**decimals).\\n /// @return The amount of new rewards to be accrued by the account.\\n function accountRewards(\\n uint256 balance,\\n uint256 globalIndex,\\n uint256 accountIndex,\\n uint256 baseUnit\\n ) internal pure returns (uint256) {\\n return balance.mulDivDown(globalIndex - accountIndex, baseUnit);\\n }\\n\\n /// @notice Retrieves projected distribution indexes and new undistributed amount for a given `deltaTime`.\\n /// @param market The market to calculate the indexes for.\\n /// @param reward The reward asset to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n Market market,\\n ERC20 reward,\\n uint256 deltaTime\\n ) external view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n return previewAllocation(distribution[market].rewards[reward], market, deltaTime);\\n }\\n\\n /// @notice Calculates and returns the distribution indexes and new undistributed tokens for a given `rewardData`.\\n /// @param rewardData The distribution's data.\\n /// @param market The market to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n RewardData storage rewardData,\\n Market market,\\n uint256 deltaTime\\n ) internal view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n TotalMarketBalance memory m;\\n m.floatingDebt = market.floatingDebt();\\n m.floatingAssets = market.floatingAssets();\\n TimeVars memory t;\\n t.start = rewardData.start;\\n t.end = rewardData.end;\\n {\\n uint256 firstMaturity = t.start - (t.start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n uint256 fixedDebt;\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 borrowed, ) = market.fixedPoolBalance(maturity);\\n fixedDebt += borrowed;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n m.debt = m.floatingDebt + fixedDebt;\\n m.fixedBorrowShares = market.previewRepay(fixedDebt);\\n }\\n uint256 target;\\n {\\n uint256 targetDebt = rewardData.targetDebt;\\n target = m.debt < targetDebt ? m.debt.divWadDown(targetDebt) : 1e18;\\n }\\n uint256 rewards;\\n {\\n uint256 releaseRate = rewardData.releaseRate;\\n uint256 lastUndistributed = rewardData.lastUndistributed;\\n t.period = t.end - t.start;\\n uint256 distributionFactor = t.period > 0\\n ? rewardData.undistributedFactor.mulDivDown(target, t.period * 1e18)\\n : 0;\\n if (block.timestamp <= t.end) {\\n if (distributionFactor > 0) {\\n uint256 exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n } else if (rewardData.lastUpdate > t.end) {\\n newUndistributed =\\n lastUndistributed -\\n lastUndistributed.mulWadUp(1e18 - uint256((-int256(distributionFactor * deltaTime)).expWad()));\\n rewards = uint256(-(int256(newUndistributed) - int256(lastUndistributed)));\\n } else {\\n uint256 exponential;\\n deltaTime = t.end - rewardData.lastUpdate;\\n if (distributionFactor > 0) {\\n exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n exponential = uint256((-int256(distributionFactor * (block.timestamp - t.end))).expWad());\\n newUndistributed = newUndistributed - newUndistributed.mulWadUp(1e18 - exponential);\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n }\\n if (rewards == 0) return (rewardData.borrowIndex, rewardData.depositIndex, newUndistributed);\\n }\\n {\\n AllocationVars memory v;\\n v.globalUtilization = Math.min(\\n m.floatingAssets != 0\\n ? 1e18 - (m.floatingAssets - m.floatingDebt - market.floatingBackupBorrowed()).divWadDown(m.floatingAssets)\\n : 0,\\n UTILIZATION_CAP\\n );\\n v.transitionFactor = rewardData.transitionFactor;\\n v.flipSpeed = rewardData.flipSpeed;\\n v.borrowAllocationWeightFactor = rewardData.borrowAllocationWeightFactor;\\n v.sigmoid = v.globalUtilization > 0\\n ? uint256(1e18).divWadDown(\\n 1e18 +\\n uint256(\\n (-(v.flipSpeed *\\n (int256(v.globalUtilization.divWadDown(1e18 - v.globalUtilization)).lnWad() -\\n int256(v.transitionFactor.divWadDown(1e18 - v.transitionFactor)).lnWad())) / 1e18).expWad()\\n )\\n )\\n : 0;\\n v.borrowRewardRule = rewardData\\n .compensationFactor\\n .mulWadDown(\\n market\\n .interestRateModel()\\n .floatingRate(m.floatingAssets != 0 ? m.floatingDebt.divWadDown(m.floatingAssets) : 0, v.globalUtilization)\\n .mulWadDown(1e18 - v.globalUtilization.mulWadUp(1e18 - market.treasuryFeeRate())) +\\n v.borrowAllocationWeightFactor\\n )\\n .mulWadDown(1e18 - v.sigmoid);\\n v.depositRewardRule =\\n rewardData.depositAllocationWeightAddend.mulWadDown(1e18 - v.sigmoid) +\\n rewardData.depositAllocationWeightFactor.mulWadDown(v.sigmoid);\\n v.borrowAllocation = v.borrowRewardRule.divWadDown(v.borrowRewardRule + v.depositRewardRule);\\n v.depositAllocation = 1e18 - v.borrowAllocation;\\n {\\n uint256 totalDepositSupply = market.totalSupply();\\n uint256 totalBorrowSupply = market.totalFloatingBorrowShares() + m.fixedBorrowShares;\\n uint256 baseUnit = distribution[market].baseUnit;\\n borrowIndex =\\n rewardData.borrowIndex +\\n (totalBorrowSupply > 0 ? rewards.mulWadDown(v.borrowAllocation).mulDivDown(baseUnit, totalBorrowSupply) : 0);\\n depositIndex =\\n rewardData.depositIndex +\\n (\\n totalDepositSupply > 0\\n ? rewards.mulWadDown(v.depositAllocation).mulDivDown(baseUnit, totalDepositSupply)\\n : 0\\n );\\n }\\n }\\n }\\n\\n /// @notice Get account balances of the given Market operations.\\n /// @param market The address of the Market.\\n /// @param ops List of operations to retrieve account balance.\\n /// @param account Account to get the balance from.\\n /// @param distributionStart Timestamp of the start of the distribution to correctly get the rewarded fixed pools.\\n /// @return accountBalanceOps contains a list with account balance per each operation.\\n function accountBalanceOperations(\\n Market market,\\n bool[] memory ops,\\n address account,\\n uint32 distributionStart\\n ) internal view returns (AccountOperation[] memory accountBalanceOps) {\\n accountBalanceOps = new AccountOperation[](ops.length);\\n for (uint256 i = 0; i < ops.length; ) {\\n if (ops[i]) {\\n (, , uint256 floatingBorrowShares) = market.accounts(account);\\n accountBalanceOps[i] = AccountOperation({\\n operation: true,\\n balance: floatingBorrowShares + accountFixedBorrowShares(market, account, distributionStart)\\n });\\n } else {\\n accountBalanceOps[i] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Sets the `keeper` address for the given `account`.\\n /// @param account The account to set the `keeper` for.\\n /// @param keeper The address to set as the `keeper`.\\n function setKeeper(address account, address keeper) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n keepers[account] = keeper;\\n }\\n\\n /// @notice Withdraws the contract's balance of the given asset to the given address.\\n /// @param asset The asset to withdraw.\\n /// @param to The address to withdraw the asset to.\\n function withdraw(ERC20 asset, address to) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n asset.safeTransfer(to, asset.balanceOf(address(this)));\\n }\\n\\n /// @notice Enables or updates the reward distribution for the given markets and rewards.\\n /// @param configs The configurations to update each RewardData with.\\n function config(Config[] memory configs) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n for (uint256 i = 0; i < configs.length; ) {\\n // transitionFactor cannot be eq or higher than 1e18 to avoid division by zero or underflow\\n if (configs[i].transitionFactor >= 1e18) revert InvalidConfig();\\n // depositAllocationWeightFactor cannot be zero to avoid division by zero when sigmoid equals 1e18\\n if (configs[i].depositAllocationWeightFactor == 0) revert InvalidConfig();\\n\\n Distribution storage dist = distribution[configs[i].market];\\n RewardData storage rewardData = dist.rewards[configs[i].reward];\\n\\n if (dist.baseUnit == 0) {\\n // never initialized before, adding to the list of markets\\n marketList.push(configs[i].market);\\n }\\n if (!rewardEnabled[configs[i].reward]) {\\n // add reward address to global rewards list if still not enabled\\n rewardEnabled[configs[i].reward] = true;\\n rewardList.push(configs[i].reward);\\n }\\n if (rewardData.lastUpdate == 0) {\\n // add reward address to distribution data's available rewards if distribution is new\\n dist.availableRewards[dist.availableRewardsCount++] = configs[i].reward;\\n dist.baseUnit = 10 ** configs[i].market.decimals();\\n // set initial parameters if distribution is new\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n } else {\\n uint32 start = rewardData.start;\\n uint32 end = rewardData.end;\\n // update global indexes before updating distribution values\\n bool[] memory ops = new bool[](1);\\n ops[0] = true;\\n update(\\n address(0),\\n configs[i].market,\\n configs[i].reward,\\n accountBalanceOperations(configs[i].market, ops, address(0), start)\\n );\\n // properly update release rate\\n if (block.timestamp < end) {\\n uint256 released = 0;\\n uint256 elapsed = 0;\\n if (block.timestamp > start) {\\n released =\\n rewardData.lastConfigReleased +\\n rewardData.releaseRate *\\n (block.timestamp - Math.max(rewardData.lastConfig, start));\\n elapsed = block.timestamp - start;\\n if (configs[i].totalDistribution <= released || configs[i].distributionPeriod <= elapsed) {\\n revert InvalidConfig();\\n }\\n rewardData.lastConfigReleased = released;\\n }\\n\\n rewardData.releaseRate =\\n (configs[i].totalDistribution - released) /\\n (configs[i].distributionPeriod - elapsed);\\n } else if (rewardData.start != configs[i].start) {\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n rewardData.lastConfigReleased = 0;\\n }\\n }\\n rewardData.lastConfig = uint32(block.timestamp);\\n rewardData.end = rewardData.start + uint32(configs[i].distributionPeriod);\\n rewardData.priceFeed = configs[i].priceFeed;\\n // set emission and distribution parameters\\n rewardData.totalDistribution = configs[i].totalDistribution;\\n rewardData.targetDebt = configs[i].targetDebt;\\n rewardData.undistributedFactor = configs[i].undistributedFactor;\\n rewardData.flipSpeed = configs[i].flipSpeed;\\n rewardData.compensationFactor = configs[i].compensationFactor;\\n rewardData.borrowAllocationWeightFactor = configs[i].borrowAllocationWeightFactor;\\n rewardData.depositAllocationWeightAddend = configs[i].depositAllocationWeightAddend;\\n rewardData.transitionFactor = configs[i].transitionFactor;\\n rewardData.depositAllocationWeightFactor = configs[i].depositAllocationWeightFactor;\\n\\n emit DistributionSet(configs[i].market, configs[i].reward, configs[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(\\\"RewardsController\\\"),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n modifier claimSender() {\\n if (_claimSender == address(0)) _claimSender = msg.sender;\\n _;\\n delete _claimSender;\\n }\\n\\n modifier permitSender(ClaimPermit calldata permit) {\\n assert(_claimSender == address(0));\\n assert(permit.deadline >= block.timestamp);\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\\"ClaimPermit(address owner,address spender,address[] assets,uint256 deadline)\\\"),\\n permit.owner,\\n msg.sender,\\n permit.assets,\\n nonces[permit.owner]++,\\n permit.deadline\\n )\\n )\\n )\\n ),\\n permit.v,\\n permit.r,\\n permit.s\\n );\\n assert(recoveredAddress != address(0) && recoveredAddress == permit.owner);\\n _claimSender = permit.owner;\\n }\\n _;\\n assert(_claimSender == address(0));\\n }\\n\\n struct TotalMarketBalance {\\n uint256 debt;\\n uint256 fixedBorrowShares;\\n uint256 floatingDebt;\\n uint256 floatingAssets;\\n }\\n\\n struct TimeVars {\\n uint256 start;\\n uint256 end;\\n uint256 period;\\n }\\n\\n struct AllocationVars {\\n uint256 globalUtilization;\\n uint256 sigmoid;\\n uint256 borrowRewardRule;\\n uint256 depositRewardRule;\\n uint256 borrowAllocation;\\n uint256 depositAllocation;\\n uint256 transitionFactor;\\n int256 flipSpeed;\\n uint256 borrowAllocationWeightFactor;\\n }\\n\\n struct AccountOperation {\\n bool operation;\\n uint256 balance;\\n }\\n\\n struct MarketOperation {\\n Market market;\\n bool[] operations;\\n }\\n\\n struct AccountMarketOperation {\\n Market market;\\n AccountOperation[] accountOperations;\\n }\\n\\n struct Account {\\n // liquidity index of the reward distribution for the account\\n uint128 index;\\n // amount of accrued rewards for the account since last account index update\\n uint128 accrued;\\n }\\n\\n struct Config {\\n Market market;\\n ERC20 reward;\\n IPriceFeed priceFeed;\\n uint32 start;\\n uint256 distributionPeriod;\\n uint256 targetDebt;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n }\\n\\n struct RewardData {\\n // distribution model\\n uint256 targetDebt;\\n uint256 releaseRate;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n uint256 lastUndistributed;\\n // allocation model\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n // liquidity indexes of the reward distribution\\n uint128 borrowIndex;\\n uint128 depositIndex;\\n // distribution timestamps\\n uint32 start;\\n uint32 end;\\n uint32 lastUpdate;\\n // config helpers\\n uint32 lastConfig;\\n uint256 lastConfigReleased;\\n // price feed\\n IPriceFeed priceFeed;\\n // account addresses and their rewards data (index & accrued)\\n mapping(address => mapping(bool => Account)) accounts;\\n }\\n\\n struct Distribution {\\n // reward assets and their data\\n mapping(ERC20 => RewardData) rewards;\\n // list of reward asset addresses for the market\\n mapping(uint128 => ERC20) availableRewards;\\n // count of reward tokens for the market\\n uint8 availableRewardsCount;\\n // base unit of the market\\n uint256 baseUnit;\\n }\\n\\n /// @notice Emitted when rewards are accrued by an account.\\n /// @param market Market where the operation was made.\\n /// @param reward reward asset.\\n /// @param account account that accrued the rewards.\\n /// @param operation true if the operation was a borrow, false if it was a deposit.\\n /// @param accountIndex previous account index.\\n /// @param operationIndex new operation index that is assigned to the `accountIndex`.\\n /// @param rewardsAccrued amount of rewards accrued.\\n event Accrue(\\n Market indexed market,\\n ERC20 indexed reward,\\n address indexed account,\\n bool operation,\\n uint256 accountIndex,\\n uint256 operationIndex,\\n uint256 rewardsAccrued\\n );\\n\\n /// @notice Emitted when rewards are claimed by an account.\\n /// @param account account that claimed the rewards.\\n /// @param reward reward asset.\\n /// @param to account that received the rewards.\\n /// @param amount amount of rewards claimed.\\n event Claim(address indexed account, ERC20 indexed reward, address indexed to, uint256 amount);\\n\\n /// @notice Emitted when a distribution is set.\\n /// @param market Market whose distribution was set.\\n /// @param reward reward asset to be distributed when operating with the Market.\\n /// @param config configuration struct containing the distribution parameters.\\n event DistributionSet(Market indexed market, ERC20 indexed reward, Config config);\\n\\n /// @notice Emitted when the distribution indexes are updated.\\n /// @param market Market of the distribution.\\n /// @param reward reward asset.\\n /// @param borrowIndex index of the borrow operations of a distribution.\\n /// @param depositIndex index of the deposit operations of a distribution.\\n /// @param newUndistributed amount of undistributed rewards.\\n /// @param lastUpdate current timestamp.\\n event IndexUpdate(\\n Market indexed market,\\n ERC20 indexed reward,\\n uint256 borrowIndex,\\n uint256 depositIndex,\\n uint256 newUndistributed,\\n uint256 lastUpdate\\n );\\n}\\n\\nerror IndexOverflow();\\nerror InvalidConfig();\\nerror NotKeeper();\\n\\nstruct ClaimPermit {\\n address owner;\\n ERC20[] assets;\\n uint256 deadline;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n}\\n\",\"keccak256\":\"0xab502e9e6c6fdd56878d80fde0aee78c360234b15b1db8d7cb6508fe3c430163\",\"license\":\"BUSL-1.1\"},\"contracts/StakedEXA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\nimport { IERC6372 } from \\\"@openzeppelin/contracts/interfaces/IERC6372.sol\\\";\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { PausableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\\\";\\nimport {\\n ERC20PermitUpgradeable,\\n ERC20Upgradeable,\\n IERC20Permit\\n} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol\\\";\\nimport { ERC4626Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC4626Upgradeable.sol\\\";\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\n\\nimport { Market } from \\\"./Market.sol\\\";\\n\\n/// @title StakedEXA Contract\\n/// @notice This contract allows users to stake EXA tokens and earn rewards.\\n/// The rewards are subject to a penalty if the staking duration is not optimal.\\n/// The optimal staking duration is defined by `refTime`.\\n/// Staking for a duration less than `minTime` results in no rewards,\\n/// the closer the staking duration is to `refTime`, the lower the penalty.\\ncontract StakedEXA is\\n Initializable,\\n AccessControlUpgradeable,\\n PausableUpgradeable,\\n ERC4626Upgradeable,\\n ERC20PermitUpgradeable,\\n IERC6372\\n{\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for int256;\\n using SafeERC20 for IERC20;\\n using SafeCast for int256;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant EMERGENCY_ADMIN_ROLE = keccak256(\\\"EMERGENCY_ADMIN_ROLE\\\");\\n\\n /// @notice Rewards tokens.\\n IERC20[] public rewardsTokens;\\n /// @notice Maximum amount of rewards token.\\n uint256 public constant MAX_REWARDS_TOKENS = 100;\\n\\n /// @notice Minimum time to stake and get rewards.\\n uint256 public minTime;\\n /// @notice Reference period to stake and get full rewards. Not possible to change after initilization.\\n uint256 public refTime;\\n /// @notice Discount factor for excess exposure. Not possible to change after initilization.\\n uint256 public excessFactor;\\n /// @notice Penalty growth factor.\\n uint256 public penaltyGrowth;\\n /// @notice Threshold penalty factor for withdrawing before the reference time.\\n uint256 public penaltyThreshold;\\n\\n /// @notice market from which to harvest.\\n Market public market;\\n /// @notice provider of rewards when harvesting.\\n address public provider;\\n /// @notice savings address to send the rewards.\\n address public savings;\\n /// @notice ratio of withdrawn assets to provide when harvesting. The rest goes to savings\\n uint256 public providerRatio;\\n\\n /// @notice Rewards data per token.\\n mapping(IERC20 reward => RewardData data) public rewards;\\n /// @notice Average starting time with the tokens staked per account.\\n mapping(address account => uint256 time) public avgStart;\\n /// @notice Accounts average indexes per reward token.\\n mapping(address account => mapping(IERC20 reward => uint256 index)) public avgIndexes;\\n /// @notice Accounts claimed rewards per reward token.\\n mapping(address account => mapping(IERC20 reward => uint256 claimed)) public claimed;\\n /// @notice Accounts saved rewards per reward token.\\n mapping(address account => mapping(IERC20 reward => uint256 saved)) public saved;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n /// @param p The parameters for initialization.\\n function initialize(Parameters memory p) external initializer {\\n __ERC20_init(\\\"staked EXA\\\", \\\"stEXA\\\");\\n __ERC4626_init(p.asset);\\n __ERC20Permit_init(\\\"staked EXA\\\");\\n\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n if (p.refTime == 0 || p.refTime <= p.minTime || p.excessFactor > 1e18) revert InvalidRange();\\n setMinTime(p.minTime);\\n refTime = p.refTime;\\n excessFactor = p.excessFactor;\\n setPenaltyGrowth(p.penaltyGrowth);\\n setPenaltyThreshold(p.penaltyThreshold);\\n\\n setMarket(p.market);\\n setRewardsDuration(IERC20(address(p.market)), p.duration);\\n\\n setProvider(p.provider);\\n setProviderRatio(p.providerRatio);\\n setSavings(p.savings);\\n }\\n\\n /// @notice Updates the reward index for a given reward token.\\n /// @param reward The reward token to update.\\n function updateIndex(IERC20 reward) internal {\\n RewardData storage rewardData = rewards[reward];\\n rewardData.index = globalIndex(reward);\\n rewardData.updatedAt = uint40(lastTimeRewardApplicable(rewardData.finishAt));\\n }\\n\\n /// @notice Hook to handle updates during token transfer.\\n /// @param from The address transferring the tokens.\\n /// @param to The address receiving the tokens.\\n /// @param amount The amount of tokens being transferred.\\n function _update(address from, address to, uint256 amount) internal override whenNotPaused {\\n if (amount == 0) revert ZeroAmount();\\n if (from == address(0)) {\\n if (to != msg.sender && allowance(to, msg.sender) == 0) revert NotAllowed();\\n uint256 start = avgStart[to];\\n uint256 time = start != 0 ? block.timestamp * 1e18 - start : 0;\\n uint256 memRefTime = refTime * 1e18;\\n uint256 balance = balanceOf(to);\\n uint256 total = amount + balance;\\n\\n uint256 length = rewardsTokens.length;\\n for (uint256 i = 0; i < length; ++i) {\\n IERC20 reward = rewardsTokens[i];\\n updateIndex(reward);\\n\\n if (time > memRefTime) {\\n if (balance != 0) claimWithdraw(reward, to, balance);\\n avgIndexes[to][reward] = rewards[reward].index;\\n } else {\\n if (balance != 0) claim_(reward, to);\\n uint256 numerator = avgIndexes[to][reward] * balance + rewards[reward].index * amount;\\n avgIndexes[to][reward] = numerator == 0 ? 0 : (numerator - 1) / total + 1;\\n }\\n }\\n if (time > memRefTime) avgStart[to] = block.timestamp * 1e18;\\n else {\\n uint256 numerator = start * balance + block.timestamp * 1e18 * amount;\\n avgStart[to] = numerator == 0 ? 0 : (numerator - 1) / total + 1;\\n }\\n try this.harvest() {} catch {} // solhint-disable-line no-empty-blocks\\n } else if (to == address(0)) {\\n uint256 length = rewardsTokens.length;\\n for (uint256 i = 0; i < length; ++i) {\\n IERC20 reward = rewardsTokens[i];\\n updateIndex(reward);\\n claimWithdraw(reward, from, amount);\\n }\\n } else revert Untransferable();\\n\\n super._update(from, to, amount);\\n }\\n\\n /// @notice Permits a spender and deposits assets in a single transaction.\\n /// @param assets The amount of assets to deposit.\\n /// @param receiver The address receiving the deposited assets.\\n /// @param p The permit parameters.\\n /// @return The number of shares received.\\n function permitAndDeposit(uint256 assets, address receiver, Permit calldata p) external returns (uint256) {\\n // solhint-disable-next-line no-empty-blocks\\n try IERC20Permit(asset()).permit(receiver, address(this), p.value, p.deadline, p.v, p.r, p.s) {} catch {}\\n\\n uint256 maxAssets = maxDeposit(receiver);\\n if (assets > maxAssets) revert ERC4626ExceededMaxDeposit(receiver, assets, maxAssets);\\n\\n uint256 shares = previewDeposit(assets);\\n _deposit(receiver, receiver, assets, shares);\\n\\n return shares;\\n }\\n\\n /// @notice Claims unclaimed rewards when withdrawing an amount of assets.\\n /// @param reward The reward token to claim.\\n /// @param account The account receiving the withdrawn assets and rewards.\\n /// @param amount The amount of assets being withdrawn.\\n function claimWithdraw(IERC20 reward, address account, uint256 amount) internal {\\n uint256 balance = balanceOf(account);\\n uint256 claimedAmount = (claimed[account][reward] * amount) / balance;\\n claimed[account][reward] -= claimedAmount;\\n\\n uint256 savedAmount = (saved[account][reward] * amount) / balance;\\n saved[account][reward] -= savedAmount;\\n\\n uint256 claimableAmount = Math.max(rawClaimable(reward, account, amount), claimedAmount); // due to excess exposure\\n uint256 claimAmount = claimableAmount - claimedAmount;\\n if (claimAmount != 0) {\\n reward.safeTransfer(account, claimAmount);\\n emit RewardPaid(reward, account, claimAmount);\\n }\\n\\n uint256 rawEarned = earned(reward, account, amount);\\n // due to rounding\\n uint256 saveAmount = rawEarned <= claimableAmount + savedAmount ? 0 : rawEarned - claimableAmount - savedAmount;\\n if (saveAmount != 0) reward.safeTransfer(savings, saveAmount);\\n }\\n\\n /// @notice Notifies the contract about a reward amount.\\n /// @param reward The reward token.\\n /// @param amount The amount of reward tokens.\\n /// @param notifier The address notifying the reward amount.\\n function notifyRewardAmount(IERC20 reward, uint256 amount, address notifier) internal onlyReward(reward) {\\n updateIndex(reward);\\n RewardData storage rewardData = rewards[reward];\\n if (block.timestamp >= rewardData.finishAt) {\\n rewardData.rate = (amount * 1e18) / rewardData.duration;\\n } else {\\n uint256 remainingRewards = (rewardData.finishAt - block.timestamp) * rewardData.rate;\\n rewardData.rate = (amount * 1e18 + remainingRewards) / rewardData.duration;\\n }\\n\\n if (rewardData.rate == 0) revert ZeroRate();\\n if (\\n rewardData.rate.mulWadDown(rewardData.duration) >\\n reward.balanceOf(address(this)) - (address(reward) == asset() ? totalAssets() : 0)\\n ) revert InsufficientBalance();\\n\\n rewardData.finishAt = uint40(block.timestamp) + rewardData.duration;\\n rewardData.updatedAt = uint40(block.timestamp);\\n\\n emit RewardAmountNotified(reward, notifier, amount);\\n }\\n\\n /// @notice Calculates the discount factor based on the staked time.\\n /// @param time The time staked, represented with 18 decimals.\\n /// @return The discount factor, which is always between 0 and 1e18.\\n function discountFactor(uint256 time) internal view returns (uint256) {\\n uint256 memMinTime = minTime * 1e18;\\n if (time <= memMinTime) return 0;\\n uint256 memRefTime = refTime * 1e18;\\n if (time >= memRefTime) {\\n uint256 memExcessFactor = excessFactor;\\n return (1e18 - memExcessFactor).mulWadDown((memRefTime * 1e18) / time) + memExcessFactor;\\n }\\n\\n uint256 timeRatio = ((time - memMinTime) * 1e18) / (memRefTime - memMinTime);\\n if (timeRatio == 0) return 0;\\n\\n uint256 penalties = uint256(((int256(penaltyGrowth) * int256(timeRatio).lnWad()) / 1e18).expWad());\\n\\n uint256 memPenaltyThreshold = penaltyThreshold;\\n return Math.min((1e18 - memPenaltyThreshold).mulWadDown(penalties) + memPenaltyThreshold, 1e18);\\n }\\n\\n /// @notice Ensures the caller has pausing roles.\\n /// @dev Throws if the caller is not an `EMERGENCY_ADMIN_ROLE` or `PAUSER_ROLE`.\\n function requirePausingRoles() internal view {\\n if (!hasRole(EMERGENCY_ADMIN_ROLE, msg.sender) && !hasRole(PAUSER_ROLE, msg.sender)) {\\n revert NotPausingRole();\\n }\\n }\\n\\n /// @dev Modifier to restrict functions to pausing roles.\\n modifier onlyPausingRoles() {\\n requirePausingRoles();\\n _;\\n }\\n\\n /// @notice Modifier to restrict functions to enabled reward tokens.\\n /// @param reward The reward token.\\n modifier onlyReward(IERC20 reward) {\\n if (rewards[reward].finishAt == 0) revert RewardNotListed();\\n _;\\n }\\n\\n /// @notice Returns the last time rewards are applicable.\\n /// @param finishAt The time when the reward period finishes.\\n /// @return The last applicable time.\\n function lastTimeRewardApplicable(uint256 finishAt) public view returns (uint256) {\\n return uint40(Math.min(finishAt, block.timestamp));\\n }\\n\\n /// @notice Returns the global index for a reward token.\\n /// @param reward The reward token.\\n /// @return The global index.\\n function globalIndex(IERC20 reward) public view returns (uint256) {\\n RewardData storage rewardData = rewards[reward];\\n if (totalSupply() == 0) return rewardData.index;\\n\\n return\\n rewardData.index +\\n rewardData.rate.mulDivDown(lastTimeRewardApplicable(rewardData.finishAt) - rewardData.updatedAt, totalSupply());\\n }\\n\\n /// @notice Returns the average index for a reward token and account.\\n /// @param reward The reward token.\\n /// @param account The account.\\n /// @return The average index.\\n function avgIndex(IERC20 reward, address account) public view returns (uint256) {\\n return avgIndexes[account][reward];\\n }\\n\\n /// @notice Calculates the earned rewards for an account, without considering penalties.\\n /// @param reward The reward token.\\n /// @param account The account.\\n /// @param shares The amount of shares.\\n /// @return The earned rewards.\\n function earned(IERC20 reward, address account, uint256 shares) public view returns (uint256) {\\n return shares.mulWadDown(globalIndex(reward) - avgIndexes[account][reward]);\\n }\\n\\n /// @notice Calculates the raw claimable rewards for an account, without considering already claimed rewards.\\n /// @param reward The reward token.\\n /// @param account The account.\\n /// @param shares The amount of shares of the account involved.\\n /// @return The raw claimable rewards.\\n function rawClaimable(IERC20 reward, address account, uint256 shares) public view returns (uint256) {\\n uint256 start = avgStart[account];\\n if (start == 0) return 0;\\n return earned(reward, account, shares).mulWadDown(discountFactor(block.timestamp * 1e18 - start));\\n }\\n\\n /// @notice Calculates the claimable rewards for an account.\\n /// @param reward The reward token.\\n /// @param account The account.\\n /// @param shares The amount of shares of the account involved.\\n /// @return The claimable rewards.\\n function claimable(IERC20 reward, address account, uint256 shares) public view returns (uint256) {\\n uint256 start = avgStart[account];\\n if (start == 0 || block.timestamp * 1e18 - start <= minTime * 1e18) return 0;\\n\\n uint256 rawClaimable_ = rawClaimable(reward, account, shares);\\n uint256 balance = balanceOf(account);\\n if (balance == 0) return 0;\\n\\n uint256 numerator = claimed[account][reward] * shares;\\n uint256 claimedAmountProportion = numerator == 0 ? 0 : (numerator - 1) / balance + 1;\\n return rawClaimable_ > claimedAmountProportion ? rawClaimable_ - claimedAmountProportion : 0;\\n }\\n\\n /// @notice Harvests provider's market assets as rewards to be distributed among stakers.\\n /// @dev This function withdraws the maximum allowable assets from the provider's market,\\n /// calculates the portion to be distributed as rewards based on `providerRatio`,\\n /// deposits any remaining assets back into savings, and notifies the contract of the new reward amount.\\n function harvest() external whenNotPaused {\\n Market memMarket = market;\\n address memProvider = provider;\\n uint256 shares = Math.min(memMarket.allowance(memProvider, address(this)), memMarket.maxRedeem(memProvider));\\n uint256 sharesReward = shares.mulWadDown(providerRatio);\\n\\n memMarket.transferFrom(provider, address(this), sharesReward);\\n uint256 save = shares - sharesReward;\\n if (save != 0) memMarket.transferFrom(memProvider, savings, save);\\n\\n notifyRewardAmount(IERC20(address(memMarket)), sharesReward, address(this));\\n }\\n\\n /// @notice Returns all reward tokens.\\n /// @return The list of reward tokens.\\n function allRewardsTokens() external view returns (IERC20[] memory) {\\n return rewardsTokens;\\n }\\n\\n /// @notice Internal function to claim rewards.\\n /// @param reward The reward token.\\n function claim_(IERC20 reward, address account) internal whenNotPaused {\\n uint256 time = block.timestamp * 1e18 - avgStart[account];\\n if (time <= minTime * 1e18) return;\\n\\n uint256 claimedAmount = claimed[account][reward];\\n // due to excess exposure\\n uint256 claimableAmount = Math.max(rawClaimable(reward, account, balanceOf(account)), claimedAmount);\\n uint256 claimAmount = claimableAmount - claimedAmount;\\n\\n if (claimAmount != 0) claimed[account][reward] = claimedAmount + claimAmount;\\n\\n if (time > refTime * 1e18) {\\n uint256 rawEarned = earned(reward, account, balanceOf(account));\\n uint256 savedAmount = saved[account][reward];\\n uint256 maxClaimed = Math.min(rawEarned, claimableAmount);\\n uint256 saveAmount = rawEarned > maxClaimed + savedAmount ? rawEarned - maxClaimed - savedAmount : 0;\\n\\n if (saveAmount != 0) {\\n saved[account][reward] = savedAmount + saveAmount;\\n reward.safeTransfer(savings, saveAmount);\\n }\\n }\\n if (claimAmount != 0) {\\n reward.safeTransfer(account, claimAmount);\\n emit RewardPaid(reward, account, claimAmount);\\n }\\n }\\n\\n /// @notice Claims rewards for a specific reward token.\\n /// @param reward The reward token.\\n function claim(IERC20 reward) external {\\n claim_(reward, msg.sender);\\n }\\n\\n /// @notice Claims rewards for all reward tokens.\\n function claimAll() external {\\n for (uint256 i = 0; i < rewardsTokens.length; ++i) {\\n claim_(rewardsTokens[i], msg.sender);\\n }\\n }\\n\\n /// @notice Withdraws `amount` of `reward` from contract to `savings`.\\n /// @param reward The reward token.\\n /// @param amount The amount of reward tokens to withdraw.\\n function withdrawRewards(IERC20 reward, uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) onlyReward(reward) {\\n if (address(reward) == asset() && amount > reward.balanceOf(address(this)) - totalAssets()) {\\n revert InsufficientBalance();\\n }\\n address memSavings = savings;\\n reward.safeTransfer(memSavings, amount);\\n emit RewardsWithdrawn(msg.sender, memSavings, reward, amount);\\n }\\n\\n /// @notice Enables a new reward token.\\n /// @param reward The reward token.\\n function enableReward(IERC20 reward) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (rewardsTokens.length >= MAX_REWARDS_TOKENS) revert MaxRewardsTokensExceeded();\\n if (rewards[reward].finishAt != 0) revert AlreadyEnabled();\\n\\n rewards[reward].finishAt = uint40(block.timestamp);\\n rewardsTokens.push(reward);\\n\\n emit RewardListed(reward, msg.sender);\\n }\\n\\n /// @notice Finishes the distribution of a reward token.\\n /// @param reward The reward token.\\n function finishDistribution(IERC20 reward) public onlyRole(DEFAULT_ADMIN_ROLE) onlyReward(reward) {\\n updateIndex(reward);\\n\\n if (block.timestamp < rewards[reward].finishAt) {\\n uint256 finishAt = rewards[reward].finishAt;\\n rewards[reward].finishAt = uint40(block.timestamp);\\n reward.safeTransfer(savings, (finishAt - block.timestamp).mulWadDown(rewards[reward].rate));\\n }\\n\\n if (reward == IERC20(address(market))) setProvider(address(0));\\n\\n emit DistributionFinished(reward, msg.sender);\\n }\\n\\n /// @notice Sets the rewards duration for a reward token.\\n /// @dev Can only change the duration if the reward is finished.\\n /// @param reward The reward token.\\n /// @param duration The new duration.\\n function setRewardsDuration(IERC20 reward, uint40 duration) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n RewardData storage rewardData = rewards[reward];\\n if (rewardData.finishAt > block.timestamp) revert NotFinished();\\n\\n rewardData.duration = duration;\\n\\n emit RewardsDurationSet(reward, msg.sender, duration);\\n }\\n\\n /// @notice Notifies the contract about a reward amount.\\n /// @param reward The reward token.\\n /// @param amount The amount of reward tokens.\\n function notifyRewardAmount(IERC20 reward, uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n notifyRewardAmount(reward, amount, msg.sender);\\n }\\n\\n /// @notice Sets the market.\\n /// @param market_ The new market.\\n function setMarket(Market market_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(market_) == address(0)) revert ZeroAddress();\\n market = market_;\\n\\n if (rewards[IERC20(address(market_))].finishAt == 0) enableReward(IERC20(address(market_)));\\n\\n emit MarketSet(market_, msg.sender);\\n }\\n\\n /// @notice Sets the provider address.\\n /// @param provider_ The new provider address.\\n function setProvider(address provider_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n provider = provider_;\\n emit ProviderSet(provider_, msg.sender);\\n }\\n\\n /// @notice Sets the provider ratio.\\n /// @param providerRatio_ The new provider ratio.\\n function setProviderRatio(uint256 providerRatio_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (providerRatio_ > 1e18) revert InvalidRatio();\\n providerRatio = providerRatio_;\\n emit ProviderRatioSet(providerRatio_, msg.sender);\\n }\\n\\n /// @notice Sets the savings address.\\n /// @param savings_ The new savings address.\\n function setSavings(address savings_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (savings_ == address(0)) revert ZeroAddress();\\n savings = savings_;\\n emit SavingsSet(savings_, msg.sender);\\n }\\n\\n /// @notice Sets the minimum time to stake for rewards.\\n /// @param minTime_ The new minimum time.\\n function setMinTime(uint256 minTime_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n minTime = minTime_;\\n emit MinTimeSet(minTime_, msg.sender);\\n }\\n\\n /// @notice Sets the penalty growth factor.\\n /// @param penaltyGrowth_ The new penalty growth factor.\\n function setPenaltyGrowth(uint256 penaltyGrowth_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (penaltyGrowth_ < 0.1e18 || penaltyGrowth_ > 100e18) revert InvalidRange();\\n penaltyGrowth = penaltyGrowth_;\\n emit PenaltyGrowthSet(penaltyGrowth_, msg.sender);\\n }\\n\\n /// @notice Sets the penalty threshold.\\n /// @param penaltyThreshold_ The new penalty threshold.\\n function setPenaltyThreshold(uint256 penaltyThreshold_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (penaltyThreshold_ > 1e18) revert InvalidRange();\\n penaltyThreshold = penaltyThreshold_;\\n emit PenaltyThresholdSet(penaltyThreshold_, msg.sender);\\n }\\n\\n /// @notice Sets the pause state to true in case of emergency, triggered by an authorized account.\\n function pause() external onlyPausingRoles {\\n _pause();\\n }\\n\\n /// @notice Sets the pause state to false when threat is gone, triggered by an authorized account.\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @notice Returns the total assets of the contract.\\n /// @return The total assets.\\n function totalAssets() public view override returns (uint256) {\\n return totalSupply();\\n }\\n\\n /// @notice Returns the number of decimals used by the token.\\n /// @return The number of decimals.\\n function decimals() public view override(ERC4626Upgradeable, ERC20Upgradeable) returns (uint8) {\\n return ERC4626Upgradeable.decimals();\\n }\\n\\n /// @notice Returns the current timepoint of stEXA, as per ERC-6372.\\n function clock() public view override returns (uint48) {\\n return uint48(block.timestamp);\\n }\\n\\n /// @notice Returns the current clock mode of stEXA, as per ERC-6372.\\n // solhint-disable-next-line func-name-mixedcase\\n function CLOCK_MODE() public pure override returns (string memory) {\\n return \\\"mode=timestamp\\\";\\n }\\n\\n event DistributionFinished(IERC20 indexed reward, address indexed account);\\n event MarketSet(Market indexed market, address indexed account);\\n event MinTimeSet(uint256 minTime, address indexed account);\\n event PenaltyGrowthSet(uint256 penaltyGrowth, address indexed account);\\n event PenaltyThresholdSet(uint256 penaltyThreshold, address indexed account);\\n event ProviderRatioSet(uint256 providerRatio, address indexed account);\\n event ProviderSet(address indexed provider, address indexed account);\\n event RefTimeSet(uint256 refTime, address indexed account);\\n event RewardAmountNotified(IERC20 indexed reward, address indexed notifier, uint256 amount);\\n event RewardListed(IERC20 indexed reward, address indexed account);\\n event RewardPaid(IERC20 indexed reward, address indexed account, uint256 amount);\\n event RewardsDurationSet(IERC20 indexed reward, address indexed account, uint256 duration);\\n event RewardsWithdrawn(address indexed account, address indexed receiver, IERC20 indexed reward, uint256 amount);\\n event SavingsSet(address indexed savings, address indexed account);\\n}\\n\\nerror AlreadyEnabled();\\nerror InsufficientBalance();\\nerror InvalidRange();\\nerror InvalidRatio();\\nerror MaxRewardsTokensExceeded();\\nerror NotAllowed();\\nerror NotFinished();\\nerror NotPausingRole();\\nerror RewardNotListed();\\nerror Untransferable();\\nerror ZeroAddress();\\nerror ZeroRate();\\nerror ZeroAmount();\\n\\nstruct Parameters {\\n IERC20 asset;\\n uint256 minTime;\\n uint256 refTime;\\n uint256 excessFactor;\\n uint256 penaltyGrowth;\\n uint256 penaltyThreshold;\\n Market market;\\n address provider;\\n address savings;\\n uint40 duration;\\n uint256 providerRatio;\\n}\\n\\nstruct RewardData {\\n uint40 duration;\\n uint40 finishAt;\\n uint40 updatedAt;\\n uint256 index;\\n /// @notice rate in assets per second with 18 extra decimals\\n uint256 rate;\\n}\\n\\nstruct Permit {\\n uint256 value;\\n uint256 deadline;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n}\\n\",\"keccak256\":\"0x76e7814d6f2dba715c1fae971a81391c37c1ba0855ba341898342f2ebfb7525b\",\"license\":\"MIT\"},\"contracts/periphery/StakingPreviewer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { IERC20, Parameters, StakedEXA } from \\\"../StakedEXA.sol\\\";\\n\\n/// @title StakingPreviewer\\n/// @notice Contract to be consumed as a helper for `StakedEXA`\\ncontract StakingPreviewer {\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n StakedEXA public immutable stEXA;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(StakedEXA stEXA_) {\\n stEXA = stEXA_;\\n }\\n\\n /// @notice Returns the staking model parameters and account details for a given account.\\n function staking(address account) external view returns (StakingAccount memory) {\\n uint256 start = stEXA.avgStart(account);\\n return\\n StakingAccount({\\n parameters: parameters(),\\n totalAssets: stEXA.totalAssets(),\\n balance: stEXA.balanceOf(account),\\n start: start,\\n time: start != 0 ? block.timestamp * 1e18 - start : 0,\\n rewards: allRewards(account)\\n });\\n }\\n\\n function allRewards(address account) public view returns (RewardAccount[] memory rewards) {\\n IERC20[] memory rewardTokens = stEXA.allRewardsTokens();\\n rewards = new RewardAccount[](rewardTokens.length);\\n for (uint256 i = 0; i < rewardTokens.length; ++i) {\\n IERC20 reward = rewardTokens[i];\\n (, uint40 finishAt, , , uint256 rate) = stEXA.rewards(reward);\\n rewards[i] = RewardAccount({\\n reward: reward,\\n symbol: ERC20(address(reward)).symbol(),\\n rate: rate,\\n finishAt: finishAt,\\n claimable: claimable(reward, account),\\n claimed: stEXA.claimed(account, reward),\\n earned: earned(reward, account)\\n });\\n }\\n }\\n\\n /// @notice Returns the rewards and amounts that an account can currently claim.\\n /// @param account The address of the user for whom to calculate the claimable rewards.\\n /// @return claimableRewards An array of `RewardAmount`, with the reward token and the amount.\\n function allClaimable(address account) public view returns (RewardAmount[] memory claimableRewards) {\\n IERC20[] memory rewards = stEXA.allRewardsTokens();\\n claimableRewards = new RewardAmount[](rewards.length);\\n for (uint256 i = 0; i < rewards.length; ++i) {\\n claimableRewards[i] = RewardAmount({ reward: rewards[i], amount: claimable(rewards[i], account) });\\n }\\n }\\n\\n /// @notice Calculates the amount of rewards that an account can claim.\\n /// @param reward The reward token for which to calculate the claimable rewards.\\n /// @param account The address of the user for whom to calculate the claimable rewards.\\n /// @return The total amount of claimable rewards for the specified user.\\n function claimable(IERC20 reward, address account) public view returns (uint256) {\\n return stEXA.claimable(reward, account, stEXA.balanceOf(account));\\n }\\n\\n /// @notice Returns the rewards and amounts that an account can currently claim for the given shares.\\n /// @param account The address of the user for whom to calculate the claimable rewards.\\n /// @param shares The number of shares for which to calculate the claimable rewards.\\n /// @return claimableRewards An array of `RewardAmount`, with the reward token and the amount.\\n function allClaimable(address account, uint256 shares) public view returns (RewardAmount[] memory claimableRewards) {\\n IERC20[] memory rewards = stEXA.allRewardsTokens();\\n claimableRewards = new RewardAmount[](rewards.length);\\n for (uint256 i = 0; i < rewards.length; ++i) {\\n claimableRewards[i] = RewardAmount({ reward: rewards[i], amount: stEXA.claimable(rewards[i], account, shares) });\\n }\\n }\\n\\n /// @notice Returns the rewards and amounts that an account has generated.\\n /// @param account The address of the user for whom to calculate the earned rewards.\\n /// @return earnedRewards An array of `RewardAmount`, with the reward token and the amount.\\n function allEarned(address account) public view returns (RewardAmount[] memory earnedRewards) {\\n IERC20[] memory rewards = stEXA.allRewardsTokens();\\n earnedRewards = new RewardAmount[](rewards.length);\\n for (uint256 i = 0; i < rewards.length; ++i) {\\n earnedRewards[i] = RewardAmount({ reward: rewards[i], amount: earned(rewards[i], account) });\\n }\\n }\\n\\n /// @notice Calculates the amount of rewards that an account has earned.\\n /// @param account The address of the user for whom to calculate the rewards.\\n /// @return The total amount of earned rewards for the specified user.\\n /// @dev Computes earned rewards by taking the product of the account's balance and the difference between the\\n /// global reward per token and the reward per token already paid to the user.\\n /// This result is then added to any rewards that have already been accumulated but not yet paid out.\\n function earned(IERC20 reward, address account) public view returns (uint256) {\\n return stEXA.earned(reward, account, stEXA.balanceOf(account));\\n }\\n\\n /// @notice Returns the rewards and amounts that an account has already claimed.\\n /// @param account The address of the user for whom to calculate the claimed rewards.\\n /// @return claimedRewards An array of `RewardAmount`, with the reward token and the amount.\\n function allClaimed(address account) public view returns (RewardAmount[] memory claimedRewards) {\\n IERC20[] memory rewards = stEXA.allRewardsTokens();\\n claimedRewards = new RewardAmount[](rewards.length);\\n for (uint256 i = 0; i < rewards.length; ++i) {\\n claimedRewards[i] = RewardAmount({ reward: rewards[i], amount: stEXA.claimed(account, rewards[i]) });\\n }\\n }\\n\\n /// @notice Returns the staking model parameters.\\n function parameters() public view returns (Parameters memory) {\\n (uint40 duration, , , , ) = stEXA.rewards(IERC20(address(stEXA.market())));\\n return\\n Parameters({\\n asset: IERC20(stEXA.asset()),\\n minTime: stEXA.minTime(),\\n refTime: stEXA.refTime(),\\n excessFactor: stEXA.excessFactor(),\\n penaltyGrowth: stEXA.penaltyGrowth(),\\n penaltyThreshold: stEXA.penaltyThreshold(),\\n market: stEXA.market(),\\n provider: stEXA.provider(),\\n savings: stEXA.savings(),\\n duration: duration,\\n providerRatio: stEXA.providerRatio()\\n });\\n }\\n}\\n\\nstruct StakingAccount {\\n // staking\\n Parameters parameters;\\n uint256 totalAssets;\\n // account\\n RewardAccount[] rewards;\\n uint256 balance;\\n uint256 start;\\n uint256 time;\\n}\\n\\nstruct RewardAccount {\\n IERC20 reward;\\n string symbol;\\n uint256 rate;\\n uint256 finishAt;\\n uint256 claimable;\\n uint256 claimed;\\n uint256 earned;\\n}\\n\\nstruct RewardAmount {\\n IERC20 reward;\\n uint256 amount;\\n}\\n\",\"keccak256\":\"0x3f1960b8ab7dba717271cb105010a063684cf42a3275bd006aa78c350e57e30d\",\"license\":\"MIT\"},\"contracts/utils/FixedLib.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts-v4/utils/math/Math.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\nlibrary FixedLib {\\n using FixedPointMathLib for uint256;\\n\\n uint256 internal constant INTERVAL = 4 weeks;\\n\\n /// @notice Gets the amount of revenue sharing between the backup supplier and the new fixed pool supplier.\\n /// @param pool fixed rate pool.\\n /// @param amount amount being provided by the fixed pool supplier.\\n /// @param backupFeeRate rate charged to the fixed pool supplier to be accrued by the backup supplier.\\n /// @return yield amount to be offered to the fixed pool supplier.\\n /// @return backupFee yield to be accrued by the backup supplier for initially providing the liquidity.\\n function calculateDeposit(\\n Pool memory pool,\\n uint256 amount,\\n uint256 backupFeeRate\\n ) internal pure returns (uint256 yield, uint256 backupFee) {\\n uint256 memBackupSupplied = backupSupplied(pool);\\n if (memBackupSupplied != 0) {\\n yield = pool.unassignedEarnings.mulDivDown(Math.min(amount, memBackupSupplied), memBackupSupplied);\\n backupFee = yield.mulWadDown(backupFeeRate);\\n yield -= backupFee;\\n }\\n }\\n\\n /// @notice Registers an operation to add supply to a fixed rate pool and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be added to the supply.\\n /// @param amount amount to be added to the supply.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function deposit(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.supplied = supplied + amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to reduce borrowed amount from a fixed rate pool\\n /// and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be repaid.\\n /// @param amount amount to be added to the fixed rate pool.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function repay(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.borrowed = borrowed - amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to increase borrowed amount of a fixed rate pool\\n /// and potentially increase backup debt.\\n /// @param pool fixed rate pool where an amount will be borrowed.\\n /// @param amount amount to be borrowed from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function borrow(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 newBorrowed = borrowed + amount;\\n\\n backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, pool.supplied), newBorrowed);\\n pool.borrowed = newBorrowed;\\n }\\n\\n /// @notice Registers an operation to reduce supply from a fixed rate pool and potentially increase backup debt.\\n /// @param pool fixed rate pool where amount will be withdrawn.\\n /// @param amountToDiscount amount to be withdrawn from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function withdraw(Pool storage pool, uint256 amountToDiscount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n uint256 newSupply = supplied - amountToDiscount;\\n\\n backupDebtAddition = Math.min(supplied, borrowed) - Math.min(newSupply, borrowed);\\n pool.supplied = newSupply;\\n }\\n\\n /// @notice Accrues backup earnings from `unassignedEarnings` based on the `lastAccrual` time.\\n /// @param pool fixed rate pool where earnings will be accrued.\\n /// @param maturity maturity date of the pool.\\n /// @return backupEarnings amount of earnings to be distributed to the backup supplier.\\n function accrueEarnings(Pool storage pool, uint256 maturity) internal returns (uint256 backupEarnings) {\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (block.timestamp < maturity) {\\n uint256 unassignedEarnings = pool.unassignedEarnings;\\n pool.lastAccrual = block.timestamp;\\n backupEarnings = unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual);\\n pool.unassignedEarnings = unassignedEarnings - backupEarnings;\\n } else if (lastAccrual == maturity) {\\n backupEarnings = 0;\\n } else {\\n pool.lastAccrual = maturity;\\n backupEarnings = pool.unassignedEarnings;\\n pool.unassignedEarnings = 0;\\n }\\n }\\n\\n /// @notice Calculates the amount that a fixed rate pool borrowed from the backup supplier.\\n /// @param pool fixed rate pool.\\n /// @return amount borrowed from the fixed rate pool.\\n function backupSupplied(Pool memory pool) internal pure returns (uint256) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n return borrowed - Math.min(borrowed, supplied);\\n }\\n\\n /// @notice Modify positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it. Needs for the amount to be less than the principal and the fee\\n /// @param position original position to be scaled.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return scaled position.\\n function scaleProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 principal = amount.mulDivDown(position.principal, position.principal + position.fee);\\n position.principal = principal;\\n position.fee = amount - principal;\\n return position;\\n }\\n\\n /// @notice Reduce positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it.\\n /// @param position original position to be reduced.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return reduced position.\\n function reduceProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 positionAssets = position.principal + position.fee;\\n uint256 newPositionAssets = positionAssets - amount;\\n position.principal = newPositionAssets.mulDivDown(position.principal, positionAssets);\\n position.fee = newPositionAssets - position.principal;\\n return position;\\n }\\n\\n /// @notice Calculates what proportion of earnings would `borrowAmount` represent considering `backupSupplied`.\\n /// @param earnings amount to be distributed.\\n /// @param borrowAmount amount that will be checked if came from the backup supplier or fixed rate pool.\\n /// @return unassignedEarnings earnings to be added to `unassignedEarnings`.\\n /// @return backupEarnings earnings to be distributed to the backup supplier.\\n function distributeEarnings(\\n Pool memory pool,\\n uint256 earnings,\\n uint256 borrowAmount\\n ) internal pure returns (uint256 unassignedEarnings, uint256 backupEarnings) {\\n backupEarnings = borrowAmount == 0\\n ? 0\\n : earnings.mulDivDown(borrowAmount - Math.min(backupSupplied(pool), borrowAmount), borrowAmount);\\n unassignedEarnings = earnings - backupEarnings;\\n }\\n\\n /// @notice Adds a maturity date to the borrow or supply positions of the account.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity the new maturity where the account will borrow or supply to.\\n /// @return updated encoded maturity dates.\\n function setMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n // initialize the maturity with also the 1st bit on the 33th position set\\n if (encoded == 0) return maturity | (1 << 32);\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n if (maturity < baseMaturity) {\\n // if the new maturity is lower than the base, set it as the new base\\n // wipe clean the last 32 bits, shift the amount of `INTERVAL` and set the new value with the 33rd bit set\\n uint256 range = (baseMaturity - maturity) / INTERVAL;\\n if (encoded >> (256 - range) != 0) revert MaturityOverflow();\\n encoded = ((encoded >> 32) << (32 + range));\\n return maturity | encoded | (1 << 32);\\n } else {\\n uint256 range = (maturity - baseMaturity) / INTERVAL;\\n if (range > 223) revert MaturityOverflow();\\n return encoded | (1 << (32 + range));\\n }\\n }\\n\\n /// @notice Remove maturity from account's borrow or supplied positions.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity maturity date to be removed.\\n /// @return updated encoded maturity dates.\\n function clearMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n if (encoded == 0 || encoded == maturity | (1 << 32)) return 0;\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n // if the baseMaturity is the one being cleaned\\n if (maturity == baseMaturity) {\\n // wipe 32 bytes + 1 for the old base flag\\n uint256 packed = encoded >> 33;\\n uint256 range = 1;\\n while ((packed & 1) == 0 && packed != 0) {\\n unchecked {\\n ++range;\\n }\\n packed >>= 1;\\n }\\n encoded = ((encoded >> (32 + range)) << 32);\\n return (maturity + (range * INTERVAL)) | encoded;\\n } else {\\n // otherwise just clear the bit\\n return encoded & ~(1 << (32 + ((maturity - baseMaturity) / INTERVAL)));\\n }\\n }\\n\\n /// @notice Verifies that a maturity is `VALID`, `MATURED`, `NOT_READY` or `INVALID`.\\n /// @dev if expected state doesn't match the calculated one, it reverts with a custom error `UnmatchedPoolState`.\\n /// @param maturity timestamp of the maturity date to be verified.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param requiredState state required by the caller to be verified (see `State` for description).\\n /// @param alternativeState state required by the caller to be verified (see `State` for description).\\n function checkPoolState(uint256 maturity, uint8 maxPools, State requiredState, State alternativeState) internal view {\\n State state;\\n if (maturity % INTERVAL != 0) {\\n state = State.INVALID;\\n } else if (maturity <= block.timestamp) {\\n state = State.MATURED;\\n } else if (maturity > block.timestamp - (block.timestamp % INTERVAL) + (INTERVAL * maxPools)) {\\n state = State.NOT_READY;\\n } else {\\n state = State.VALID;\\n }\\n\\n if (state != requiredState && state != alternativeState) {\\n if (alternativeState == State.NONE) revert UnmatchedPoolState(uint8(state), uint8(requiredState));\\n\\n revert UnmatchedPoolStates(uint8(state), uint8(requiredState), uint8(alternativeState));\\n }\\n }\\n\\n /// @notice Stores the accountability of a fixed interest rate pool.\\n /// @param borrowed total amount borrowed from the pool.\\n /// @param supplied total amount supplied to the pool.\\n /// @param unassignedEarnings total amount of earnings not yet distributed and accrued.\\n /// @param lastAccrual timestamp for the last time that some earnings have been distributed to the backup supplier.\\n struct Pool {\\n uint256 borrowed;\\n uint256 supplied;\\n uint256 unassignedEarnings;\\n uint256 lastAccrual;\\n }\\n\\n /// @notice Stores principal and fee of a borrow or a supply position of a account in a fixed rate pool.\\n /// @param principal amount borrowed or supplied to the fixed rate pool.\\n /// @param fee amount of fees to be repaid or earned at the maturity of the fixed rate pool.\\n struct Position {\\n uint256 principal;\\n uint256 fee;\\n }\\n\\n enum State {\\n NONE,\\n INVALID,\\n MATURED,\\n VALID,\\n NOT_READY\\n }\\n}\\n\\nerror MaturityOverflow();\\nerror UnmatchedPoolState(uint8 state, uint8 requiredState);\\nerror UnmatchedPoolStates(uint8 state, uint8 requiredState, uint8 alternativeState);\\n\",\"keccak256\":\"0x9eb04f02cac9a0c2fd049587524799c8ab4fa1840d9550bad02d87d81074187c\",\"license\":\"BUSL-1.1\"},\"contracts/utils/IPriceFeed.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\ninterface IPriceFeed {\\n function decimals() external view returns (uint8);\\n\\n function latestAnswer() external view returns (int256);\\n}\\n\",\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\"},\"solmate/src/mixins/ERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\nimport {SafeTransferLib} from \\\"../utils/SafeTransferLib.sol\\\";\\nimport {FixedPointMathLib} from \\\"../utils/FixedPointMathLib.sol\\\";\\n\\n/// @notice Minimal ERC4626 tokenized Vault implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)\\nabstract contract ERC4626 is ERC20 {\\n using SafeTransferLib for ERC20;\\n using FixedPointMathLib for uint256;\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /*//////////////////////////////////////////////////////////////\\n IMMUTABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n ERC20 public immutable asset;\\n\\n constructor(\\n ERC20 _asset,\\n string memory _name,\\n string memory _symbol\\n ) ERC20(_name, _symbol, _asset.decimals()) {\\n asset = _asset;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {\\n // Check for rounding error since we round down in previewDeposit.\\n require((shares = previewDeposit(assets)) != 0, \\\"ZERO_SHARES\\\");\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {\\n assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up.\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 shares) {\\n shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up.\\n\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 assets) {\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n // Check for rounding error since we round down in previewRedeem.\\n require((assets = previewRedeem(shares)) != 0, \\\"ZERO_ASSETS\\\");\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ACCOUNTING LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function totalAssets() public view virtual returns (uint256);\\n\\n function convertToShares(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets());\\n }\\n\\n function convertToAssets(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply);\\n }\\n\\n function previewDeposit(uint256 assets) public view virtual returns (uint256) {\\n return convertToShares(assets);\\n }\\n\\n function previewMint(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply);\\n }\\n\\n function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\\n }\\n\\n function previewRedeem(uint256 shares) public view virtual returns (uint256) {\\n return convertToAssets(shares);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LIMIT LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function maxDeposit(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxMint(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxWithdraw(address owner) public view virtual returns (uint256) {\\n return convertToAssets(balanceOf[owner]);\\n }\\n\\n function maxRedeem(address owner) public view virtual returns (uint256) {\\n return balanceOf[owner];\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL HOOKS LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {}\\n\\n function afterDeposit(uint256 assets, uint256 shares) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\"},\"solmate/src/tokens/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\\nabstract contract ERC20 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n uint8 public immutable decimals;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) public balanceOf;\\n\\n mapping(address => mapping(address => uint256)) public allowance;\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal immutable INITIAL_CHAIN_ID;\\n\\n bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\\n\\n mapping(address => uint256) public nonces;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint8 _decimals\\n ) {\\n name = _name;\\n symbol = _symbol;\\n decimals = _decimals;\\n\\n INITIAL_CHAIN_ID = block.chainid;\\n INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 amount) public virtual returns (bool) {\\n allowance[msg.sender][spender] = amount;\\n\\n emit Approval(msg.sender, spender, amount);\\n\\n return true;\\n }\\n\\n function transfer(address to, uint256 amount) public virtual returns (bool) {\\n balanceOf[msg.sender] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(msg.sender, to, amount);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual returns (bool) {\\n uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\\n\\n balanceOf[from] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n return true;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 LOGIC\\n //////////////////////////////////////////////////////////////*/\\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 ) public virtual {\\n require(deadline >= block.timestamp, \\\"PERMIT_DEADLINE_EXPIRED\\\");\\n\\n // Unchecked because the only math done is incrementing\\n // the owner's nonce which cannot realistically overflow.\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\n \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n ),\\n owner,\\n spender,\\n value,\\n nonces[owner]++,\\n deadline\\n )\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"INVALID_SIGNER\\\");\\n\\n allowance[recoveredAddress][spender] = value;\\n }\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\\n return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\\n }\\n\\n function computeDomainSeparator() internal view virtual returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 amount) internal virtual {\\n totalSupply += amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(address(0), to, amount);\\n }\\n\\n function _burn(address from, uint256 amount) internal virtual {\\n balanceOf[from] -= amount;\\n\\n // Cannot underflow because a user's balance\\n // will never be larger than the total supply.\\n unchecked {\\n totalSupply -= amount;\\n }\\n\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\"},\"solmate/src/utils/FixedPointMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Arithmetic library with operations for fixed-point numbers.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)\\nlibrary FixedPointMathLib {\\n /*//////////////////////////////////////////////////////////////\\n SIMPLIFIED FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.\\n\\n function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.\\n }\\n\\n function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.\\n }\\n\\n function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.\\n }\\n\\n function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.\\n }\\n\\n function powWad(int256 x, int256 y) internal pure returns (int256) {\\n // Equivalent to x to the power of y because x ** y = (e ** ln(x)) ** y = e ** (ln(x) * y)\\n return expWad((lnWad(x) * y) / int256(WAD)); // Using ln(x) means x must be greater than 0.\\n }\\n\\n function expWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n // When the result is < 0.5 we return zero. This happens when\\n // x <= floor(log(0.5e18) * 1e18) ~ -42e18\\n if (x <= -42139678854452767551) return 0;\\n\\n // When the result is > (2**255 - 1) / 1e18 we can not represent it as an\\n // int. This happens when x >= floor(log((2**255 - 1) / 1e18) * 1e18) ~ 135.\\n if (x >= 135305999368893231589) revert(\\\"EXP_OVERFLOW\\\");\\n\\n // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96\\n // for more intermediate precision and a binary basis. This base conversion\\n // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.\\n x = (x << 78) / 5**18;\\n\\n // Reduce range of x to (-\\u00bd ln 2, \\u00bd ln 2) * 2**96 by factoring out powers\\n // of two such that exp(x) = exp(x') * 2**k, where k is an integer.\\n // Solving this gives k = round(x / log(2)) and x' = x - k * log(2).\\n int256 k = ((x << 96) / 54916777467707473351141471128 + 2**95) >> 96;\\n x = x - k * 54916777467707473351141471128;\\n\\n // k is in the range [-61, 195].\\n\\n // Evaluate using a (6, 7)-term rational approximation.\\n // p is made monic, we'll multiply by a scale factor later.\\n int256 y = x + 1346386616545796478920950773328;\\n y = ((y * x) >> 96) + 57155421227552351082224309758442;\\n int256 p = y + x - 94201549194550492254356042504812;\\n p = ((p * y) >> 96) + 28719021644029726153956944680412240;\\n p = p * x + (4385272521454847904659076985693276 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n int256 q = x - 2855989394907223263936484059900;\\n q = ((q * x) >> 96) + 50020603652535783019961831881945;\\n q = ((q * x) >> 96) - 533845033583426703283633433725380;\\n q = ((q * x) >> 96) + 3604857256930695427073651918091429;\\n q = ((q * x) >> 96) - 14423608567350463180887372962807573;\\n q = ((q * x) >> 96) + 26449188498355588339934803723976023;\\n\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial won't have zeros in the domain as all its roots are complex.\\n // No scaling is necessary because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r should be in the range (0.09, 0.25) * 2**96.\\n\\n // We now need to multiply r by:\\n // * the scale factor s = ~6.031367120.\\n // * the 2**k factor from the range reduction.\\n // * the 1e18 / 2**96 factor for base conversion.\\n // We do this all at once, with an intermediate result in 2**213\\n // basis, so the final right shift is always by a positive amount.\\n r = int256((uint256(r) * 3822833074963236453042738258902158003155416615667) >> uint256(195 - k));\\n }\\n }\\n\\n function lnWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n // We want to convert x from 10**18 fixed point to 2**96 fixed point.\\n // We do this by multiplying by 2**96 / 10**18. But since\\n // ln(x * C) = ln(x) + ln(C), we can simply do nothing here\\n // and add ln(2**96 / 10**18) at the end.\\n\\n // Reduce range of x to (1, 2) * 2**96\\n // ln(2^k * x) = k * ln(2) + ln(x)\\n int256 k = int256(log2(uint256(x))) - 96;\\n x <<= uint256(159 - k);\\n x = int256(uint256(x) >> 159);\\n\\n // Evaluate using a (8, 8)-term rational approximation.\\n // p is made monic, we will multiply by a scale factor later.\\n int256 p = x + 3273285459638523848632254066296;\\n p = ((p * x) >> 96) + 24828157081833163892658089445524;\\n p = ((p * x) >> 96) + 43456485725739037958740375743393;\\n p = ((p * x) >> 96) - 11111509109440967052023855526967;\\n p = ((p * x) >> 96) - 45023709667254063763336534515857;\\n p = ((p * x) >> 96) - 14706773417378608786704636184526;\\n p = p * x - (795164235651350426258249787498 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n // q is monic by convention.\\n int256 q = x + 5573035233440673466300451813936;\\n q = ((q * x) >> 96) + 71694874799317883764090561454958;\\n q = ((q * x) >> 96) + 283447036172924575727196451306956;\\n q = ((q * x) >> 96) + 401686690394027663651624208769553;\\n q = ((q * x) >> 96) + 204048457590392012362485061816622;\\n q = ((q * x) >> 96) + 31853899698501571402653359427138;\\n q = ((q * x) >> 96) + 909429971244387300277376558375;\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial is known not to have zeros in the domain.\\n // No scaling required because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r is in the range (0, 0.125) * 2**96\\n\\n // Finalization, we need to:\\n // * multiply by the scale factor s = 5.549\\u2026\\n // * add ln(2**96 / 10**18)\\n // * add k * ln(2)\\n // * multiply by 10**18 / 2**96 = 5**18 >> 78\\n\\n // mul s * 5e18 * 2**96, base is now 5**18 * 2**192\\n r *= 1677202110996718588342820967067443963516166;\\n // add ln(2) * k * 5e18 * 2**192\\n r += 16597577552685614221487285958193947469193820559219878177908093499208371 * k;\\n // add ln(2**96 / 10**18) * 5e18 * 2**192\\n r += 600920179829731861736702779321621459595472258049074101567377883020018308;\\n // base conversion: mul 2**18 / 2**192\\n r >>= 174;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n LOW LEVEL FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function mulDivDown(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // Divide z by the denominator.\\n z := div(z, denominator)\\n }\\n }\\n\\n function mulDivUp(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // First, divide z - 1 by the denominator and add 1.\\n // We allow z - 1 to underflow if z is 0, because we multiply the\\n // end result by 0 if z is zero, ensuring we return 0 if z is zero.\\n z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1))\\n }\\n }\\n\\n function rpow(\\n uint256 x,\\n uint256 n,\\n uint256 scalar\\n ) internal pure returns (uint256 z) {\\n assembly {\\n switch x\\n case 0 {\\n switch n\\n case 0 {\\n // 0 ** 0 = 1\\n z := scalar\\n }\\n default {\\n // 0 ** n = 0\\n z := 0\\n }\\n }\\n default {\\n switch mod(n, 2)\\n case 0 {\\n // If n is even, store scalar in z for now.\\n z := scalar\\n }\\n default {\\n // If n is odd, store x in z for now.\\n z := x\\n }\\n\\n // Shifting right by 1 is like dividing by 2.\\n let half := shr(1, scalar)\\n\\n for {\\n // Shift n right by 1 before looping to halve it.\\n n := shr(1, n)\\n } n {\\n // Shift n right by 1 each iteration to halve it.\\n n := shr(1, n)\\n } {\\n // Revert immediately if x ** 2 would overflow.\\n // Equivalent to iszero(eq(div(xx, x), x)) here.\\n if shr(128, x) {\\n revert(0, 0)\\n }\\n\\n // Store x squared.\\n let xx := mul(x, x)\\n\\n // Round to the nearest number.\\n let xxRound := add(xx, half)\\n\\n // Revert if xx + half overflowed.\\n if lt(xxRound, xx) {\\n revert(0, 0)\\n }\\n\\n // Set x to scaled xxRound.\\n x := div(xxRound, scalar)\\n\\n // If n is even:\\n if mod(n, 2) {\\n // Compute z * x.\\n let zx := mul(z, x)\\n\\n // If z * x overflowed:\\n if iszero(eq(div(zx, x), z)) {\\n // Revert if x is non-zero.\\n if iszero(iszero(x)) {\\n revert(0, 0)\\n }\\n }\\n\\n // Round to the nearest number.\\n let zxRound := add(zx, half)\\n\\n // Revert if zx + half overflowed.\\n if lt(zxRound, zx) {\\n revert(0, 0)\\n }\\n\\n // Return properly scaled zxRound.\\n z := div(zxRound, scalar)\\n }\\n }\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n GENERAL NUMBER UTILITIES\\n //////////////////////////////////////////////////////////////*/\\n\\n function sqrt(uint256 x) internal pure returns (uint256 z) {\\n assembly {\\n let y := x // We start y at x, which will help us make our initial estimate.\\n\\n z := 181 // The \\\"correct\\\" value is 1, but this saves a multiplication later.\\n\\n // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad\\n // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.\\n\\n // We check y >= 2^(k + 8) but shift right by k bits\\n // each branch to ensure that if x >= 256, then y >= 256.\\n if iszero(lt(y, 0x10000000000000000000000000000000000)) {\\n y := shr(128, y)\\n z := shl(64, z)\\n }\\n if iszero(lt(y, 0x1000000000000000000)) {\\n y := shr(64, y)\\n z := shl(32, z)\\n }\\n if iszero(lt(y, 0x10000000000)) {\\n y := shr(32, y)\\n z := shl(16, z)\\n }\\n if iszero(lt(y, 0x1000000)) {\\n y := shr(16, y)\\n z := shl(8, z)\\n }\\n\\n // Goal was to get z*z*y within a small factor of x. More iterations could\\n // get y in a tighter range. Currently, we will have y in [256, 256*2^16).\\n // We ensured y >= 256 so that the relative difference between y and y+1 is small.\\n // That's not possible if x < 256 but we can just verify those cases exhaustively.\\n\\n // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.\\n // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.\\n // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.\\n\\n // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range\\n // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.\\n\\n // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate\\n // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.\\n\\n // There is no overflow risk here since y < 2^136 after the first branch above.\\n z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.\\n\\n // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n\\n // If x+1 is a perfect square, the Babylonian method cycles between\\n // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.\\n // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\\n // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.\\n // If you don't care whether the floor or ceil square root is returned, you can remove this statement.\\n z := sub(z, lt(div(x, z), z))\\n }\\n }\\n\\n function log2(uint256 x) internal pure returns (uint256 r) {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n assembly {\\n r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))\\n r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))\\n r := or(r, shl(5, lt(0xffffffff, shr(r, x))))\\n r := or(r, shl(4, lt(0xffff, shr(r, x))))\\n r := or(r, shl(3, lt(0xff, shr(r, x))))\\n r := or(r, shl(2, lt(0xf, shr(r, x))))\\n r := or(r, shl(1, lt(0x3, shr(r, x))))\\n r := or(r, lt(0x1, shr(r, x)))\\n }\\n }\\n\\n function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := mod(x, y)\\n }\\n }\\n\\n function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := div(x, y)\\n }\\n }\\n\\n /// @dev Will return 0 instead of reverting if y is zero.\\n function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // Add 1 to x * y if x % y > 0.\\n z := add(gt(mod(x, y), 0), div(x, y))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\"},\"solmate/src/utils/SafeTransferLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\n\\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)\\n/// @dev Caution! This library won't check that a token has code, responsibility is delegated to the caller.\\nlibrary SafeTransferLib {\\n /*//////////////////////////////////////////////////////////////\\n ETH OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n bool success;\\n\\n assembly {\\n // Transfer the ETH and store if it succeeded or not.\\n success := call(gas(), to, amount, 0, 0, 0, 0)\\n }\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferFrom(\\n ERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\\n mstore(4, and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \\\"from\\\" argument.\\n mstore(36, and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \\\"to\\\" argument.\\n mstore(68, amount) // Append the \\\"amount\\\" argument. Masking not required as it's a full 32 byte type.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 100 because that's the total length of our calldata (4 + 32 * 3)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 100, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\\n mstore(4, and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument. Masking not required as it's a full 32 byte type.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x095ea7b300000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"APPROVE_FAILED\\\");\\n }\\n}\\n\",\"keccak256\":\"0xbb4580ec2c735b5f31bb176567c886a87c2800b3eff132eda15ddc2b28cc2932\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a0604052348015600e575f80fd5b50604051611eaf380380611eaf833981016040819052602b91603b565b6001600160a01b03166080526066565b5f60208284031215604a575f80fd5b81516001600160a01b0381168114605f575f80fd5b9392505050565b608051611d7b6101345f395f818161015601528181610204015281816103160152818161048e015281816105ff015281816107220152818161082e0152818161095101528181610ab201528181610ae101528181610bf101528181610c7f01528181610d0401528181610d8901528181610e0e01528181610e9301528181610f1801528181610fa601528181611034015281816110cf015281816111760152818161127b01528181611302015281816113b501528181611461015281816115a001526117250152611d7b5ff3fe608060405234801561000f575f80fd5b50600436106100b9575f3560e01c80638903573011610072578063d4570c1c11610058578063d4570c1c14610190578063d764b78f146101a3578063ef575466146101c3575f80fd5b8063890357301461013c578063c07f33b614610151575f80fd5b8063528d4f5b116100a2578063528d4f5b1461010357806373b5d94a1461011657806384b768bf14610129575f80fd5b8063211dc32d146100bd57806352146cdb146100e3575b5f80fd5b6100d06100cb3660046117e2565b6101e3565b6040519081526020015b60405180910390f35b6100f66100f1366004611819565b610311565b6040516100da919061183b565b6100f6610111366004611819565b610489565b6100f6610124366004611892565b6105fa565b6100f6610137366004611819565b610829565b610144610a32565b6040516100da9190611975565b6101787f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100da565b6100d061019e3660046117e2565b611155565b6101b66101b1366004611819565b6111b3565b6040516100da9190611a50565b6101d66101d1366004611819565b61145c565b6040516100da9190611ab7565b6040516370a0823160e01b81526001600160a01b0382811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906314bc8237908590859084906370a08231906024015b602060405180830381865afa158015610258573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061027c9190611ac9565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381865afa1580156102e4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103089190611ac9565b90505b92915050565b60605f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a119dd926040518163ffffffff1660e01b81526004015f60405180830381865afa15801561036f573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526103969190810190611b25565b9050805167ffffffffffffffff8111156103b2576103b2611ae0565b6040519080825280602002602001820160405280156103f657816020015b604080518082019091525f80825260208201528152602001906001900390816103d05790505b5091505f5b815181101561048257604051806040016040528083838151811061042157610421611bd9565b60200260200101516001600160a01b0316815260200161045a84848151811061044c5761044c611bd9565b6020026020010151876101e3565b81525083828151811061046f5761046f611bd9565b60209081029190910101526001016103fb565b5050919050565b60605f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a119dd926040518163ffffffff1660e01b81526004015f60405180830381865afa1580156104e7573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261050e9190810190611b25565b9050805167ffffffffffffffff81111561052a5761052a611ae0565b60405190808252806020026020018201604052801561056e57816020015b604080518082019091525f80825260208201528152602001906001900390816105485790505b5091505f5b815181101561048257604051806040016040528083838151811061059957610599611bd9565b60200260200101516001600160a01b031681526020016105d28484815181106105c4576105c4611bd9565b602002602001015187611155565b8152508382815181106105e7576105e7611bd9565b6020908102919091010152600101610573565b60605f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a119dd926040518163ffffffff1660e01b81526004015f60405180830381865afa158015610658573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261067f9190810190611b25565b9050805167ffffffffffffffff81111561069b5761069b611ae0565b6040519080825280602002602001820160405280156106df57816020015b604080518082019091525f80825260208201528152602001906001900390816106b95790505b5091505f5b815181101561082157604051806040016040528083838151811061070a5761070a611bd9565b60200260200101516001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d19fb4fb85858151811061076157610761611bd9565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039182166004820152908a16602482015260448101899052606401602060405180830381865afa1580156107d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107f99190611ac9565b81525083828151811061080e5761080e611bd9565b60209081029190910101526001016106e4565b505092915050565b60605f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a119dd926040518163ffffffff1660e01b81526004015f60405180830381865afa158015610887573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526108ae9190810190611b25565b9050805167ffffffffffffffff8111156108ca576108ca611ae0565b60405190808252806020026020018201604052801561090e57816020015b604080518082019091525f80825260208201528152602001906001900390816108e85790505b5091505f5b815181101561048257604051806040016040528083838151811061093957610939611bd9565b60200260200101516001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c9cbf0e8786868151811061099157610991611bd9565b60200260200101516040518363ffffffff1660e01b81526004016109cb9291906001600160a01b0392831681529116602082015260400190565b602060405180830381865afa1580156109e6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a0a9190611ac9565b815250838281518110610a1f57610a1f611bd9565b6020908102919091010152600101610913565b610aaf6040518061016001604052805f6001600160a01b031681526020015f81526020015f81526020015f81526020015f81526020015f81526020015f6001600160a01b031681526020015f6001600160a01b031681526020015f6001600160a01b031681526020015f64ffffffffff1681526020015f81525090565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630700037d7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166380f556056040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b3b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b5f9190611bed565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b03909116600482015260240160a060405180830381865afa158015610bb9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bdd9190611c21565b5050505090506040518061016001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c4b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c6f9190611bed565b6001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631aa430786040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cd9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cfd9190611ac9565b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663afe7d3b46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d5e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d829190611ac9565b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634fcb7d316040518163ffffffff1660e01b8152600401602060405180830381865afa158015610de3573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e079190611ac9565b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638cc59a0a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e68573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e8c9190611ac9565b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c91e51496040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eed573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f119190611ac9565b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166380f556056040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f72573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f969190611bed565b6001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663085d48836040518163ffffffff1660e01b8152600401602060405180830381865afa158015611000573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110249190611bed565b6001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c86d6ae46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561108e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110b29190611bed565b6001600160a01b031681526020018264ffffffffff1681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b67485286040518163ffffffff1660e01b8152600401602060405180830381865afa158015611129573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061114d9190611ac9565b905292915050565b6040516370a0823160e01b81526001600160a01b0382811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063d19fb4fb908590859084906370a082319060240161023d565b6112416040805161022081019091525f60c0820181815260e08301829052610100830182905261012083018290526101408301829052610160830182905261018083018290526101a083018290526101c083018290526101e08301829052610200830191909152819081526020015f8152602001606081526020015f81526020015f81526020015f81525090565b6040517ff2be15360000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063f2be153690602401602060405180830381865afa1580156112c2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e69190611ac9565b90506040518060c001604052806112fb610a32565b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa15801561135c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113809190611ac9565b815260200161138e8561145c565b81526040516370a0823160e01b81526001600160a01b0386811660048301526020909201917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156113fa573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061141e9190611ac9565b8152602001828152602001825f03611436575f611453565b8261144942670de0b6b3a7640000611c87565b6114539190611c9e565b90529392505050565b60605f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a119dd926040518163ffffffff1660e01b81526004015f60405180830381865afa1580156114ba573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114e19190810190611b25565b9050805167ffffffffffffffff8111156114fd576114fd611ae0565b60405190808252806020026020018201604052801561157157816020015b61155e6040518060e001604052805f6001600160a01b03168152602001606081526020015f81526020015f81526020015f81526020015f81526020015f81525090565b81526020019060019003908161151b5790505b5091505f5b8151811015610482575f82828151811061159257611592611bd9565b602002602001015190505f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630700037d846040518263ffffffff1660e01b81526004016115f991906001600160a01b0391909116815260200190565b60a060405180830381865afa158015611614573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116389190611c21565b945050509250506040518060e00160405280846001600160a01b03168152602001846001600160a01b03166395d89b416040518163ffffffff1660e01b81526004015f60405180830381865afa158015611694573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526116bb9190810190611cb1565b81526020018281526020018364ffffffffff1681526020016116dd858a611155565b81526040517f0c9cbf0e0000000000000000000000000000000000000000000000000000000081526001600160a01b038a8116600483015286811660248301526020909201917f00000000000000000000000000000000000000000000000000000000000000001690630c9cbf0e90604401602060405180830381865afa15801561176a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061178e9190611ac9565b815260200161179d858a6101e3565b8152508685815181106117b2576117b2611bd9565b6020026020010181905250505050806001019050611576565b6001600160a01b03811681146117df575f80fd5b50565b5f80604083850312156117f3575f80fd5b82356117fe816117cb565b9150602083013561180e816117cb565b809150509250929050565b5f60208284031215611829575f80fd5b8135611834816117cb565b9392505050565b602080825282518282018190525f918401906040840190835b8181101561188757835180516001600160a01b031684526020908101518185015290930192604090920191600101611854565b509095945050505050565b5f80604083850312156118a3575f80fd5b82356118ae816117cb565b946020939093013593505050565b80516001600160a01b031682526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015161191560c08401826001600160a01b03169052565b5060e081015161193060e08401826001600160a01b03169052565b5061010081015161194d6101008401826001600160a01b03169052565b5061012081015161196861012084018264ffffffffff169052565b5061014090810151910152565b610160810161030b82846118bc565b5f82825180855260208501945060208160051b830101602085015f5b83811015611a4457601f1985840301885281516001600160a01b038151168452602081015160e0602086015280518060e0870152806020830161010088015e5f610100828801015260408301516040870152606083015160608701526080830151608087015260a083015160a087015260c083015160c0870152610100601f19601f83011687010195505050506020820191506020880197506001810190506119a0565b50909695505050505050565b60208152611a626020820183516118bc565b60208201516101808201525f60408301516102006101a0840152611a8a610220840182611984565b905060608401516101c084015260808401516101e084015260a08401516102008401528091505092915050565b602081525f6103086020830184611984565b5f60208284031215611ad9575f80fd5b5051919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611b1d57611b1d611ae0565b604052919050565b5f60208284031215611b35575f80fd5b815167ffffffffffffffff811115611b4b575f80fd5b8201601f81018413611b5b575f80fd5b805167ffffffffffffffff811115611b7557611b75611ae0565b8060051b611b8560208201611af4565b91825260208184018101929081019087841115611ba0575f80fd5b6020850194505b83851015611bce5784519250611bbc836117cb565b82825260209485019490910190611ba7565b979650505050505050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215611bfd575f80fd5b8151611834816117cb565b805164ffffffffff81168114611c1c575f80fd5b919050565b5f805f805f60a08688031215611c35575f80fd5b611c3e86611c08565b9450611c4c60208701611c08565b9350611c5a60408701611c08565b6060870151608090970151959894975095949392505050565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761030b5761030b611c73565b8181038181111561030b5761030b611c73565b5f60208284031215611cc1575f80fd5b815167ffffffffffffffff811115611cd7575f80fd5b8201601f81018413611ce7575f80fd5b805167ffffffffffffffff811115611d0157611d01611ae0565b611d14601f8201601f1916602001611af4565b818152856020838501011115611d28575f80fd5b8160208401602083015e5f9181016020019190915294935050505056fea2646970667358221220deb95d8a9ac1e30e0b67f4d63ccf5b16df27df62c79323560ce5406efb0eea9864736f6c634300081a0033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106100b9575f3560e01c80638903573011610072578063d4570c1c11610058578063d4570c1c14610190578063d764b78f146101a3578063ef575466146101c3575f80fd5b8063890357301461013c578063c07f33b614610151575f80fd5b8063528d4f5b116100a2578063528d4f5b1461010357806373b5d94a1461011657806384b768bf14610129575f80fd5b8063211dc32d146100bd57806352146cdb146100e3575b5f80fd5b6100d06100cb3660046117e2565b6101e3565b6040519081526020015b60405180910390f35b6100f66100f1366004611819565b610311565b6040516100da919061183b565b6100f6610111366004611819565b610489565b6100f6610124366004611892565b6105fa565b6100f6610137366004611819565b610829565b610144610a32565b6040516100da9190611975565b6101787f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100da565b6100d061019e3660046117e2565b611155565b6101b66101b1366004611819565b6111b3565b6040516100da9190611a50565b6101d66101d1366004611819565b61145c565b6040516100da9190611ab7565b6040516370a0823160e01b81526001600160a01b0382811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906314bc8237908590859084906370a08231906024015b602060405180830381865afa158015610258573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061027c9190611ac9565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381865afa1580156102e4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103089190611ac9565b90505b92915050565b60605f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a119dd926040518163ffffffff1660e01b81526004015f60405180830381865afa15801561036f573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526103969190810190611b25565b9050805167ffffffffffffffff8111156103b2576103b2611ae0565b6040519080825280602002602001820160405280156103f657816020015b604080518082019091525f80825260208201528152602001906001900390816103d05790505b5091505f5b815181101561048257604051806040016040528083838151811061042157610421611bd9565b60200260200101516001600160a01b0316815260200161045a84848151811061044c5761044c611bd9565b6020026020010151876101e3565b81525083828151811061046f5761046f611bd9565b60209081029190910101526001016103fb565b5050919050565b60605f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a119dd926040518163ffffffff1660e01b81526004015f60405180830381865afa1580156104e7573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261050e9190810190611b25565b9050805167ffffffffffffffff81111561052a5761052a611ae0565b60405190808252806020026020018201604052801561056e57816020015b604080518082019091525f80825260208201528152602001906001900390816105485790505b5091505f5b815181101561048257604051806040016040528083838151811061059957610599611bd9565b60200260200101516001600160a01b031681526020016105d28484815181106105c4576105c4611bd9565b602002602001015187611155565b8152508382815181106105e7576105e7611bd9565b6020908102919091010152600101610573565b60605f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a119dd926040518163ffffffff1660e01b81526004015f60405180830381865afa158015610658573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261067f9190810190611b25565b9050805167ffffffffffffffff81111561069b5761069b611ae0565b6040519080825280602002602001820160405280156106df57816020015b604080518082019091525f80825260208201528152602001906001900390816106b95790505b5091505f5b815181101561082157604051806040016040528083838151811061070a5761070a611bd9565b60200260200101516001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d19fb4fb85858151811061076157610761611bd9565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039182166004820152908a16602482015260448101899052606401602060405180830381865afa1580156107d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107f99190611ac9565b81525083828151811061080e5761080e611bd9565b60209081029190910101526001016106e4565b505092915050565b60605f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a119dd926040518163ffffffff1660e01b81526004015f60405180830381865afa158015610887573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526108ae9190810190611b25565b9050805167ffffffffffffffff8111156108ca576108ca611ae0565b60405190808252806020026020018201604052801561090e57816020015b604080518082019091525f80825260208201528152602001906001900390816108e85790505b5091505f5b815181101561048257604051806040016040528083838151811061093957610939611bd9565b60200260200101516001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c9cbf0e8786868151811061099157610991611bd9565b60200260200101516040518363ffffffff1660e01b81526004016109cb9291906001600160a01b0392831681529116602082015260400190565b602060405180830381865afa1580156109e6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a0a9190611ac9565b815250838281518110610a1f57610a1f611bd9565b6020908102919091010152600101610913565b610aaf6040518061016001604052805f6001600160a01b031681526020015f81526020015f81526020015f81526020015f81526020015f81526020015f6001600160a01b031681526020015f6001600160a01b031681526020015f6001600160a01b031681526020015f64ffffffffff1681526020015f81525090565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630700037d7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166380f556056040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b3b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b5f9190611bed565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b03909116600482015260240160a060405180830381865afa158015610bb9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bdd9190611c21565b5050505090506040518061016001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c4b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c6f9190611bed565b6001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631aa430786040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cd9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cfd9190611ac9565b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663afe7d3b46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d5e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d829190611ac9565b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634fcb7d316040518163ffffffff1660e01b8152600401602060405180830381865afa158015610de3573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e079190611ac9565b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638cc59a0a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e68573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e8c9190611ac9565b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c91e51496040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eed573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f119190611ac9565b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166380f556056040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f72573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f969190611bed565b6001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663085d48836040518163ffffffff1660e01b8152600401602060405180830381865afa158015611000573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110249190611bed565b6001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c86d6ae46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561108e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110b29190611bed565b6001600160a01b031681526020018264ffffffffff1681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b67485286040518163ffffffff1660e01b8152600401602060405180830381865afa158015611129573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061114d9190611ac9565b905292915050565b6040516370a0823160e01b81526001600160a01b0382811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063d19fb4fb908590859084906370a082319060240161023d565b6112416040805161022081019091525f60c0820181815260e08301829052610100830182905261012083018290526101408301829052610160830182905261018083018290526101a083018290526101c083018290526101e08301829052610200830191909152819081526020015f8152602001606081526020015f81526020015f81526020015f81525090565b6040517ff2be15360000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063f2be153690602401602060405180830381865afa1580156112c2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e69190611ac9565b90506040518060c001604052806112fb610a32565b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa15801561135c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113809190611ac9565b815260200161138e8561145c565b81526040516370a0823160e01b81526001600160a01b0386811660048301526020909201917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156113fa573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061141e9190611ac9565b8152602001828152602001825f03611436575f611453565b8261144942670de0b6b3a7640000611c87565b6114539190611c9e565b90529392505050565b60605f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a119dd926040518163ffffffff1660e01b81526004015f60405180830381865afa1580156114ba573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114e19190810190611b25565b9050805167ffffffffffffffff8111156114fd576114fd611ae0565b60405190808252806020026020018201604052801561157157816020015b61155e6040518060e001604052805f6001600160a01b03168152602001606081526020015f81526020015f81526020015f81526020015f81526020015f81525090565b81526020019060019003908161151b5790505b5091505f5b8151811015610482575f82828151811061159257611592611bd9565b602002602001015190505f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630700037d846040518263ffffffff1660e01b81526004016115f991906001600160a01b0391909116815260200190565b60a060405180830381865afa158015611614573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116389190611c21565b945050509250506040518060e00160405280846001600160a01b03168152602001846001600160a01b03166395d89b416040518163ffffffff1660e01b81526004015f60405180830381865afa158015611694573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526116bb9190810190611cb1565b81526020018281526020018364ffffffffff1681526020016116dd858a611155565b81526040517f0c9cbf0e0000000000000000000000000000000000000000000000000000000081526001600160a01b038a8116600483015286811660248301526020909201917f00000000000000000000000000000000000000000000000000000000000000001690630c9cbf0e90604401602060405180830381865afa15801561176a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061178e9190611ac9565b815260200161179d858a6101e3565b8152508685815181106117b2576117b2611bd9565b6020026020010181905250505050806001019050611576565b6001600160a01b03811681146117df575f80fd5b50565b5f80604083850312156117f3575f80fd5b82356117fe816117cb565b9150602083013561180e816117cb565b809150509250929050565b5f60208284031215611829575f80fd5b8135611834816117cb565b9392505050565b602080825282518282018190525f918401906040840190835b8181101561188757835180516001600160a01b031684526020908101518185015290930192604090920191600101611854565b509095945050505050565b5f80604083850312156118a3575f80fd5b82356118ae816117cb565b946020939093013593505050565b80516001600160a01b031682526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015161191560c08401826001600160a01b03169052565b5060e081015161193060e08401826001600160a01b03169052565b5061010081015161194d6101008401826001600160a01b03169052565b5061012081015161196861012084018264ffffffffff169052565b5061014090810151910152565b610160810161030b82846118bc565b5f82825180855260208501945060208160051b830101602085015f5b83811015611a4457601f1985840301885281516001600160a01b038151168452602081015160e0602086015280518060e0870152806020830161010088015e5f610100828801015260408301516040870152606083015160608701526080830151608087015260a083015160a087015260c083015160c0870152610100601f19601f83011687010195505050506020820191506020880197506001810190506119a0565b50909695505050505050565b60208152611a626020820183516118bc565b60208201516101808201525f60408301516102006101a0840152611a8a610220840182611984565b905060608401516101c084015260808401516101e084015260a08401516102008401528091505092915050565b602081525f6103086020830184611984565b5f60208284031215611ad9575f80fd5b5051919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611b1d57611b1d611ae0565b604052919050565b5f60208284031215611b35575f80fd5b815167ffffffffffffffff811115611b4b575f80fd5b8201601f81018413611b5b575f80fd5b805167ffffffffffffffff811115611b7557611b75611ae0565b8060051b611b8560208201611af4565b91825260208184018101929081019087841115611ba0575f80fd5b6020850194505b83851015611bce5784519250611bbc836117cb565b82825260209485019490910190611ba7565b979650505050505050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215611bfd575f80fd5b8151611834816117cb565b805164ffffffffff81168114611c1c575f80fd5b919050565b5f805f805f60a08688031215611c35575f80fd5b611c3e86611c08565b9450611c4c60208701611c08565b9350611c5a60408701611c08565b6060870151608090970151959894975095949392505050565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761030b5761030b611c73565b8181038181111561030b5761030b611c73565b5f60208284031215611cc1575f80fd5b815167ffffffffffffffff811115611cd7575f80fd5b8201601f81018413611ce7575f80fd5b805167ffffffffffffffff811115611d0157611d01611ae0565b611d14601f8201601f1916602001611af4565b818152856020838501011115611d28575f80fd5b8160208401602083015e5f9181016020019190915294935050505056fea2646970667358221220deb95d8a9ac1e30e0b67f4d63ccf5b16df27df62c79323560ce5406efb0eea9864736f6c634300081a0033", + "devdoc": { + "kind": "dev", + "methods": { + "allClaimable(address)": { + "params": { + "account": "The address of the user for whom to calculate the claimable rewards." + }, + "returns": { + "claimableRewards": "An array of `RewardAmount`, with the reward token and the amount." + } + }, + "allClaimable(address,uint256)": { + "params": { + "account": "The address of the user for whom to calculate the claimable rewards.", + "shares": "The number of shares for which to calculate the claimable rewards." + }, + "returns": { + "claimableRewards": "An array of `RewardAmount`, with the reward token and the amount." + } + }, + "allClaimed(address)": { + "params": { + "account": "The address of the user for whom to calculate the claimed rewards." + }, + "returns": { + "claimedRewards": "An array of `RewardAmount`, with the reward token and the amount." + } + }, + "allEarned(address)": { + "params": { + "account": "The address of the user for whom to calculate the earned rewards." + }, + "returns": { + "earnedRewards": "An array of `RewardAmount`, with the reward token and the amount." + } + }, + "claimable(address,address)": { + "params": { + "account": "The address of the user for whom to calculate the claimable rewards.", + "reward": "The reward token for which to calculate the claimable rewards." + }, + "returns": { + "_0": "The total amount of claimable rewards for the specified user." + } + }, + "constructor": { + "custom:oz-upgrades-unsafe-allow": "constructor" + }, + "earned(address,address)": { + "details": "Computes earned rewards by taking the product of the account's balance and the difference between the global reward per token and the reward per token already paid to the user. This result is then added to any rewards that have already been accumulated but not yet paid out.", + "params": { + "account": "The address of the user for whom to calculate the rewards." + }, + "returns": { + "_0": "The total amount of earned rewards for the specified user." + } + } + }, + "stateVariables": { + "stEXA": { + "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" + } + }, + "title": "StakingPreviewer", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "allClaimable(address)": { + "notice": "Returns the rewards and amounts that an account can currently claim." + }, + "allClaimable(address,uint256)": { + "notice": "Returns the rewards and amounts that an account can currently claim for the given shares." + }, + "allClaimed(address)": { + "notice": "Returns the rewards and amounts that an account has already claimed." + }, + "allEarned(address)": { + "notice": "Returns the rewards and amounts that an account has generated." + }, + "claimable(address,address)": { + "notice": "Calculates the amount of rewards that an account can claim." + }, + "earned(address,address)": { + "notice": "Calculates the amount of rewards that an account has earned." + }, + "parameters()": { + "notice": "Returns the staking model parameters." + }, + "staking(address)": { + "notice": "Returns the staking model parameters and account details for a given account." + } + }, + "notice": "Contract to be consumed as a helper for `StakedEXA`", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/optimism/StakingPreviewer_Proxy.json b/deployments/optimism/StakingPreviewer_Proxy.json new file mode 100644 index 00000000..bc6bb777 --- /dev/null +++ b/deployments/optimism/StakingPreviewer_Proxy.json @@ -0,0 +1,161 @@ +{ + "address": "0x5C79494Df50D9dc56DE627f46d0b2E217683C641", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x19a623d8af594827b9111358c5ffb5a3ede098d039e01fec9580d27c7cc17c42", + "receipt": { + "to": null, + "from": "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", + "contractAddress": "0x5C79494Df50D9dc56DE627f46d0b2E217683C641", + "transactionIndex": 7, + "gasUsed": "517910", + "logsBloom": "0x00000000000000000000000200000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000002004000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000100000000000000000000020000000000000000000000000000000000400000000008000000000000000000000000000000000000000000000000000000000000040000000000000", + "blockHash": "0x87df506add7ba37c84de51e15e172a7e07b998ce3375c44c8fc94a634e374cfc", + "transactionHash": "0x19a623d8af594827b9111358c5ffb5a3ede098d039e01fec9580d27c7cc17c42", + "logs": [ + { + "transactionIndex": 7, + "blockNumber": 124901386, + "transactionHash": "0x19a623d8af594827b9111358c5ffb5a3ede098d039e01fec9580d27c7cc17c42", + "address": "0x5C79494Df50D9dc56DE627f46d0b2E217683C641", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000615ddf715d8696d0553021ae7363191de8443584" + ], + "data": "0x", + "logIndex": 42, + "blockHash": "0x87df506add7ba37c84de51e15e172a7e07b998ce3375c44c8fc94a634e374cfc" + }, + { + "transactionIndex": 7, + "blockNumber": 124901386, + "transactionHash": "0x19a623d8af594827b9111358c5ffb5a3ede098d039e01fec9580d27c7cc17c42", + "address": "0x5C79494Df50D9dc56DE627f46d0b2E217683C641", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a", + "logIndex": 43, + "blockHash": "0x87df506add7ba37c84de51e15e172a7e07b998ce3375c44c8fc94a634e374cfc" + } + ], + "blockNumber": 124901386, + "cumulativeGasUsed": "1682840", + "status": 1, + "byzantium": true + }, + "args": [ + "0x615dDF715D8696d0553021aE7363191de8443584", + "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "6a557ee70d62b80968609ef7922ee609", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"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\"},{\"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. NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to fully implement transparency without decoding reverts caused by selector clashes between the proxy and the implementation. WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is changed.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"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}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1111},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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": "0x6080604052604051610b2a380380610b2a833981016040819052610022916102b7565b828161002f82825f610043565b5061003b90508261006e565b50505061039e565b61004c836100db565b5f825111806100585750805b1561006957610067838361011a565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6100ad5f80516020610ae3833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a16100d881610146565b50565b6100e481610189565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b606061013f8383604051806060016040528060278152602001610b03602791396101c3565b9392505050565b6001600160a01b038116610158575f80fd5b805f80516020610ae38339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b61019c575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610168565b60605f80856001600160a01b0316856040516101df9190610388565b5f60405180830381855af49150503d805f8114610217576040519150601f19603f3d011682016040523d82523d5f602084013e61021c565b606091505b50909250905061022e86838387610238565b9695505050505050565b606083156102625782515f0361025b576001600160a01b0385163b61025b575f80fd5b508161026c565b61026c8383610274565b949350505050565b8151156102845781518083602001fd5b5f80fd5b80516001600160a01b038116811461029e575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f805f606084860312156102c9575f80fd5b6102d284610288565b92506102e060208501610288565b60408501519092506001600160401b038111156102fb575f80fd5b8401601f8101861361030b575f80fd5b80516001600160401b03811115610324576103246102a3565b604051601f8201601f19908116603f011681016001600160401b0381118282101715610352576103526102a3565b604052818152828201602001881015610369575f80fd5b8160208401602083015e5f602083830101528093505050509250925092565b5f82518060208501845e5f920191825250919050565b610738806103ab5f395ff3fe60806040523661001357610011610017565b005b6100115b61001f61016c565b6001600160a01b031633036101625760606001600160e01b03195f35167fc9a6301a0000000000000000000000000000000000000000000000000000000081016100725761006b61019e565b915061015a565b7fb0e10d7a000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100ab5761006b6101f1565b7f70d7c690000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100e45761006b610235565b7f07ae5bc0000000000000000000000000000000000000000000000000000000006001600160e01b031982160161011d5761006b610265565b7fa39f25e5000000000000000000000000000000000000000000000000000000006001600160e01b03198216016101565761006b6102a4565b5f80fd5b815160208301f35b61016a6102b7565b565b5f7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a86102c7565b5f6101b63660048184610579565b8101906101c391906105bb565b90506101de8160405180602001604052805f8152505f6102d1565b505060408051602081019091525f815290565b60605f806102023660048184610579565b81019061020f9190610601565b9150915061021f828260016102d1565b60405180602001604052805f8152509250505090565b606061023f6102c7565b5f61024d3660048184610579565b81019061025a91906105bb565b90506101de816102fc565b606061026f6102c7565b5f61027861016c565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102ae6102c7565b5f610278610353565b61016a6102c2610353565b610361565b341561016a575f80fd5b6102da8361037f565b5f825111806102e65750805b156102f7576102f583836103be565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032561016c565b604080516001600160a01b03928316815291841660208301520160405180910390a1610350816103ea565b50565b5f61035c610458565b905090565b365f80375f80365f845af43d5f803e80801561037b573d5ff35b3d5ffd5b6103888161047f565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b60606103e383836040518060600160405280602781526020016106dc602791396104b9565b9392505050565b6001600160a01b0381166103fc575f80fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905550565b5f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018f565b6001600160a01b0381163b610492575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61041f565b60605f80856001600160a01b0316856040516104d591906106c5565b5f60405180830381855af49150503d805f811461050d576040519150601f19603f3d011682016040523d82523d5f602084013e610512565b606091505b50915091506105238683838761052d565b9695505050505050565b606083156105575782515f03610550576001600160a01b0385163b610550575f80fd5b5081610561565b6105618383610569565b949350505050565b8151156101565781518083602001fd5b5f8085851115610587575f80fd5b83861115610593575f80fd5b5050820193919092039150565b80356001600160a01b03811681146105b6575f80fd5b919050565b5f602082840312156105cb575f80fd5b6103e3826105a0565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f8060408385031215610612575f80fd5b61061b836105a0565b9150602083013567ffffffffffffffff811115610636575f80fd5b8301601f81018513610646575f80fd5b803567ffffffffffffffff811115610660576106606105d4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561068f5761068f6105d4565b6040528181528282016020018710156106a6575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82518060208501845e5f92019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d8c251ecd4d394863339f9bcd6f97d3ee0a2ad0067aa7a46ebd15dc85a73cc5464736f6c634300081a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61001f61016c565b6001600160a01b031633036101625760606001600160e01b03195f35167fc9a6301a0000000000000000000000000000000000000000000000000000000081016100725761006b61019e565b915061015a565b7fb0e10d7a000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100ab5761006b6101f1565b7f70d7c690000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100e45761006b610235565b7f07ae5bc0000000000000000000000000000000000000000000000000000000006001600160e01b031982160161011d5761006b610265565b7fa39f25e5000000000000000000000000000000000000000000000000000000006001600160e01b03198216016101565761006b6102a4565b5f80fd5b815160208301f35b61016a6102b7565b565b5f7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a86102c7565b5f6101b63660048184610579565b8101906101c391906105bb565b90506101de8160405180602001604052805f8152505f6102d1565b505060408051602081019091525f815290565b60605f806102023660048184610579565b81019061020f9190610601565b9150915061021f828260016102d1565b60405180602001604052805f8152509250505090565b606061023f6102c7565b5f61024d3660048184610579565b81019061025a91906105bb565b90506101de816102fc565b606061026f6102c7565b5f61027861016c565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102ae6102c7565b5f610278610353565b61016a6102c2610353565b610361565b341561016a575f80fd5b6102da8361037f565b5f825111806102e65750805b156102f7576102f583836103be565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032561016c565b604080516001600160a01b03928316815291841660208301520160405180910390a1610350816103ea565b50565b5f61035c610458565b905090565b365f80375f80365f845af43d5f803e80801561037b573d5ff35b3d5ffd5b6103888161047f565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b60606103e383836040518060600160405280602781526020016106dc602791396104b9565b9392505050565b6001600160a01b0381166103fc575f80fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905550565b5f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018f565b6001600160a01b0381163b610492575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61041f565b60605f80856001600160a01b0316856040516104d591906106c5565b5f60405180830381855af49150503d805f811461050d576040519150601f19603f3d011682016040523d82523d5f602084013e610512565b606091505b50915091506105238683838761052d565b9695505050505050565b606083156105575782515f03610550576001600160a01b0385163b610550575f80fd5b5081610561565b6105618383610569565b949350505050565b8151156101565781518083602001fd5b5f8085851115610587575f80fd5b83861115610593575f80fd5b5050820193919092039150565b80356001600160a01b03811681146105b6575f80fd5b919050565b5f602082840312156105cb575f80fd5b6103e3826105a0565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f8060408385031215610612575f80fd5b61061b836105a0565b9150602083013567ffffffffffffffff811115610636575f80fd5b8301601f81018513610646575f80fd5b803567ffffffffffffffff811115610660576106606105d4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561068f5761068f6105d4565b6040528181528282016020018710156106a6575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82518060208501845e5f92019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d8c251ecd4d394863339f9bcd6f97d3ee0a2ad0067aa7a46ebd15dc85a73cc5464736f6c634300081a0033", + "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. NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to fully implement transparency without decoding reverts caused by selector clashes between the proxy and the implementation. WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.", + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is changed." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + }, + "kind": "dev", + "methods": { + "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}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/optimism/stEXA.json b/deployments/optimism/stEXA.json new file mode 100644 index 00000000..8a57305d --- /dev/null +++ b/deployments/optimism/stEXA.json @@ -0,0 +1,2837 @@ +{ + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddressInsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyEnabled", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "ERC2612ExpiredSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC2612InvalidSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxMint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxRedeem", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxWithdraw", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRange", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRatio", + "type": "error" + }, + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [], + "name": "MaxRewardsTokensExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "NotFinished", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "NotPausingRole", + "type": "error" + }, + { + "inputs": [], + "name": "RewardNotListed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [], + "name": "Untransferable", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAmount", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroRate", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "DistributionFinished", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract Market", + "name": "market", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "MarketSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "minTime", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "MinTimeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "penaltyGrowth", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "PenaltyGrowthSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "penaltyThreshold", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "PenaltyThresholdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "providerRatio", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "ProviderRatioSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "ProviderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "refTime", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "RefTimeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "notifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RewardAmountNotified", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "RewardListed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RewardPaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "duration", + "type": "uint256" + } + ], + "name": "RewardsDurationSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RewardsWithdrawn", + "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": true, + "internalType": "address", + "name": "savings", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "SavingsSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EMERGENCY_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_REWARDS_TOKENS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "allRewardsTokens", + "outputs": [ + { + "internalType": "contract IERC20[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "asset", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "avgIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "avgIndexes", + "outputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "avgStart", + "outputs": [ + { + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "claimAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "claimable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "claimed", + "outputs": [ + { + "internalType": "uint256", + "name": "claimed", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "convertToAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "convertToShares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "earned", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "enableReward", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "excessFactor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "finishDistribution", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "globalIndex", + "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": [], + "name": "harvest", + "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": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "refTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "excessFactor", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "penaltyGrowth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "penaltyThreshold", + "type": "uint256" + }, + { + "internalType": "contract Market", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "internalType": "address", + "name": "savings", + "type": "address" + }, + { + "internalType": "uint40", + "name": "duration", + "type": "uint40" + }, + { + "internalType": "uint256", + "name": "providerRatio", + "type": "uint256" + } + ], + "internalType": "struct Parameters", + "name": "p", + "type": "tuple" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "finishAt", + "type": "uint256" + } + ], + "name": "lastTimeRewardApplicable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "market", + "outputs": [ + { + "internalType": "contract Market", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "notifyRewardAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "penaltyGrowth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "penaltyThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "internalType": "struct Permit", + "name": "p", + "type": "tuple" + } + ], + "name": "permitAndDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "provider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "providerRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "rawClaimable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "refTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "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": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "rewards", + "outputs": [ + { + "internalType": "uint40", + "name": "duration", + "type": "uint40" + }, + { + "internalType": "uint40", + "name": "finishAt", + "type": "uint40" + }, + { + "internalType": "uint40", + "name": "updatedAt", + "type": "uint40" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "rewardsTokens", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "saved", + "outputs": [ + { + "internalType": "uint256", + "name": "saved", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "savings", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract Market", + "name": "market_", + "type": "address" + } + ], + "name": "setMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minTime_", + "type": "uint256" + } + ], + "name": "setMinTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "penaltyGrowth_", + "type": "uint256" + } + ], + "name": "setPenaltyGrowth", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "penaltyThreshold_", + "type": "uint256" + } + ], + "name": "setPenaltyThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "provider_", + "type": "address" + } + ], + "name": "setProvider", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "providerRatio_", + "type": "uint256" + } + ], + "name": "setProviderRatio", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint40", + "name": "duration", + "type": "uint40" + } + ], + "name": "setRewardsDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "savings_", + "type": "address" + } + ], + "name": "setSavings", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawRewards", + "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": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "receipt": { + "to": null, + "from": "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", + "contractAddress": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "transactionIndex": 11, + "gasUsed": "964373", + "logsBloom": "0x008000040040000000000000000000004000000000000000000000000000000020000000010000000000000000000000000000808000000004000040000000000000000009000000000000000000020022000040000000000000008000000000000000000a0000000000000000000800000050a00000000008000000000000000000000800000000000800040000080000000000000080800000000000800040000000000800000000020000000000000400004000000000001000000001000000000020400000040000020000800002040000001404000100000000080020200000000000401000200000000000000020000080000000800000000000008000", + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a", + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "logs": [ + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000033c69e5c0a7a2bad42d178ec11b881acdbe682a1" + ], + "data": "0x", + "logIndex": 76, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x", + "logIndex": 77, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0xcb90293a116713eb442bb98d30c95b14fa981b1bf6f9ee8e1bf3c856e8ded54e", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 78, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0xde98b8145241ddecb3a88a40e29bc18e7f3a091cf2d92e9891fffe71bf303890", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x0000000000000000000000000000000000000000000000001bc16d674ec80000", + "logIndex": 79, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x33b1804f184927027d7ac0f874248c83a39e0ec20e93e8574499c14a5083886f", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x000000000000000000000000000000000000000000000000016345785d8a0000", + "logIndex": 80, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x9749fb908457c4fa0afa13661b7b5b02c584a8ae47610ccc7a65d7d500951db4", + "0x0000000000000000000000006926b434cce9b5b7966ae1bfeef6d0a7dcf3a8bb", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x", + "logIndex": 81, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x9befd548a45bf1eebac6219d0f8cdce0f6a86fc087bc042116131d777d26c008", + "0x0000000000000000000000006926b434cce9b5b7966ae1bfeef6d0a7dcf3a8bb", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x", + "logIndex": 82, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x307065155c111638dfa8c188a29ab8abc925f17d3616388c7683d0d45a29a453", + "0x0000000000000000000000006926b434cce9b5b7966ae1bfeef6d0a7dcf3a8bb", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000093a80", + "logIndex": 83, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x95d5fab7f1c5262ecb5edffc2c96c30c43871f674976c8ab4fe5ca8a440c3e4b", + "0x00000000000000000000000023fd464e0b0ee21cedeb929b19cabf9bd5215019", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x", + "logIndex": 84, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x8fa281d02a496c3848901321abdd8d00f14ee5706a12b8c6ff6e3a9a097afc08", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x000000000000000000000000000000000000000000000000016345785d8a0000", + "logIndex": 85, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0xf0e8bebe3659a97126f43e3d176f7555480c335f92ca957254992ce32b551aff", + "0x0000000000000000000000008a1c05c4462b3554814a637e940b3342ffbe02f2", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x", + "logIndex": 86, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 87, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fba759bcd1a99a7724c5068feddb4f5b844b941a", + "logIndex": 88, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + } + ], + "blockNumber": 124901366, + "cumulativeGasUsed": "4250137", + "status": 1, + "byzantium": true + }, + "args": [ + "0x33c69e5c0a7A2BAD42D178eC11b881aCDbE682a1", + "0xfBa759BCd1a99a7724c5068FEddb4F5b844b941A", + "0x6e5c4c780000000000000000000000001e925de1c68ef83bd98ee3e130ef14a50309c01b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e133800000000000000000000000000000000000000000000000000c7d713b49da00000000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000006926b434cce9b5b7966ae1bfeef6d0a7dcf3a8bb00000000000000000000000023fd464e0b0ee21cedeb929b19cabf9bd52150190000000000000000000000008a1c05c4462b3554814a637e940b3342ffbe02f20000000000000000000000000000000000000000000000000000000000093a80000000000000000000000000000000000000000000000000016345785d8a0000" + ], + "numDeployments": 1, + "solcInputHash": "6a557ee70d62b80968609ef7922ee609", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"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\"},{\"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. NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to fully implement transparency without decoding reverts caused by selector clashes between the proxy and the implementation. WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is changed.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"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}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1111},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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": "0x6080604052604051610b2a380380610b2a833981016040819052610022916102b7565b828161002f82825f610043565b5061003b90508261006e565b50505061039e565b61004c836100db565b5f825111806100585750805b1561006957610067838361011a565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6100ad5f80516020610ae3833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a16100d881610146565b50565b6100e481610189565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b606061013f8383604051806060016040528060278152602001610b03602791396101c3565b9392505050565b6001600160a01b038116610158575f80fd5b805f80516020610ae38339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b61019c575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610168565b60605f80856001600160a01b0316856040516101df9190610388565b5f60405180830381855af49150503d805f8114610217576040519150601f19603f3d011682016040523d82523d5f602084013e61021c565b606091505b50909250905061022e86838387610238565b9695505050505050565b606083156102625782515f0361025b576001600160a01b0385163b61025b575f80fd5b508161026c565b61026c8383610274565b949350505050565b8151156102845781518083602001fd5b5f80fd5b80516001600160a01b038116811461029e575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f805f606084860312156102c9575f80fd5b6102d284610288565b92506102e060208501610288565b60408501519092506001600160401b038111156102fb575f80fd5b8401601f8101861361030b575f80fd5b80516001600160401b03811115610324576103246102a3565b604051601f8201601f19908116603f011681016001600160401b0381118282101715610352576103526102a3565b604052818152828201602001881015610369575f80fd5b8160208401602083015e5f602083830101528093505050509250925092565b5f82518060208501845e5f920191825250919050565b610738806103ab5f395ff3fe60806040523661001357610011610017565b005b6100115b61001f61016c565b6001600160a01b031633036101625760606001600160e01b03195f35167fc9a6301a0000000000000000000000000000000000000000000000000000000081016100725761006b61019e565b915061015a565b7fb0e10d7a000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100ab5761006b6101f1565b7f70d7c690000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100e45761006b610235565b7f07ae5bc0000000000000000000000000000000000000000000000000000000006001600160e01b031982160161011d5761006b610265565b7fa39f25e5000000000000000000000000000000000000000000000000000000006001600160e01b03198216016101565761006b6102a4565b5f80fd5b815160208301f35b61016a6102b7565b565b5f7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a86102c7565b5f6101b63660048184610579565b8101906101c391906105bb565b90506101de8160405180602001604052805f8152505f6102d1565b505060408051602081019091525f815290565b60605f806102023660048184610579565b81019061020f9190610601565b9150915061021f828260016102d1565b60405180602001604052805f8152509250505090565b606061023f6102c7565b5f61024d3660048184610579565b81019061025a91906105bb565b90506101de816102fc565b606061026f6102c7565b5f61027861016c565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102ae6102c7565b5f610278610353565b61016a6102c2610353565b610361565b341561016a575f80fd5b6102da8361037f565b5f825111806102e65750805b156102f7576102f583836103be565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032561016c565b604080516001600160a01b03928316815291841660208301520160405180910390a1610350816103ea565b50565b5f61035c610458565b905090565b365f80375f80365f845af43d5f803e80801561037b573d5ff35b3d5ffd5b6103888161047f565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b60606103e383836040518060600160405280602781526020016106dc602791396104b9565b9392505050565b6001600160a01b0381166103fc575f80fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905550565b5f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018f565b6001600160a01b0381163b610492575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61041f565b60605f80856001600160a01b0316856040516104d591906106c5565b5f60405180830381855af49150503d805f811461050d576040519150601f19603f3d011682016040523d82523d5f602084013e610512565b606091505b50915091506105238683838761052d565b9695505050505050565b606083156105575782515f03610550576001600160a01b0385163b610550575f80fd5b5081610561565b6105618383610569565b949350505050565b8151156101565781518083602001fd5b5f8085851115610587575f80fd5b83861115610593575f80fd5b5050820193919092039150565b80356001600160a01b03811681146105b6575f80fd5b919050565b5f602082840312156105cb575f80fd5b6103e3826105a0565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f8060408385031215610612575f80fd5b61061b836105a0565b9150602083013567ffffffffffffffff811115610636575f80fd5b8301601f81018513610646575f80fd5b803567ffffffffffffffff811115610660576106606105d4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561068f5761068f6105d4565b6040528181528282016020018710156106a6575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82518060208501845e5f92019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d8c251ecd4d394863339f9bcd6f97d3ee0a2ad0067aa7a46ebd15dc85a73cc5464736f6c634300081a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61001f61016c565b6001600160a01b031633036101625760606001600160e01b03195f35167fc9a6301a0000000000000000000000000000000000000000000000000000000081016100725761006b61019e565b915061015a565b7fb0e10d7a000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100ab5761006b6101f1565b7f70d7c690000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100e45761006b610235565b7f07ae5bc0000000000000000000000000000000000000000000000000000000006001600160e01b031982160161011d5761006b610265565b7fa39f25e5000000000000000000000000000000000000000000000000000000006001600160e01b03198216016101565761006b6102a4565b5f80fd5b815160208301f35b61016a6102b7565b565b5f7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a86102c7565b5f6101b63660048184610579565b8101906101c391906105bb565b90506101de8160405180602001604052805f8152505f6102d1565b505060408051602081019091525f815290565b60605f806102023660048184610579565b81019061020f9190610601565b9150915061021f828260016102d1565b60405180602001604052805f8152509250505090565b606061023f6102c7565b5f61024d3660048184610579565b81019061025a91906105bb565b90506101de816102fc565b606061026f6102c7565b5f61027861016c565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102ae6102c7565b5f610278610353565b61016a6102c2610353565b610361565b341561016a575f80fd5b6102da8361037f565b5f825111806102e65750805b156102f7576102f583836103be565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032561016c565b604080516001600160a01b03928316815291841660208301520160405180910390a1610350816103ea565b50565b5f61035c610458565b905090565b365f80375f80365f845af43d5f803e80801561037b573d5ff35b3d5ffd5b6103888161047f565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b60606103e383836040518060600160405280602781526020016106dc602791396104b9565b9392505050565b6001600160a01b0381166103fc575f80fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905550565b5f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018f565b6001600160a01b0381163b610492575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61041f565b60605f80856001600160a01b0316856040516104d591906106c5565b5f60405180830381855af49150503d805f811461050d576040519150601f19603f3d011682016040523d82523d5f602084013e610512565b606091505b50915091506105238683838761052d565b9695505050505050565b606083156105575782515f03610550576001600160a01b0385163b610550575f80fd5b5081610561565b6105618383610569565b949350505050565b8151156101565781518083602001fd5b5f8085851115610587575f80fd5b83861115610593575f80fd5b5050820193919092039150565b80356001600160a01b03811681146105b6575f80fd5b919050565b5f602082840312156105cb575f80fd5b6103e3826105a0565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f8060408385031215610612575f80fd5b61061b836105a0565b9150602083013567ffffffffffffffff811115610636575f80fd5b8301601f81018513610646575f80fd5b803567ffffffffffffffff811115610660576106606105d4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561068f5761068f6105d4565b6040528181528282016020018710156106a6575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82518060208501845e5f92019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d8c251ecd4d394863339f9bcd6f97d3ee0a2ad0067aa7a46ebd15dc85a73cc5464736f6c634300081a0033", + "execute": { + "methodName": "initialize", + "args": [ + { + "asset": "0x1e925De1c68ef83bD98eE3E130eF14a50309C01B", + "minTime": 0, + "refTime": 31536000, + "excessFactor": "900000000000000000", + "penaltyGrowth": "2000000000000000000", + "penaltyThreshold": "100000000000000000", + "market": "0x6926B434CCe9b5b7966aE1BfEef6D0A7DCF3A8bb", + "provider": "0x23fD464e0b0eE21cEdEb929B19CABF9bD5215019", + "savings": "0x8a1c05C4462b3554814a637E940b3342ffBE02f2", + "duration": 604800, + "providerRatio": "100000000000000000" + } + ] + }, + "implementation": "0x33c69e5c0a7A2BAD42D178eC11b881aCDbE682a1", + "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. NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to fully implement transparency without decoding reverts caused by selector clashes between the proxy and the implementation. WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.", + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is changed." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + }, + "kind": "dev", + "methods": { + "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}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/optimism/stEXA_Implementation.json b/deployments/optimism/stEXA_Implementation.json new file mode 100644 index 00000000..6368dcae --- /dev/null +++ b/deployments/optimism/stEXA_Implementation.json @@ -0,0 +1,3388 @@ +{ + "address": "0x33c69e5c0a7A2BAD42D178eC11b881aCDbE682a1", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddressInsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyEnabled", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "ERC2612ExpiredSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC2612InvalidSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxMint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxRedeem", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxWithdraw", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRange", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRatio", + "type": "error" + }, + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [], + "name": "MaxRewardsTokensExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "NotFinished", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "NotPausingRole", + "type": "error" + }, + { + "inputs": [], + "name": "RewardNotListed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [], + "name": "Untransferable", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAmount", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroRate", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "DistributionFinished", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract Market", + "name": "market", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "MarketSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "minTime", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "MinTimeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "penaltyGrowth", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "PenaltyGrowthSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "penaltyThreshold", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "PenaltyThresholdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "providerRatio", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "ProviderRatioSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "ProviderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "refTime", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "RefTimeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "notifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RewardAmountNotified", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "RewardListed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RewardPaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "duration", + "type": "uint256" + } + ], + "name": "RewardsDurationSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RewardsWithdrawn", + "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": true, + "internalType": "address", + "name": "savings", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "SavingsSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EMERGENCY_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_REWARDS_TOKENS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "allRewardsTokens", + "outputs": [ + { + "internalType": "contract IERC20[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "asset", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "avgIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "avgIndexes", + "outputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "avgStart", + "outputs": [ + { + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "claimAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "claimable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "claimed", + "outputs": [ + { + "internalType": "uint256", + "name": "claimed", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "convertToAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "convertToShares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "earned", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "enableReward", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "excessFactor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "finishDistribution", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "globalIndex", + "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": [], + "name": "harvest", + "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": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "refTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "excessFactor", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "penaltyGrowth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "penaltyThreshold", + "type": "uint256" + }, + { + "internalType": "contract Market", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "internalType": "address", + "name": "savings", + "type": "address" + }, + { + "internalType": "uint40", + "name": "duration", + "type": "uint40" + }, + { + "internalType": "uint256", + "name": "providerRatio", + "type": "uint256" + } + ], + "internalType": "struct Parameters", + "name": "p", + "type": "tuple" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "finishAt", + "type": "uint256" + } + ], + "name": "lastTimeRewardApplicable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "market", + "outputs": [ + { + "internalType": "contract Market", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "notifyRewardAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "penaltyGrowth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "penaltyThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "internalType": "struct Permit", + "name": "p", + "type": "tuple" + } + ], + "name": "permitAndDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "provider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "providerRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "rawClaimable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "refTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "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": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "rewards", + "outputs": [ + { + "internalType": "uint40", + "name": "duration", + "type": "uint40" + }, + { + "internalType": "uint40", + "name": "finishAt", + "type": "uint40" + }, + { + "internalType": "uint40", + "name": "updatedAt", + "type": "uint40" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "rewardsTokens", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + } + ], + "name": "saved", + "outputs": [ + { + "internalType": "uint256", + "name": "saved", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "savings", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract Market", + "name": "market_", + "type": "address" + } + ], + "name": "setMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minTime_", + "type": "uint256" + } + ], + "name": "setMinTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "penaltyGrowth_", + "type": "uint256" + } + ], + "name": "setPenaltyGrowth", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "penaltyThreshold_", + "type": "uint256" + } + ], + "name": "setPenaltyThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "provider_", + "type": "address" + } + ], + "name": "setProvider", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "providerRatio_", + "type": "uint256" + } + ], + "name": "setProviderRatio", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint40", + "name": "duration", + "type": "uint40" + } + ], + "name": "setRewardsDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "savings_", + "type": "address" + } + ], + "name": "setSavings", + "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": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "reward", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x9e99f1944f4abe682c10a5ba6eb691c05163cc2f63fdc80a67b48cc736241707", + "receipt": { + "to": null, + "from": "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", + "contractAddress": "0x33c69e5c0a7A2BAD42D178eC11b881aCDbE682a1", + "transactionIndex": 3, + "gasUsed": "4840439", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000004000000040000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3a3a618e9072388b40a37593cd3cf37ea7488aeb5ff6b4dcc0f609ff3ac98c47", + "transactionHash": "0x9e99f1944f4abe682c10a5ba6eb691c05163cc2f63fdc80a67b48cc736241707", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 124901362, + "transactionHash": "0x9e99f1944f4abe682c10a5ba6eb691c05163cc2f63fdc80a67b48cc736241707", + "address": "0x33c69e5c0a7A2BAD42D178eC11b881aCDbE682a1", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", + "logIndex": 8, + "blockHash": "0x3a3a618e9072388b40a37593cd3cf37ea7488aeb5ff6b4dcc0f609ff3ac98c47" + } + ], + "blockNumber": 124901362, + "cumulativeGasUsed": "5074844", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "6a557ee70d62b80968609ef7922ee609", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"ERC2612ExpiredSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC2612InvalidSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"ERC4626ExceededMaxDeposit\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"ERC4626ExceededMaxMint\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"ERC4626ExceededMaxRedeem\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"ERC4626ExceededMaxWithdraw\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EnforcedPause\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExpectedPause\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentNonce\",\"type\":\"uint256\"}],\"name\":\"InvalidAccountNonce\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRatio\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MathOverflowedMulDiv\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxRewardsTokensExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotFinished\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPausingRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RewardNotListed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Untransferable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRate\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"DistributionFinished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EIP712DomainChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"MarketSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minTime\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"MinTimeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyGrowth\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"PenaltyGrowthSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"penaltyThreshold\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"PenaltyThresholdSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"providerRatio\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"ProviderRatioSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"ProviderSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"refTime\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"RefTimeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"notifier\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RewardAmountNotified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"RewardListed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RewardPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"RewardsDurationSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RewardsWithdrawn\",\"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\":true,\"internalType\":\"address\",\"name\":\"savings\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"SavingsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CLOCK_MODE\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EMERGENCY_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_REWARDS_TOKENS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allRewardsTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"avgIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"avgIndexes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"avgStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"claimable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"claimed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"claimed\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"clock\",\"outputs\":[{\"internalType\":\"uint48\",\"name\":\"\",\"type\":\"uint48\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"earned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"eip712Domain\",\"outputs\":[{\"internalType\":\"bytes1\",\"name\":\"fields\",\"type\":\"bytes1\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"verifyingContract\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"extensions\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"enableReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"excessFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"finishDistribution\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"globalIndex\",\"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\":[],\"name\":\"harvest\",\"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\":[{\"components\":[{\"internalType\":\"contract IERC20\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"refTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"excessFactor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"penaltyGrowth\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"penaltyThreshold\",\"type\":\"uint256\"},{\"internalType\":\"contract Market\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"savings\",\"type\":\"address\"},{\"internalType\":\"uint40\",\"name\":\"duration\",\"type\":\"uint40\"},{\"internalType\":\"uint256\",\"name\":\"providerRatio\",\"type\":\"uint256\"}],\"internalType\":\"struct Parameters\",\"name\":\"p\",\"type\":\"tuple\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"finishAt\",\"type\":\"uint256\"}],\"name\":\"lastTimeRewardApplicable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"market\",\"outputs\":[{\"internalType\":\"contract Market\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"notifyRewardAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyGrowth\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"penaltyThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct Permit\",\"name\":\"p\",\"type\":\"tuple\"}],\"name\":\"permitAndDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"provider\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"providerRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"rawClaimable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"refTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"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\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint40\",\"name\":\"duration\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"finishAt\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"updatedAt\",\"type\":\"uint40\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rewardsTokens\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"saved\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"saved\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"savings\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Market\",\"name\":\"market_\",\"type\":\"address\"}],\"name\":\"setMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minTime_\",\"type\":\"uint256\"}],\"name\":\"setMinTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyGrowth_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyGrowth\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"penaltyThreshold_\",\"type\":\"uint256\"}],\"name\":\"setPenaltyThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"provider_\",\"type\":\"address\"}],\"name\":\"setProvider\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"providerRatio_\",\"type\":\"uint256\"}],\"name\":\"setProviderRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint40\",\"name\":\"duration\",\"type\":\"uint40\"}],\"name\":\"setRewardsDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"savings_\",\"type\":\"address\"}],\"name\":\"setSavings\",\"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\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}],\"AddressEmptyCode(address)\":[{\"details\":\"There's no code at `target` (it is not a contract).\"}],\"AddressInsufficientBalance(address)\":[{\"details\":\"The ETH balance of the account is not enough to perform the operation.\"}],\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC2612ExpiredSignature(uint256)\":[{\"details\":\"Permit deadline has expired.\"}],\"ERC2612InvalidSigner(address,address)\":[{\"details\":\"Mismatched signature.\"}],\"ERC4626ExceededMaxDeposit(address,uint256,uint256)\":[{\"details\":\"Attempted to deposit more assets than the max amount for `receiver`.\"}],\"ERC4626ExceededMaxMint(address,uint256,uint256)\":[{\"details\":\"Attempted to mint more shares than the max amount for `receiver`.\"}],\"ERC4626ExceededMaxRedeem(address,uint256,uint256)\":[{\"details\":\"Attempted to redeem more shares than the max amount for `receiver`.\"}],\"ERC4626ExceededMaxWithdraw(address,uint256,uint256)\":[{\"details\":\"Attempted to withdraw more assets than the max amount for `receiver`.\"}],\"EnforcedPause()\":[{\"details\":\"The operation failed because the contract is paused.\"}],\"ExpectedPause()\":[{\"details\":\"The operation failed because the contract is not paused.\"}],\"FailedInnerCall()\":[{\"details\":\"A call to an address target failed. The target may have reverted.\"}],\"InvalidAccountNonce(address,uint256)\":[{\"details\":\"The nonce used for an `account` is not the expected current nonce.\"}],\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"MathOverflowedMulDiv()\":[{\"details\":\"Muldiv operation overflow.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC20 token failed.\"}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"EIP712DomainChanged()\":{\"details\":\"MAY be emitted to signal that the domain could have changed.\"},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"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.\"},\"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`)\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\"},\"allRewardsTokens()\":{\"returns\":{\"_0\":\"The list of reward tokens.\"}},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"asset()\":{\"details\":\"See {IERC4626-asset}. \"},\"avgIndex(address,address)\":{\"params\":{\"account\":\"The account.\",\"reward\":\"The reward token.\"},\"returns\":{\"_0\":\"The average index.\"}},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"claim(address)\":{\"params\":{\"reward\":\"The reward token.\"}},\"claimable(address,address,uint256)\":{\"params\":{\"account\":\"The account.\",\"reward\":\"The reward token.\",\"shares\":\"The amount of shares of the account involved.\"},\"returns\":{\"_0\":\"The claimable rewards.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"convertToAssets(uint256)\":{\"details\":\"See {IERC4626-convertToAssets}. \"},\"convertToShares(uint256)\":{\"details\":\"See {IERC4626-convertToShares}. \"},\"decimals()\":{\"returns\":{\"_0\":\"The number of decimals.\"}},\"deposit(uint256,address)\":{\"details\":\"See {IERC4626-deposit}. \"},\"earned(address,address,uint256)\":{\"params\":{\"account\":\"The account.\",\"reward\":\"The reward token.\",\"shares\":\"The amount of shares.\"},\"returns\":{\"_0\":\"The earned rewards.\"}},\"eip712Domain()\":{\"details\":\"See {IERC-5267}.\"},\"enableReward(address)\":{\"params\":{\"reward\":\"The reward token.\"}},\"finishDistribution(address)\":{\"params\":{\"reward\":\"The reward token.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"globalIndex(address)\":{\"params\":{\"reward\":\"The reward token.\"},\"returns\":{\"_0\":\"The global index.\"}},\"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.\"},\"harvest()\":{\"details\":\"This function withdraws the maximum allowable assets from the provider's market, calculates the portion to be distributed as rewards based on `providerRatio`, deposits any remaining assets back into savings, and notifies the contract of the new reward amount.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize((address,uint256,uint256,uint256,uint256,uint256,address,address,address,uint40,uint256))\":{\"details\":\"can only be called once.\",\"params\":{\"p\":\"The parameters for initialization.\"}},\"lastTimeRewardApplicable(uint256)\":{\"params\":{\"finishAt\":\"The time when the reward period finishes.\"},\"returns\":{\"_0\":\"The last applicable time.\"}},\"maxDeposit(address)\":{\"details\":\"See {IERC4626-maxDeposit}. \"},\"maxMint(address)\":{\"details\":\"See {IERC4626-maxMint}. \"},\"maxRedeem(address)\":{\"details\":\"See {IERC4626-maxRedeem}. \"},\"maxWithdraw(address)\":{\"details\":\"See {IERC4626-maxWithdraw}. \"},\"mint(uint256,address)\":{\"details\":\"See {IERC4626-mint}. As opposed to {deposit}, minting is allowed even if the vault is in a state where the price of a share is zero. In this case, the shares will be minted without requiring any assets to be deposited.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times.\"},\"notifyRewardAmount(address,uint256)\":{\"params\":{\"amount\":\"The amount of reward tokens.\",\"reward\":\"The reward token.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Sets `value` as the allowance of `spender` over ``owner``'s tokens, given ``owner``'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]. CAUTION: See Security Considerations above.\"},\"permitAndDeposit(uint256,address,(uint256,uint256,uint8,bytes32,bytes32))\":{\"params\":{\"assets\":\"The amount of assets to deposit.\",\"p\":\"The permit parameters.\",\"receiver\":\"The address receiving the deposited assets.\"},\"returns\":{\"_0\":\"The number of shares received.\"}},\"previewDeposit(uint256)\":{\"details\":\"See {IERC4626-previewDeposit}. \"},\"previewMint(uint256)\":{\"details\":\"See {IERC4626-previewMint}. \"},\"previewRedeem(uint256)\":{\"details\":\"See {IERC4626-previewRedeem}. \"},\"previewWithdraw(uint256)\":{\"details\":\"See {IERC4626-previewWithdraw}. \"},\"rawClaimable(address,address,uint256)\":{\"params\":{\"account\":\"The account.\",\"reward\":\"The reward token.\",\"shares\":\"The amount of shares of the account involved.\"},\"returns\":{\"_0\":\"The raw claimable rewards.\"}},\"redeem(uint256,address,address)\":{\"details\":\"See {IERC4626-redeem}. \"},\"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 `callerConfirmation`. 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.\"},\"setMarket(address)\":{\"params\":{\"market_\":\"The new market.\"}},\"setMinTime(uint256)\":{\"params\":{\"minTime_\":\"The new minimum time.\"}},\"setPenaltyGrowth(uint256)\":{\"params\":{\"penaltyGrowth_\":\"The new penalty growth factor.\"}},\"setPenaltyThreshold(uint256)\":{\"params\":{\"penaltyThreshold_\":\"The new penalty threshold.\"}},\"setProvider(address)\":{\"params\":{\"provider_\":\"The new provider address.\"}},\"setProviderRatio(uint256)\":{\"params\":{\"providerRatio_\":\"The new provider ratio.\"}},\"setRewardsDuration(address,uint40)\":{\"details\":\"Can only change the duration if the reward is finished.\",\"params\":{\"duration\":\"The new duration.\",\"reward\":\"The reward token.\"}},\"setSavings(address)\":{\"params\":{\"savings_\":\"The new savings address.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalAssets()\":{\"returns\":{\"_0\":\"The total assets.\"}},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.\"},\"withdraw(uint256,address,address)\":{\"details\":\"See {IERC4626-withdraw}. \"},\"withdrawRewards(address,uint256)\":{\"params\":{\"amount\":\"The amount of reward tokens to withdraw.\",\"reward\":\"The reward token.\"}}},\"title\":\"StakedEXA Contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"CLOCK_MODE()\":{\"notice\":\"Returns the current clock mode of stEXA, as per ERC-6372.\"},\"MAX_REWARDS_TOKENS()\":{\"notice\":\"Maximum amount of rewards token.\"},\"allRewardsTokens()\":{\"notice\":\"Returns all reward tokens.\"},\"avgIndex(address,address)\":{\"notice\":\"Returns the average index for a reward token and account.\"},\"avgIndexes(address,address)\":{\"notice\":\"Accounts average indexes per reward token.\"},\"avgStart(address)\":{\"notice\":\"Average starting time with the tokens staked per account.\"},\"claim(address)\":{\"notice\":\"Claims rewards for a specific reward token.\"},\"claimAll()\":{\"notice\":\"Claims rewards for all reward tokens.\"},\"claimable(address,address,uint256)\":{\"notice\":\"Calculates the claimable rewards for an account.\"},\"claimed(address,address)\":{\"notice\":\"Accounts claimed rewards per reward token.\"},\"clock()\":{\"notice\":\"Returns the current timepoint of stEXA, as per ERC-6372.\"},\"decimals()\":{\"notice\":\"Returns the number of decimals used by the token.\"},\"earned(address,address,uint256)\":{\"notice\":\"Calculates the earned rewards for an account, without considering penalties.\"},\"enableReward(address)\":{\"notice\":\"Enables a new reward token.\"},\"excessFactor()\":{\"notice\":\"Discount factor for excess exposure. Not possible to change after initilization.\"},\"finishDistribution(address)\":{\"notice\":\"Finishes the distribution of a reward token.\"},\"globalIndex(address)\":{\"notice\":\"Returns the global index for a reward token.\"},\"harvest()\":{\"notice\":\"Harvests provider's market assets as rewards to be distributed among stakers.\"},\"initialize((address,uint256,uint256,uint256,uint256,uint256,address,address,address,uint40,uint256))\":{\"notice\":\"Initializes the contract.\"},\"lastTimeRewardApplicable(uint256)\":{\"notice\":\"Returns the last time rewards are applicable.\"},\"market()\":{\"notice\":\"market from which to harvest.\"},\"minTime()\":{\"notice\":\"Minimum time to stake and get rewards.\"},\"notifyRewardAmount(address,uint256)\":{\"notice\":\"Notifies the contract about a reward amount.\"},\"pause()\":{\"notice\":\"Sets the pause state to true in case of emergency, triggered by an authorized account.\"},\"penaltyGrowth()\":{\"notice\":\"Penalty growth factor.\"},\"penaltyThreshold()\":{\"notice\":\"Threshold penalty factor for withdrawing before the reference time.\"},\"permitAndDeposit(uint256,address,(uint256,uint256,uint8,bytes32,bytes32))\":{\"notice\":\"Permits a spender and deposits assets in a single transaction.\"},\"provider()\":{\"notice\":\"provider of rewards when harvesting.\"},\"providerRatio()\":{\"notice\":\"ratio of withdrawn assets to provide when harvesting. The rest goes to savings\"},\"rawClaimable(address,address,uint256)\":{\"notice\":\"Calculates the raw claimable rewards for an account, without considering already claimed rewards.\"},\"refTime()\":{\"notice\":\"Reference period to stake and get full rewards. Not possible to change after initilization.\"},\"rewards(address)\":{\"notice\":\"Rewards data per token.\"},\"rewardsTokens(uint256)\":{\"notice\":\"Rewards tokens.\"},\"saved(address,address)\":{\"notice\":\"Accounts saved rewards per reward token.\"},\"savings()\":{\"notice\":\"savings address to send the rewards.\"},\"setMarket(address)\":{\"notice\":\"Sets the market.\"},\"setMinTime(uint256)\":{\"notice\":\"Sets the minimum time to stake for rewards.\"},\"setPenaltyGrowth(uint256)\":{\"notice\":\"Sets the penalty growth factor.\"},\"setPenaltyThreshold(uint256)\":{\"notice\":\"Sets the penalty threshold.\"},\"setProvider(address)\":{\"notice\":\"Sets the provider address.\"},\"setProviderRatio(uint256)\":{\"notice\":\"Sets the provider ratio.\"},\"setRewardsDuration(address,uint40)\":{\"notice\":\"Sets the rewards duration for a reward token.\"},\"setSavings(address)\":{\"notice\":\"Sets the savings address.\"},\"totalAssets()\":{\"notice\":\"Returns the total assets of the contract.\"},\"unpause()\":{\"notice\":\"Sets the pause state to false when threat is gone, triggered by an authorized account.\"},\"withdrawRewards(address,uint256)\":{\"notice\":\"Withdraws `amount` of `reward` from contract to `savings`.\"}},\"notice\":\"This contract allows users to stake EXA tokens and earn rewards. The rewards are subject to a penalty if the staking duration is not optimal. The optimal staking duration is defined by `refTime`. Staking for a duration less than `minTime` results in no rewards, the closer the staking duration is to `refTime`, the lower the penalty.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/StakedEXA.sol\":\"StakedEXA\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1111},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable-v4/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 {Initializable} from \\\"../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 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 function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_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(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\":\"0xc8710577334e8d0799ae2b2a731b1924a7bddd64319da9787ddd2dc69bdd1ce5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-v4/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-v4/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-v4/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\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\":\"0xad32f6821f860555f9530902a65b54203a4f5db2117f4384ae47a124958078db\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-v4/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-v4/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport {Initializable} from \\\"../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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\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\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-v4/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-v4/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 {Initializable} from \\\"../../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\":\"0xd90d7723512df65ae417adaf0801042940f0dabd60039ceeaffe34aa5b238da1\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-v4/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-v4/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-v4/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/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAccessControl} from \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\nimport {ContextUpgradeable} from \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {ERC165Upgradeable} from \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport {Initializable} from \\\"../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, IAccessControl, ERC165Upgradeable {\\n struct RoleData {\\n mapping(address account => bool) hasRole;\\n bytes32 adminRole;\\n }\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n\\n /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl\\n struct AccessControlStorage {\\n mapping(bytes32 role => RoleData) _roles;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.AccessControl\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800;\\n\\n function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) {\\n assembly {\\n $.slot := AccessControlStorageLocation\\n }\\n }\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with an {AccessControlUnauthorizedAccount} error including the required role.\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_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(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual returns (bool) {\\n AccessControlStorage storage $ = _getAccessControlStorage();\\n return $._roles[role].hasRole[account];\\n }\\n\\n /**\\n * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`\\n * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`\\n * is missing `role`.\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert AccessControlUnauthorizedAccount(account, role);\\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 returns (bytes32) {\\n AccessControlStorage storage $ = _getAccessControlStorage();\\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 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 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 `callerConfirmation`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address callerConfirmation) public virtual {\\n if (callerConfirmation != _msgSender()) {\\n revert AccessControlBadConfirmation();\\n }\\n\\n _revokeRole(role, callerConfirmation);\\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 AccessControlStorage storage $ = _getAccessControlStorage();\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n $._roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual returns (bool) {\\n AccessControlStorage storage $ = _getAccessControlStorage();\\n if (!hasRole(role, account)) {\\n $._roles[role].hasRole[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {\\n AccessControlStorage storage $ = _getAccessControlStorage();\\n if (hasRole(role, account)) {\\n $._roles[role].hasRole[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n return true;\\n } else {\\n return false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6662ec4e5cefca03eeadd073e9469df8d2944bb2ee8ec8f7622c2c46aab5f225\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.20;\\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 Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error InvalidInitialization();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 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 in the context of a constructor an `initializer` may be invoked any\\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\\n * production.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n // Cache values to avoid duplicated sloads\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n\\n // Allowed calls:\\n // - initialSetup: the contract is not in the initializing state and no previous version was\\n // initialized\\n // - construction: the contract is initialized at version 1 (no reininitialization) and the\\n // current contract is just being deployed\\n bool initialSetup = initialized == 0 && isTopLevelCall;\\n bool construction = initialized == 1 && address(this).code.length == 0;\\n\\n if (!initialSetup && !construction) {\\n revert InvalidInitialization();\\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 2**64 - 1 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert InvalidInitialization();\\n }\\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 _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\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 // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert InvalidInitialization();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._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 _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC20Metadata} from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport {ContextUpgradeable} from \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport {IERC20Errors} from \\\"@openzeppelin/contracts/interfaces/draft-IERC6093.sol\\\";\\nimport {Initializable} from \\\"../../proxy/utils/Initializable.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 *\\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 */\\nabstract contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20, IERC20Metadata, IERC20Errors {\\n /// @custom:storage-location erc7201:openzeppelin.storage.ERC20\\n struct ERC20Storage {\\n mapping(address account => uint256) _balances;\\n\\n mapping(address account => mapping(address spender => uint256)) _allowances;\\n\\n uint256 _totalSupply;\\n\\n string _name;\\n string _symbol;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.ERC20\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant ERC20StorageLocation = 0x52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00;\\n\\n function _getERC20Storage() private pure returns (ERC20Storage storage $) {\\n assembly {\\n $.slot := ERC20StorageLocation\\n }\\n }\\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 function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n ERC20Storage storage $ = _getERC20Storage();\\n $._name = name_;\\n $._symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n ERC20Storage storage $ = _getERC20Storage();\\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 returns (string memory) {\\n ERC20Storage storage $ = _getERC20Storage();\\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 returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual returns (uint256) {\\n ERC20Storage storage $ = _getERC20Storage();\\n return $._totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual returns (uint256) {\\n ERC20Storage storage $ = _getERC20Storage();\\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 `value`.\\n */\\n function transfer(address to, uint256 value) public virtual returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, value);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual returns (uint256) {\\n ERC20Storage storage $ = _getERC20Storage();\\n return $._allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `value` 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 value) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, value);\\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 `value`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `value`.\\n */\\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, value);\\n _transfer(from, to, value);\\n return true;\\n }\\n\\n /**\\n * @dev Moves a `value` 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 * NOTE: This function is not virtual, {_update} should be overridden instead.\\n */\\n function _transfer(address from, address to, uint256 value) internal {\\n if (from == address(0)) {\\n revert ERC20InvalidSender(address(0));\\n }\\n if (to == address(0)) {\\n revert ERC20InvalidReceiver(address(0));\\n }\\n _update(from, to, value);\\n }\\n\\n /**\\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\\n * this function.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _update(address from, address to, uint256 value) internal virtual {\\n ERC20Storage storage $ = _getERC20Storage();\\n if (from == address(0)) {\\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\\n $._totalSupply += value;\\n } else {\\n uint256 fromBalance = $._balances[from];\\n if (fromBalance < value) {\\n revert ERC20InsufficientBalance(from, fromBalance, value);\\n }\\n unchecked {\\n // Overflow not possible: value <= fromBalance <= totalSupply.\\n $._balances[from] = fromBalance - value;\\n }\\n }\\n\\n if (to == address(0)) {\\n unchecked {\\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\\n $._totalSupply -= value;\\n }\\n } else {\\n unchecked {\\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\\n $._balances[to] += value;\\n }\\n }\\n\\n emit Transfer(from, to, value);\\n }\\n\\n /**\\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\\n * Relies on the `_update` mechanism\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * NOTE: This function is not virtual, {_update} should be overridden instead.\\n */\\n function _mint(address account, uint256 value) internal {\\n if (account == address(0)) {\\n revert ERC20InvalidReceiver(address(0));\\n }\\n _update(address(0), account, value);\\n }\\n\\n /**\\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\\n * Relies on the `_update` mechanism.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * NOTE: This function is not virtual, {_update} should be overridden instead\\n */\\n function _burn(address account, uint256 value) internal {\\n if (account == address(0)) {\\n revert ERC20InvalidSender(address(0));\\n }\\n _update(account, address(0), value);\\n }\\n\\n /**\\n * @dev Sets `value` 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 * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\\n */\\n function _approve(address owner, address spender, uint256 value) internal {\\n _approve(owner, spender, value, true);\\n }\\n\\n /**\\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\\n *\\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\\n * `Approval` event during `transferFrom` operations.\\n *\\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\\n * true using the following override:\\n * ```\\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\\n * super._approve(owner, spender, value, true);\\n * }\\n * ```\\n *\\n * Requirements are the same as {_approve}.\\n */\\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\\n ERC20Storage storage $ = _getERC20Storage();\\n if (owner == address(0)) {\\n revert ERC20InvalidApprover(address(0));\\n }\\n if (spender == address(0)) {\\n revert ERC20InvalidSpender(address(0));\\n }\\n $._allowances[owner][spender] = value;\\n if (emitEvent) {\\n emit Approval(owner, spender, value);\\n }\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\\n *\\n * Does not update the allowance value in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Does not emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n if (currentAllowance < value) {\\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\\n }\\n unchecked {\\n _approve(owner, spender, currentAllowance - value, false);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9a1766b1921bf91b3e61eb53c7a6e70725254befd4bdcbbcd3af40bd9f66856f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20Permit} from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\\\";\\nimport {ERC20Upgradeable} from \\\"../ERC20Upgradeable.sol\\\";\\nimport {ECDSA} from \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport {EIP712Upgradeable} from \\\"../../../utils/cryptography/EIP712Upgradeable.sol\\\";\\nimport {NoncesUpgradeable} from \\\"../../../utils/NoncesUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation 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 */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20Permit, EIP712Upgradeable, NoncesUpgradeable {\\n bytes32 private constant PERMIT_TYPEHASH =\\n keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");\\n\\n /**\\n * @dev Permit deadline has expired.\\n */\\n error ERC2612ExpiredSignature(uint256 deadline);\\n\\n /**\\n * @dev Mismatched signature.\\n */\\n error ERC2612InvalidSigner(address signer, address owner);\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal onlyInitializing {\\n __EIP712_init_unchained(name, \\\"1\\\");\\n }\\n\\n function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\\n\\n /**\\n * @inheritdoc IERC20Permit\\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 ) public virtual {\\n if (block.timestamp > deadline) {\\n revert ERC2612ExpiredSignature(deadline);\\n }\\n\\n bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSA.recover(hash, v, r, s);\\n if (signer != owner) {\\n revert ERC2612InvalidSigner(signer, owner);\\n }\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @inheritdoc IERC20Permit\\n */\\n function nonces(address owner) public view virtual override(IERC20Permit, NoncesUpgradeable) returns (uint256) {\\n return super.nonces(owner);\\n }\\n\\n /**\\n * @inheritdoc IERC20Permit\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n}\\n\",\"keccak256\":\"0x8a97653aeba40e9f0c2e8df1a1379b29b927b6dc3534040c668e71ad9ae89d88\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC4626Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC4626.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {IERC20Metadata} from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport {ERC20Upgradeable} from \\\"../ERC20Upgradeable.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {IERC4626} from \\\"@openzeppelin/contracts/interfaces/IERC4626.sol\\\";\\nimport {Math} from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport {Initializable} from \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the ERC4626 \\\"Tokenized Vault Standard\\\" as defined in\\n * https://eips.ethereum.org/EIPS/eip-4626[EIP-4626].\\n *\\n * This extension allows the minting and burning of \\\"shares\\\" (represented using the ERC20 inheritance) in exchange for\\n * underlying \\\"assets\\\" through standardized {deposit}, {mint}, {redeem} and {burn} workflows. This contract extends\\n * the ERC20 standard. Any additional extensions included along it would affect the \\\"shares\\\" token represented by this\\n * contract and not the \\\"assets\\\" token which is an independent contract.\\n *\\n * [CAUTION]\\n * ====\\n * In empty (or nearly empty) ERC-4626 vaults, deposits are at high risk of being stolen through frontrunning\\n * with a \\\"donation\\\" to the vault that inflates the price of a share. This is variously known as a donation or inflation\\n * attack and is essentially a problem of slippage. Vault deployers can protect against this attack by making an initial\\n * deposit of a non-trivial amount of the asset, such that price manipulation becomes infeasible. Withdrawals may\\n * similarly be affected by slippage. Users can protect against this attack as well as unexpected slippage in general by\\n * verifying the amount received is as expected, using a wrapper that performs these checks such as\\n * https://github.com/fei-protocol/ERC4626#erc4626router-and-base[ERC4626Router].\\n *\\n * Since v4.9, this implementation uses virtual assets and shares to mitigate that risk. The `_decimalsOffset()`\\n * corresponds to an offset in the decimal representation between the underlying asset's decimals and the vault\\n * decimals. This offset also determines the rate of virtual shares to virtual assets in the vault, which itself\\n * determines the initial exchange rate. While not fully preventing the attack, analysis shows that the default offset\\n * (0) makes it non-profitable, as a result of the value being captured by the virtual shares (out of the attacker's\\n * donation) matching the attacker's expected gains. With a larger offset, the attack becomes orders of magnitude more\\n * expensive than it is profitable. More details about the underlying math can be found\\n * xref:erc4626.adoc#inflation-attack[here].\\n *\\n * The drawback of this approach is that the virtual shares do capture (a very small) part of the value being accrued\\n * to the vault. Also, if the vault experiences losses, the users try to exit the vault, the virtual shares and assets\\n * will cause the first user to exit to experience reduced losses in detriment to the last users that will experience\\n * bigger losses. Developers willing to revert back to the pre-v4.9 behavior just need to override the\\n * `_convertToShares` and `_convertToAssets` functions.\\n *\\n * To learn more, check out our xref:ROOT:erc4626.adoc[ERC-4626 guide].\\n * ====\\n */\\nabstract contract ERC4626Upgradeable is Initializable, ERC20Upgradeable, IERC4626 {\\n using Math for uint256;\\n\\n /// @custom:storage-location erc7201:openzeppelin.storage.ERC4626\\n struct ERC4626Storage {\\n IERC20 _asset;\\n uint8 _underlyingDecimals;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.ERC4626\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant ERC4626StorageLocation = 0x0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00;\\n\\n function _getERC4626Storage() private pure returns (ERC4626Storage storage $) {\\n assembly {\\n $.slot := ERC4626StorageLocation\\n }\\n }\\n\\n /**\\n * @dev Attempted to deposit more assets than the max amount for `receiver`.\\n */\\n error ERC4626ExceededMaxDeposit(address receiver, uint256 assets, uint256 max);\\n\\n /**\\n * @dev Attempted to mint more shares than the max amount for `receiver`.\\n */\\n error ERC4626ExceededMaxMint(address receiver, uint256 shares, uint256 max);\\n\\n /**\\n * @dev Attempted to withdraw more assets than the max amount for `receiver`.\\n */\\n error ERC4626ExceededMaxWithdraw(address owner, uint256 assets, uint256 max);\\n\\n /**\\n * @dev Attempted to redeem more shares than the max amount for `receiver`.\\n */\\n error ERC4626ExceededMaxRedeem(address owner, uint256 shares, uint256 max);\\n\\n /**\\n * @dev Set the underlying asset contract. This must be an ERC20-compatible contract (ERC20 or ERC777).\\n */\\n function __ERC4626_init(IERC20 asset_) internal onlyInitializing {\\n __ERC4626_init_unchained(asset_);\\n }\\n\\n function __ERC4626_init_unchained(IERC20 asset_) internal onlyInitializing {\\n ERC4626Storage storage $ = _getERC4626Storage();\\n (bool success, uint8 assetDecimals) = _tryGetAssetDecimals(asset_);\\n $._underlyingDecimals = success ? assetDecimals : 18;\\n $._asset = asset_;\\n }\\n\\n /**\\n * @dev Attempts to fetch the asset decimals. A return value of false indicates that the attempt failed in some way.\\n */\\n function _tryGetAssetDecimals(IERC20 asset_) private view returns (bool, uint8) {\\n (bool success, bytes memory encodedDecimals) = address(asset_).staticcall(\\n abi.encodeCall(IERC20Metadata.decimals, ())\\n );\\n if (success && encodedDecimals.length >= 32) {\\n uint256 returnedDecimals = abi.decode(encodedDecimals, (uint256));\\n if (returnedDecimals <= type(uint8).max) {\\n return (true, uint8(returnedDecimals));\\n }\\n }\\n return (false, 0);\\n }\\n\\n /**\\n * @dev Decimals are computed by adding the decimal offset on top of the underlying asset's decimals. This\\n * \\\"original\\\" value is cached during construction of the vault contract. If this read operation fails (e.g., the\\n * asset has not been created yet), a default of 18 is used to represent the underlying asset's decimals.\\n *\\n * See {IERC20Metadata-decimals}.\\n */\\n function decimals() public view virtual override(IERC20Metadata, ERC20Upgradeable) returns (uint8) {\\n ERC4626Storage storage $ = _getERC4626Storage();\\n return $._underlyingDecimals + _decimalsOffset();\\n }\\n\\n /** @dev See {IERC4626-asset}. */\\n function asset() public view virtual returns (address) {\\n ERC4626Storage storage $ = _getERC4626Storage();\\n return address($._asset);\\n }\\n\\n /** @dev See {IERC4626-totalAssets}. */\\n function totalAssets() public view virtual returns (uint256) {\\n ERC4626Storage storage $ = _getERC4626Storage();\\n return $._asset.balanceOf(address(this));\\n }\\n\\n /** @dev See {IERC4626-convertToShares}. */\\n function convertToShares(uint256 assets) public view virtual returns (uint256) {\\n return _convertToShares(assets, Math.Rounding.Floor);\\n }\\n\\n /** @dev See {IERC4626-convertToAssets}. */\\n function convertToAssets(uint256 shares) public view virtual returns (uint256) {\\n return _convertToAssets(shares, Math.Rounding.Floor);\\n }\\n\\n /** @dev See {IERC4626-maxDeposit}. */\\n function maxDeposit(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n /** @dev See {IERC4626-maxMint}. */\\n function maxMint(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n /** @dev See {IERC4626-maxWithdraw}. */\\n function maxWithdraw(address owner) public view virtual returns (uint256) {\\n return _convertToAssets(balanceOf(owner), Math.Rounding.Floor);\\n }\\n\\n /** @dev See {IERC4626-maxRedeem}. */\\n function maxRedeem(address owner) public view virtual returns (uint256) {\\n return balanceOf(owner);\\n }\\n\\n /** @dev See {IERC4626-previewDeposit}. */\\n function previewDeposit(uint256 assets) public view virtual returns (uint256) {\\n return _convertToShares(assets, Math.Rounding.Floor);\\n }\\n\\n /** @dev See {IERC4626-previewMint}. */\\n function previewMint(uint256 shares) public view virtual returns (uint256) {\\n return _convertToAssets(shares, Math.Rounding.Ceil);\\n }\\n\\n /** @dev See {IERC4626-previewWithdraw}. */\\n function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\\n return _convertToShares(assets, Math.Rounding.Ceil);\\n }\\n\\n /** @dev See {IERC4626-previewRedeem}. */\\n function previewRedeem(uint256 shares) public view virtual returns (uint256) {\\n return _convertToAssets(shares, Math.Rounding.Floor);\\n }\\n\\n /** @dev See {IERC4626-deposit}. */\\n function deposit(uint256 assets, address receiver) public virtual returns (uint256) {\\n uint256 maxAssets = maxDeposit(receiver);\\n if (assets > maxAssets) {\\n revert ERC4626ExceededMaxDeposit(receiver, assets, maxAssets);\\n }\\n\\n uint256 shares = previewDeposit(assets);\\n _deposit(_msgSender(), receiver, assets, shares);\\n\\n return shares;\\n }\\n\\n /** @dev See {IERC4626-mint}.\\n *\\n * As opposed to {deposit}, minting is allowed even if the vault is in a state where the price of a share is zero.\\n * In this case, the shares will be minted without requiring any assets to be deposited.\\n */\\n function mint(uint256 shares, address receiver) public virtual returns (uint256) {\\n uint256 maxShares = maxMint(receiver);\\n if (shares > maxShares) {\\n revert ERC4626ExceededMaxMint(receiver, shares, maxShares);\\n }\\n\\n uint256 assets = previewMint(shares);\\n _deposit(_msgSender(), receiver, assets, shares);\\n\\n return assets;\\n }\\n\\n /** @dev See {IERC4626-withdraw}. */\\n function withdraw(uint256 assets, address receiver, address owner) public virtual returns (uint256) {\\n uint256 maxAssets = maxWithdraw(owner);\\n if (assets > maxAssets) {\\n revert ERC4626ExceededMaxWithdraw(owner, assets, maxAssets);\\n }\\n\\n uint256 shares = previewWithdraw(assets);\\n _withdraw(_msgSender(), receiver, owner, assets, shares);\\n\\n return shares;\\n }\\n\\n /** @dev See {IERC4626-redeem}. */\\n function redeem(uint256 shares, address receiver, address owner) public virtual returns (uint256) {\\n uint256 maxShares = maxRedeem(owner);\\n if (shares > maxShares) {\\n revert ERC4626ExceededMaxRedeem(owner, shares, maxShares);\\n }\\n\\n uint256 assets = previewRedeem(shares);\\n _withdraw(_msgSender(), receiver, owner, assets, shares);\\n\\n return assets;\\n }\\n\\n /**\\n * @dev Internal conversion function (from assets to shares) with support for rounding direction.\\n */\\n function _convertToShares(uint256 assets, Math.Rounding rounding) internal view virtual returns (uint256) {\\n return assets.mulDiv(totalSupply() + 10 ** _decimalsOffset(), totalAssets() + 1, rounding);\\n }\\n\\n /**\\n * @dev Internal conversion function (from shares to assets) with support for rounding direction.\\n */\\n function _convertToAssets(uint256 shares, Math.Rounding rounding) internal view virtual returns (uint256) {\\n return shares.mulDiv(totalAssets() + 1, totalSupply() + 10 ** _decimalsOffset(), rounding);\\n }\\n\\n /**\\n * @dev Deposit/mint common workflow.\\n */\\n function _deposit(address caller, address receiver, uint256 assets, uint256 shares) internal virtual {\\n ERC4626Storage storage $ = _getERC4626Storage();\\n // If _asset is ERC777, `transferFrom` can trigger a reentrancy BEFORE the transfer happens through the\\n // `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer,\\n // calls the vault, which is assumed not malicious.\\n //\\n // Conclusion: we need to do the transfer before we mint so that any reentrancy would happen before the\\n // assets are transferred and before the shares are minted, which is a valid state.\\n // slither-disable-next-line reentrancy-no-eth\\n SafeERC20.safeTransferFrom($._asset, caller, address(this), assets);\\n _mint(receiver, shares);\\n\\n emit Deposit(caller, receiver, assets, shares);\\n }\\n\\n /**\\n * @dev Withdraw/redeem common workflow.\\n */\\n function _withdraw(\\n address caller,\\n address receiver,\\n address owner,\\n uint256 assets,\\n uint256 shares\\n ) internal virtual {\\n ERC4626Storage storage $ = _getERC4626Storage();\\n if (caller != owner) {\\n _spendAllowance(owner, caller, shares);\\n }\\n\\n // If _asset is ERC777, `transfer` can trigger a reentrancy AFTER the transfer happens through the\\n // `tokensReceived` hook. On the other hand, the `tokensToSend` hook, that is triggered before the transfer,\\n // calls the vault, which is assumed not malicious.\\n //\\n // Conclusion: we need to do the transfer after the burn so that any reentrancy would happen after the\\n // shares are burned and after the assets are transferred, which is a valid state.\\n _burn(owner, shares);\\n SafeERC20.safeTransfer($._asset, receiver, assets);\\n\\n emit Withdraw(caller, receiver, owner, assets, shares);\\n }\\n\\n function _decimalsOffset() internal view virtual returns (uint8) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0x965c2122f57aa6b11e715d089065310dc72d757a873a4c68a171950853fddbc1\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\nimport {Initializable} from \\\"../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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)\\npragma solidity ^0.8.20;\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides tracking nonces for addresses. Nonces will only increment.\\n */\\nabstract contract NoncesUpgradeable is Initializable {\\n /**\\n * @dev The nonce used for an `account` is not the expected current nonce.\\n */\\n error InvalidAccountNonce(address account, uint256 currentNonce);\\n\\n /// @custom:storage-location erc7201:openzeppelin.storage.Nonces\\n struct NoncesStorage {\\n mapping(address account => uint256) _nonces;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Nonces\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant NoncesStorageLocation = 0x5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00;\\n\\n function _getNoncesStorage() private pure returns (NoncesStorage storage $) {\\n assembly {\\n $.slot := NoncesStorageLocation\\n }\\n }\\n\\n function __Nonces_init() internal onlyInitializing {\\n }\\n\\n function __Nonces_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev Returns the next unused nonce for an address.\\n */\\n function nonces(address owner) public view virtual returns (uint256) {\\n NoncesStorage storage $ = _getNoncesStorage();\\n return $._nonces[owner];\\n }\\n\\n /**\\n * @dev Consumes a nonce.\\n *\\n * Returns the current value and increments nonce.\\n */\\n function _useNonce(address owner) internal virtual returns (uint256) {\\n NoncesStorage storage $ = _getNoncesStorage();\\n // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be\\n // decremented or reset. This guarantees that the nonce never overflows.\\n unchecked {\\n // It is important to do x++ and not ++x here.\\n return $._nonces[owner]++;\\n }\\n }\\n\\n /**\\n * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.\\n */\\n function _useCheckedNonce(address owner, uint256 nonce) internal virtual {\\n uint256 current = _useNonce(owner);\\n if (nonce != current) {\\n revert InvalidAccountNonce(owner, current);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x778f4a1546a1c6c726ecc8e2348a2789690fb8f26e12bd9d89537669167b79a4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {ContextUpgradeable} from \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /// @custom:storage-location erc7201:openzeppelin.storage.Pausable\\n struct PausableStorage {\\n bool _paused;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Pausable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300;\\n\\n function _getPausableStorage() private pure returns (PausableStorage storage $) {\\n assembly {\\n $.slot := PausableStorageLocation\\n }\\n }\\n\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n /**\\n * @dev The operation failed because the contract is paused.\\n */\\n error EnforcedPause();\\n\\n /**\\n * @dev The operation failed because the contract is not paused.\\n */\\n error ExpectedPause();\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n PausableStorage storage $ = _getPausableStorage();\\n $._paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n PausableStorage storage $ = _getPausableStorage();\\n return $._paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n if (paused()) {\\n revert EnforcedPause();\\n }\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n if (!paused()) {\\n revert ExpectedPause();\\n }\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n PausableStorage storage $ = _getPausableStorage();\\n $._paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n PausableStorage storage $ = _getPausableStorage();\\n $._paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x92915b7f7f642c6be3f65bfd1522feb5d5b6ef25f755f4dbb51df32c868f2f97\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {MessageHashUtils} from \\\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\\\";\\nimport {IERC5267} from \\\"@openzeppelin/contracts/interfaces/IERC5267.sol\\\";\\nimport {Initializable} from \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\\n */\\nabstract contract EIP712Upgradeable is Initializable, IERC5267 {\\n bytes32 private constant TYPE_HASH =\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /// @custom:storage-location erc7201:openzeppelin.storage.EIP712\\n struct EIP712Storage {\\n /// @custom:oz-renamed-from _HASHED_NAME\\n bytes32 _hashedName;\\n /// @custom:oz-renamed-from _HASHED_VERSION\\n bytes32 _hashedVersion;\\n\\n string _name;\\n string _version;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.EIP712\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100;\\n\\n function _getEIP712Storage() private pure returns (EIP712Storage storage $) {\\n assembly {\\n $.slot := EIP712StorageLocation\\n }\\n }\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n EIP712Storage storage $ = _getEIP712Storage();\\n $._name = name;\\n $._version = version;\\n\\n // Reset prior values in storage if upgrading\\n $._hashedName = 0;\\n $._hashedVersion = 0;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator();\\n }\\n\\n function _buildDomainSeparator() private view returns (bytes32) {\\n return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev See {IERC-5267}.\\n */\\n function eip712Domain()\\n public\\n view\\n virtual\\n returns (\\n bytes1 fields,\\n string memory name,\\n string memory version,\\n uint256 chainId,\\n address verifyingContract,\\n bytes32 salt,\\n uint256[] memory extensions\\n )\\n {\\n EIP712Storage storage $ = _getEIP712Storage();\\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\\n // and the EIP712 domain is not reliable, as it will be missing name and version.\\n require($._hashedName == 0 && $._hashedVersion == 0, \\\"EIP712: Uninitialized\\\");\\n\\n return (\\n hex\\\"0f\\\", // 01111\\n _EIP712Name(),\\n _EIP712Version(),\\n block.chainid,\\n address(this),\\n bytes32(0),\\n new uint256[](0)\\n );\\n }\\n\\n /**\\n * @dev The name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712Name() internal view virtual returns (string memory) {\\n EIP712Storage storage $ = _getEIP712Storage();\\n return $._name;\\n }\\n\\n /**\\n * @dev The version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712Version() internal view virtual returns (string memory) {\\n EIP712Storage storage $ = _getEIP712Storage();\\n return $._version;\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\\n */\\n function _EIP712NameHash() internal view returns (bytes32) {\\n EIP712Storage storage $ = _getEIP712Storage();\\n string memory name = _EIP712Name();\\n if (bytes(name).length > 0) {\\n return keccak256(bytes(name));\\n } else {\\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\\n bytes32 hashedName = $._hashedName;\\n if (hashedName != 0) {\\n return hashedName;\\n } else {\\n return keccak256(\\\"\\\");\\n }\\n }\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\\n */\\n function _EIP712VersionHash() internal view returns (bytes32) {\\n EIP712Storage storage $ = _getEIP712Storage();\\n string memory version = _EIP712Version();\\n if (bytes(version).length > 0) {\\n return keccak256(bytes(version));\\n } else {\\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\\n bytes32 hashedVersion = $._hashedVersion;\\n if (hashedVersion != 0) {\\n return hashedVersion;\\n } else {\\n return keccak256(\\\"\\\");\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x85462422a22578744581e012e9aa0a391958cb360288b0b63f29bf0431d70327\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC165} from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport {Initializable} from \\\"../../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 */\\nabstract contract ERC165Upgradeable is Initializable, IERC165 {\\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 returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xdaba3f7c42c55b2896353f32bd27d4d5f8bae741b3b05d4c53f67abc4dc47ce8\",\"license\":\"MIT\"},\"@openzeppelin/contracts-v4/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-v4/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/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev The `account` is missing a role.\\n */\\n error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);\\n\\n /**\\n * @dev The caller of a function is not the expected one.\\n *\\n * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\\n */\\n error AccessControlBadConfirmation();\\n\\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 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 `callerConfirmation`.\\n */\\n function renounceRole(bytes32 role, address callerConfirmation) external;\\n}\\n\",\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4626.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\nimport {IERC20Metadata} from \\\"../token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\n/**\\n * @dev Interface of the ERC4626 \\\"Tokenized Vault Standard\\\", as defined in\\n * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].\\n */\\ninterface IERC4626 is IERC20, IERC20Metadata {\\n event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed sender,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /**\\n * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.\\n *\\n * - MUST be an ERC-20 token contract.\\n * - MUST NOT revert.\\n */\\n function asset() external view returns (address assetTokenAddress);\\n\\n /**\\n * @dev Returns the total amount of the underlying asset that is \\u201cmanaged\\u201d by Vault.\\n *\\n * - SHOULD include any compounding that occurs from yield.\\n * - MUST be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT revert.\\n */\\n function totalAssets() external view returns (uint256 totalManagedAssets);\\n\\n /**\\n * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal\\n * scenario where all the conditions are met.\\n *\\n * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT show any variations depending on the caller.\\n * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\\n * - MUST NOT revert.\\n *\\n * NOTE: This calculation MAY NOT reflect the \\u201cper-user\\u201d price-per-share, and instead should reflect the\\n * \\u201caverage-user\\u2019s\\u201d price-per-share, meaning what the average user should expect to see when exchanging to and\\n * from.\\n */\\n function convertToShares(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal\\n * scenario where all the conditions are met.\\n *\\n * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT show any variations depending on the caller.\\n * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\\n * - MUST NOT revert.\\n *\\n * NOTE: This calculation MAY NOT reflect the \\u201cper-user\\u201d price-per-share, and instead should reflect the\\n * \\u201caverage-user\\u2019s\\u201d price-per-share, meaning what the average user should expect to see when exchanging to and\\n * from.\\n */\\n function convertToAssets(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,\\n * through a deposit call.\\n *\\n * - MUST return a limited value if receiver is subject to some deposit limit.\\n * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.\\n * - MUST NOT revert.\\n */\\n function maxDeposit(address receiver) external view returns (uint256 maxAssets);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given\\n * current on-chain conditions.\\n *\\n * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit\\n * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called\\n * in the same transaction.\\n * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the\\n * deposit would be accepted, regardless if the user has enough tokens approved, etc.\\n * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by depositing.\\n */\\n function previewDeposit(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.\\n *\\n * - MUST emit the Deposit event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * deposit execution, and are accounted for during deposit.\\n * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not\\n * approving enough underlying tokens to the Vault contract, etc).\\n *\\n * NOTE: most implementations will require pre-approval of the Vault with the Vault\\u2019s underlying asset token.\\n */\\n function deposit(uint256 assets, address receiver) external returns (uint256 shares);\\n\\n /**\\n * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.\\n * - MUST return a limited value if receiver is subject to some mint limit.\\n * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.\\n * - MUST NOT revert.\\n */\\n function maxMint(address receiver) external view returns (uint256 maxShares);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given\\n * current on-chain conditions.\\n *\\n * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call\\n * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the\\n * same transaction.\\n * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint\\n * would be accepted, regardless if the user has enough tokens approved, etc.\\n * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by minting.\\n */\\n function previewMint(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.\\n *\\n * - MUST emit the Deposit event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint\\n * execution, and are accounted for during mint.\\n * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not\\n * approving enough underlying tokens to the Vault contract, etc).\\n *\\n * NOTE: most implementations will require pre-approval of the Vault with the Vault\\u2019s underlying asset token.\\n */\\n function mint(uint256 shares, address receiver) external returns (uint256 assets);\\n\\n /**\\n * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the\\n * Vault, through a withdraw call.\\n *\\n * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\\n * - MUST NOT revert.\\n */\\n function maxWithdraw(address owner) external view returns (uint256 maxAssets);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,\\n * given current on-chain conditions.\\n *\\n * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw\\n * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if\\n * called\\n * in the same transaction.\\n * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though\\n * the withdrawal would be accepted, regardless if the user has enough shares, etc.\\n * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by depositing.\\n */\\n function previewWithdraw(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.\\n *\\n * - MUST emit the Withdraw event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * withdraw execution, and are accounted for during withdraw.\\n * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner\\n * not having enough shares, etc).\\n *\\n * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\\n * Those methods should be performed separately.\\n */\\n function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);\\n\\n /**\\n * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,\\n * through a redeem call.\\n *\\n * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\\n * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.\\n * - MUST NOT revert.\\n */\\n function maxRedeem(address owner) external view returns (uint256 maxShares);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,\\n * given current on-chain conditions.\\n *\\n * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call\\n * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the\\n * same transaction.\\n * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the\\n * redemption would be accepted, regardless if the user has enough shares, etc.\\n * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by redeeming.\\n */\\n function previewRedeem(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.\\n *\\n * - MUST emit the Withdraw event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * redeem execution, and are accounted for during redeem.\\n * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner\\n * not having enough shares, etc).\\n *\\n * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\\n * Those methods should be performed separately.\\n */\\n function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);\\n}\\n\",\"keccak256\":\"0x207f64371bc0fcc5be86713aa5da109a870cc3a6da50e93b64ee881e369b593d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC5267.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\\n\\npragma solidity ^0.8.20;\\n\\ninterface IERC5267 {\\n /**\\n * @dev MAY be emitted to signal that the domain could have changed.\\n */\\n event EIP712DomainChanged();\\n\\n /**\\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\\n * signature.\\n */\\n function eip712Domain()\\n external\\n view\\n returns (\\n bytes1 fields,\\n string memory name,\\n string memory version,\\n uint256 chainId,\\n address verifyingContract,\\n bytes32 salt,\\n uint256[] memory extensions\\n );\\n}\\n\",\"keccak256\":\"0x92aa1df62dc3d33f1656d63bede0923e0df0b706ad4137c8b10b0a8fe549fd92\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC6372.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC6372.sol)\\n\\npragma solidity ^0.8.20;\\n\\ninterface IERC6372 {\\n /**\\n * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).\\n */\\n function clock() external view returns (uint48);\\n\\n /**\\n * @dev Description of the clock\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function CLOCK_MODE() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xeb2857b7dafb7e0d8526dbfe794e6c047df2851c9e6ee91dc4a55f3c34af5d33\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard ERC20 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\\n */\\ninterface IERC20Errors {\\n /**\\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param balance Current balance for the interacting account.\\n * @param needed Minimum amount required to perform a transfer.\\n */\\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC20InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC20InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\\n * @param spender Address that may be allowed to operate on tokens without being their owner.\\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\\n * @param needed Minimum amount required to perform a transfer.\\n */\\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC20InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\\n * @param spender Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC20InvalidSpender(address spender);\\n}\\n\\n/**\\n * @dev Standard ERC721 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\\n */\\ninterface IERC721Errors {\\n /**\\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\\n * Used in balance queries.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC721InvalidOwner(address owner);\\n\\n /**\\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC721NonexistentToken(uint256 tokenId);\\n\\n /**\\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param tokenId Identifier number of a token.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC721InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC721InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC721InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC721InvalidOperator(address operator);\\n}\\n\\n/**\\n * @dev Standard ERC1155 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\\n */\\ninterface IERC1155Errors {\\n /**\\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param balance Current balance for the interacting account.\\n * @param needed Minimum amount required to perform a transfer.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC1155InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC1155InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC1155MissingApprovalForAll(address operator, address owner);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC1155InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC1155InvalidOperator(address operator);\\n\\n /**\\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\\n * Used in batch transfers.\\n * @param idsLength Length of the array of token identifiers\\n * @param valuesLength Length of the array of token amounts\\n */\\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\\n}\\n\",\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\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 value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens as the allowance of `spender` over the\\n * 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 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` 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 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\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\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.20;\\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 *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\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 * CAUTION: See Security Considerations above.\\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\":\"0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC20Permit} from \\\"../extensions/IERC20Permit.sol\\\";\\nimport {Address} from \\\"../../../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 An operation with an ERC20 token failed.\\n */\\n error SafeERC20FailedOperation(address token);\\n\\n /**\\n * @dev Indicates a failed `decreaseAllowance` request.\\n */\\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\\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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, 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 forceApprove(token, spender, oldAllowance + value);\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\\n * value, non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\\n unchecked {\\n uint256 currentAllowance = token.allowance(address(this), spender);\\n if (currentAllowance < requestedDecrease) {\\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\\n }\\n forceApprove(token, spender, currentAllowance - requestedDecrease);\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data);\\n if (returndata.length != 0 && !abi.decode(returndata, (bool))) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * 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 success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;\\n }\\n}\\n\",\"keccak256\":\"0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev The ETH balance of the account is not enough to perform the operation.\\n */\\n error AddressInsufficientBalance(address account);\\n\\n /**\\n * @dev There's no code at `target` (it is not a contract).\\n */\\n error AddressEmptyCode(address target);\\n\\n /**\\n * @dev A call to an address target failed. The target may have reverted.\\n */\\n error FailedInnerCall();\\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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n if (address(this).balance < amount) {\\n revert AddressInsufficientBalance(address(this));\\n }\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n if (!success) {\\n revert FailedInnerCall();\\n }\\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 or custom error, it is bubbled\\n * up by this function (like regular Solidity function calls). However, if\\n * the call reverted with no returned reason, this function reverts with a\\n * {FailedInnerCall} error.\\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 function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0);\\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 function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n if (address(this).balance < value) {\\n revert AddressInsufficientBalance(address(this));\\n }\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\\n * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an\\n * unsuccessful call.\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata\\n ) internal view returns (bytes memory) {\\n if (!success) {\\n _revert(returndata);\\n } else {\\n // only check if target is a contract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n if (returndata.length == 0 && target.code.length == 0) {\\n revert AddressEmptyCode(target);\\n }\\n return returndata;\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\\n * revert reason or with a default {FailedInnerCall} error.\\n */\\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\\n if (!success) {\\n _revert(returndata);\\n } else {\\n return returndata;\\n }\\n }\\n\\n /**\\n * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.\\n */\\n function _revert(bytes memory returndata) 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 FailedInnerCall();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\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 = Math.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), HEX_DIGITS))\\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 toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.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, Math.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 uint256 localValue = value;\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\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\\n * 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS\\n }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS, s);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Strings} from \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\\n *\\n * The library provides methods for generating a hash of a message that conforms to the\\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\\n * specifications.\\n */\\nlibrary MessageHashUtils {\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing a bytes32 `messageHash` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\"` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\\n * keccak256, although any bytes32 value can be safely used because the final digest will\\n * be re-hashed.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\") // 32 is the bytes-length of messageHash\\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\\n }\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x45` (`personal_sign` messages).\\n *\\n * The digest is calculated by prefixing an arbitrary `message` with\\n * `\\\"\\\\x19Ethereum Signed Message:\\\\n\\\" + len(message)` and hashing the result. It corresponds with the\\n * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\\n return\\n keccak256(bytes.concat(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", bytes(Strings.toString(message.length)), message));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-191 signed data with version\\n * `0x00` (data with intended validator).\\n *\\n * The digest is calculated by prefixing an arbitrary `data` with `\\\"\\\\x19\\\\x00\\\"` and the intended\\n * `validator` address. Then hashing the result.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(hex\\\"19_00\\\", validator, data));\\n }\\n\\n /**\\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\\n *\\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\\n * `\\\\x19\\\\x01` and hashing the result. It corresponds to the hash signed by the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\\n *\\n * See {ECDSA-recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, hex\\\"19_01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n digest := keccak256(ptr, 0x42)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\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 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 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 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 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 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 towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\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\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * 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 = x * y; // 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 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 if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\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.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\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\\n // works 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 (unsignedRoundsUp(rounding) && 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\\n * towards zero.\\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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.20;\\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 */\\nlibrary SafeCast {\\n /**\\n * @dev Value doesn't fit in an uint of `bits` size.\\n */\\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\\n\\n /**\\n * @dev An int value doesn't fit in an uint of `bits` size.\\n */\\n error SafeCastOverflowedIntToUint(int256 value);\\n\\n /**\\n * @dev Value doesn't fit in an int of `bits` size.\\n */\\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\\n\\n /**\\n * @dev An uint value doesn't fit in an int of `bits` size.\\n */\\n error SafeCastOverflowedUintToInt(uint256 value);\\n\\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 function toUint248(uint256 value) internal pure returns (uint248) {\\n if (value > type(uint248).max) {\\n revert SafeCastOverflowedUintDowncast(248, value);\\n }\\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 function toUint240(uint256 value) internal pure returns (uint240) {\\n if (value > type(uint240).max) {\\n revert SafeCastOverflowedUintDowncast(240, value);\\n }\\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 function toUint232(uint256 value) internal pure returns (uint232) {\\n if (value > type(uint232).max) {\\n revert SafeCastOverflowedUintDowncast(232, value);\\n }\\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 function toUint224(uint256 value) internal pure returns (uint224) {\\n if (value > type(uint224).max) {\\n revert SafeCastOverflowedUintDowncast(224, value);\\n }\\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 function toUint216(uint256 value) internal pure returns (uint216) {\\n if (value > type(uint216).max) {\\n revert SafeCastOverflowedUintDowncast(216, value);\\n }\\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 function toUint208(uint256 value) internal pure returns (uint208) {\\n if (value > type(uint208).max) {\\n revert SafeCastOverflowedUintDowncast(208, value);\\n }\\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 function toUint200(uint256 value) internal pure returns (uint200) {\\n if (value > type(uint200).max) {\\n revert SafeCastOverflowedUintDowncast(200, value);\\n }\\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 function toUint192(uint256 value) internal pure returns (uint192) {\\n if (value > type(uint192).max) {\\n revert SafeCastOverflowedUintDowncast(192, value);\\n }\\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 function toUint184(uint256 value) internal pure returns (uint184) {\\n if (value > type(uint184).max) {\\n revert SafeCastOverflowedUintDowncast(184, value);\\n }\\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 function toUint176(uint256 value) internal pure returns (uint176) {\\n if (value > type(uint176).max) {\\n revert SafeCastOverflowedUintDowncast(176, value);\\n }\\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 function toUint168(uint256 value) internal pure returns (uint168) {\\n if (value > type(uint168).max) {\\n revert SafeCastOverflowedUintDowncast(168, value);\\n }\\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 function toUint160(uint256 value) internal pure returns (uint160) {\\n if (value > type(uint160).max) {\\n revert SafeCastOverflowedUintDowncast(160, value);\\n }\\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 function toUint152(uint256 value) internal pure returns (uint152) {\\n if (value > type(uint152).max) {\\n revert SafeCastOverflowedUintDowncast(152, value);\\n }\\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 function toUint144(uint256 value) internal pure returns (uint144) {\\n if (value > type(uint144).max) {\\n revert SafeCastOverflowedUintDowncast(144, value);\\n }\\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 function toUint136(uint256 value) internal pure returns (uint136) {\\n if (value > type(uint136).max) {\\n revert SafeCastOverflowedUintDowncast(136, value);\\n }\\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 function toUint128(uint256 value) internal pure returns (uint128) {\\n if (value > type(uint128).max) {\\n revert SafeCastOverflowedUintDowncast(128, value);\\n }\\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 function toUint120(uint256 value) internal pure returns (uint120) {\\n if (value > type(uint120).max) {\\n revert SafeCastOverflowedUintDowncast(120, value);\\n }\\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 function toUint112(uint256 value) internal pure returns (uint112) {\\n if (value > type(uint112).max) {\\n revert SafeCastOverflowedUintDowncast(112, value);\\n }\\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 function toUint104(uint256 value) internal pure returns (uint104) {\\n if (value > type(uint104).max) {\\n revert SafeCastOverflowedUintDowncast(104, value);\\n }\\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 function toUint96(uint256 value) internal pure returns (uint96) {\\n if (value > type(uint96).max) {\\n revert SafeCastOverflowedUintDowncast(96, value);\\n }\\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 function toUint88(uint256 value) internal pure returns (uint88) {\\n if (value > type(uint88).max) {\\n revert SafeCastOverflowedUintDowncast(88, value);\\n }\\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 function toUint80(uint256 value) internal pure returns (uint80) {\\n if (value > type(uint80).max) {\\n revert SafeCastOverflowedUintDowncast(80, value);\\n }\\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 function toUint72(uint256 value) internal pure returns (uint72) {\\n if (value > type(uint72).max) {\\n revert SafeCastOverflowedUintDowncast(72, value);\\n }\\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 function toUint64(uint256 value) internal pure returns (uint64) {\\n if (value > type(uint64).max) {\\n revert SafeCastOverflowedUintDowncast(64, value);\\n }\\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 function toUint56(uint256 value) internal pure returns (uint56) {\\n if (value > type(uint56).max) {\\n revert SafeCastOverflowedUintDowncast(56, value);\\n }\\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 function toUint48(uint256 value) internal pure returns (uint48) {\\n if (value > type(uint48).max) {\\n revert SafeCastOverflowedUintDowncast(48, value);\\n }\\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 function toUint40(uint256 value) internal pure returns (uint40) {\\n if (value > type(uint40).max) {\\n revert SafeCastOverflowedUintDowncast(40, value);\\n }\\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 function toUint32(uint256 value) internal pure returns (uint32) {\\n if (value > type(uint32).max) {\\n revert SafeCastOverflowedUintDowncast(32, value);\\n }\\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 function toUint24(uint256 value) internal pure returns (uint24) {\\n if (value > type(uint24).max) {\\n revert SafeCastOverflowedUintDowncast(24, value);\\n }\\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 function toUint16(uint256 value) internal pure returns (uint16) {\\n if (value > type(uint16).max) {\\n revert SafeCastOverflowedUintDowncast(16, value);\\n }\\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 function toUint8(uint256 value) internal pure returns (uint8) {\\n if (value > type(uint8).max) {\\n revert SafeCastOverflowedUintDowncast(8, value);\\n }\\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 function toUint256(int256 value) internal pure returns (uint256) {\\n if (value < 0) {\\n revert SafeCastOverflowedIntToUint(value);\\n }\\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 function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(248, value);\\n }\\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 function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(240, value);\\n }\\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 function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(232, value);\\n }\\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 function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(224, value);\\n }\\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 function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(216, value);\\n }\\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 function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(208, value);\\n }\\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 function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(200, value);\\n }\\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 function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(192, value);\\n }\\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 function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(184, value);\\n }\\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 function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(176, value);\\n }\\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 function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(168, value);\\n }\\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 function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(160, value);\\n }\\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 function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(152, value);\\n }\\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 function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(144, value);\\n }\\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 function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(136, value);\\n }\\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 function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(128, value);\\n }\\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 function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(120, value);\\n }\\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 function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(112, value);\\n }\\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 function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(104, value);\\n }\\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 function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(96, value);\\n }\\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 function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(88, value);\\n }\\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 function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(80, value);\\n }\\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 function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(72, value);\\n }\\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 function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(64, value);\\n }\\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 function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(56, value);\\n }\\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 function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(48, value);\\n }\\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 function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(40, value);\\n }\\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 function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(32, value);\\n }\\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 function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(24, value);\\n }\\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 function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(16, value);\\n }\\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 function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(8, value);\\n }\\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 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 if (value > uint256(type(int256).max)) {\\n revert SafeCastOverflowedUintToInt(value);\\n }\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0xe19a4d5f31d2861e7344e8e535e2feafb913d806d3e2b5fe7782741a2a7094fe\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\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\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"contracts/Auditor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract Auditor is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n\\n /// @notice Address that a market should have as price feed to consider as base price and avoid external price call.\\n address public constant BASE_FEED = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n /// @notice Target health factor that the account should have after it's liquidated to prevent cascade liquidations.\\n uint256 public constant TARGET_HEALTH = 1.25e18;\\n /// @notice Maximum value the liquidator can send and still have granular control of max assets.\\n /// Above this threshold, they should send `type(uint256).max`.\\n uint256 public constant ASSETS_THRESHOLD = type(uint256).max / 1e18;\\n\\n /// @notice Decimals that the answer of all price feeds should have.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 public immutable priceDecimals;\\n /// @notice Base factor to scale the price returned by the feed to 18 decimals.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable baseFactor;\\n /// @notice Base price used if the feed to fetch the price from is `BASE_FEED`.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n uint256 internal immutable basePrice;\\n\\n /// @notice Tracks the markets' indexes that an account has entered as collateral.\\n mapping(address => uint256) public accountMarkets;\\n /// @notice Stores market parameters per each enabled market.\\n mapping(Market => MarketData) public markets;\\n /// @notice Array of all enabled markets.\\n Market[] public marketList;\\n\\n /// @notice Liquidation incentive factors for the liquidator and the lenders of the market where the debt is repaid.\\n LiquidationIncentive public liquidationIncentive;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(uint256 priceDecimals_) {\\n priceDecimals = priceDecimals_;\\n baseFactor = 10 ** (18 - priceDecimals_);\\n basePrice = 10 ** priceDecimals_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(LiquidationIncentive memory liquidationIncentive_) external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setLiquidationIncentive(liquidationIncentive_);\\n }\\n\\n /// @notice Allows assets of a certain market to be used as collateral for borrowing other assets.\\n /// @param market market to enabled as collateral.\\n function enterMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) != 0) return;\\n accountMarkets[msg.sender] = marketMap | marketMask;\\n\\n emit MarketEntered(market, msg.sender);\\n }\\n\\n /// @notice Removes market from sender's account liquidity calculation.\\n /// @dev Sender must not have an outstanding borrow balance in the asset, or be providing necessary collateral\\n /// for an outstanding borrow.\\n /// @param market market to be disabled as collateral.\\n function exitMarket(Market market) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n (uint256 assets, uint256 debt) = market.accountSnapshot(msg.sender);\\n\\n // fail if the sender has a borrow balance\\n if (debt != 0) revert RemainingDebt();\\n\\n // fail if the sender is not permitted to redeem all of their assets\\n checkShortfall(market, msg.sender, assets);\\n\\n uint256 marketMap = accountMarkets[msg.sender];\\n uint256 marketMask = 1 << m.index;\\n\\n if ((marketMap & marketMask) == 0) return;\\n accountMarkets[msg.sender] = marketMap & ~marketMask;\\n\\n emit MarketExited(market, msg.sender);\\n }\\n\\n /// @notice Returns account's liquidity calculation.\\n /// @param account account in which the liquidity will be calculated.\\n /// @param marketToSimulate market in which to simulate withdraw operation.\\n /// @param withdrawAmount amount to simulate as withdraw.\\n /// @return sumCollateral sum of all collateral, already multiplied by each adjust factor (denominated in base).\\n /// @return sumDebtPlusEffects sum of all debt divided by adjust factor considering withdrawal (denominated in base).\\n function accountLiquidity(\\n address account,\\n Market marketToSimulate,\\n uint256 withdrawAmount\\n ) public view returns (uint256 sumCollateral, uint256 sumDebtPlusEffects) {\\n AccountLiquidity memory vars; // holds all our calculation results\\n\\n // for each asset the account is in\\n uint256 marketMap = accountMarkets[account];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 baseUnit = 10 ** m.decimals;\\n uint256 adjustFactor = m.adjustFactor;\\n\\n // read the balances\\n (vars.balance, vars.borrowBalance) = market.accountSnapshot(account);\\n\\n // get the normalized price of the asset (18 decimals)\\n vars.price = assetPrice(m.priceFeed);\\n\\n // sum all the collateral prices\\n sumCollateral += vars.balance.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n\\n // sum all the debt\\n sumDebtPlusEffects += vars.borrowBalance.mulDivUp(vars.price, baseUnit).divWadUp(adjustFactor);\\n\\n // simulate the effects of withdrawing from a pool\\n if (market == marketToSimulate) {\\n // calculate the effects of redeeming markets\\n // (having less collateral is the same as having more debt for this calculation)\\n if (withdrawAmount != 0) {\\n sumDebtPlusEffects += withdrawAmount.mulDivDown(vars.price, baseUnit).mulWadDown(adjustFactor);\\n }\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Validates that the current state of the position and system are valid.\\n /// @dev To be called after adding the borrowed debt to the account position.\\n /// @param market address of the market where the borrow is made.\\n /// @param borrower address of the account that will repay the debt.\\n function checkBorrow(Market market, address borrower) external {\\n MarketData storage m = markets[market];\\n if (!m.isListed) revert MarketNotListed();\\n\\n uint256 marketMap = accountMarkets[borrower];\\n uint256 marketMask = 1 << m.index;\\n\\n // validate borrow state\\n if ((marketMap & marketMask) == 0) {\\n // only markets may call checkBorrow if borrower not in market\\n if (msg.sender != address(market)) revert NotMarket();\\n\\n accountMarkets[borrower] = marketMap | marketMask;\\n emit MarketEntered(market, borrower);\\n }\\n\\n // verify that current liquidity is not short\\n (uint256 collateral, uint256 debt) = accountLiquidity(borrower, Market(address(0)), 0);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Checks if the account has liquidity shortfall.\\n /// @param market address of the market where the operation will happen.\\n /// @param account address of the account to check for possible shortfall.\\n /// @param amount amount that the account wants to withdraw or transfer.\\n function checkShortfall(Market market, address account, uint256 amount) public view {\\n // if the account is not 'in' the market, bypass the liquidity check\\n if ((accountMarkets[account] & (1 << markets[market].index)) == 0) return;\\n\\n // otherwise, perform a hypothetical liquidity check to guard against shortfall\\n (uint256 collateral, uint256 debt) = accountLiquidity(account, market, amount);\\n if (collateral < debt) revert InsufficientAccountLiquidity();\\n }\\n\\n /// @notice Allows/rejects liquidation of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt is being repaid.\\n /// @param seizeMarket market from where the liquidator will seize assets.\\n /// @param borrower address in which the assets are being liquidated.\\n /// @param maxLiquidatorAssets maximum amount of debt the liquidator is willing to accept.\\n /// @return maxRepayAssets capped amount of debt the liquidator is allowed to repay.\\n function checkLiquidation(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 maxLiquidatorAssets\\n ) external view returns (uint256 maxRepayAssets) {\\n // if markets are listed, they have the same auditor\\n if (!markets[repayMarket].isListed || !markets[seizeMarket].isListed) revert MarketNotListed();\\n\\n MarketVars memory repay;\\n LiquidityVars memory base;\\n uint256 marketMap = accountMarkets[borrower];\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage marketData = markets[market];\\n MarketVars memory m = MarketVars({\\n price: assetPrice(marketData.priceFeed),\\n adjustFactor: marketData.adjustFactor,\\n baseUnit: 10 ** marketData.decimals\\n });\\n\\n if (market == repayMarket) repay = m;\\n\\n (uint256 collateral, uint256 debt) = market.accountSnapshot(borrower);\\n\\n uint256 value = debt.mulDivUp(m.price, m.baseUnit);\\n base.totalDebt += value;\\n base.adjustedDebt += value.divWadUp(m.adjustFactor);\\n\\n value = collateral.mulDivDown(m.price, m.baseUnit);\\n base.totalCollateral += value;\\n base.adjustedCollateral += value.mulWadDown(m.adjustFactor);\\n if (market == seizeMarket) base.seizeAvailable = value;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (base.adjustedCollateral >= base.adjustedDebt) revert InsufficientShortfall();\\n\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n uint256 adjustFactor = base.adjustedCollateral.mulWadDown(base.totalDebt).divWadUp(\\n base.adjustedDebt.mulWadUp(base.totalCollateral)\\n );\\n uint256 closeFactor = (TARGET_HEALTH - base.adjustedCollateral.divWadUp(base.adjustedDebt)).divWadUp(\\n TARGET_HEALTH - adjustFactor.mulWadDown(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n );\\n maxRepayAssets = Math.min(\\n Math\\n .min(\\n base.totalDebt.mulWadUp(Math.min(1e18, closeFactor)),\\n base.seizeAvailable.divWadUp(1e18 + memIncentive.liquidator + memIncentive.lenders)\\n )\\n .mulDivUp(repay.baseUnit, repay.price),\\n maxLiquidatorAssets < ASSETS_THRESHOLD\\n ? maxLiquidatorAssets.divWadDown(1e18 + memIncentive.lenders)\\n : maxLiquidatorAssets\\n );\\n }\\n\\n /// @notice Allow/rejects seizing of assets.\\n /// @dev This function can be called externally, but only will have effect when called from a market.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market where the assets will be seized.\\n function checkSeize(Market repayMarket, Market seizeMarket) external view {\\n // if markets are listed, they also point to the same Auditor\\n if (!markets[seizeMarket].isListed || !markets[repayMarket].isListed) revert MarketNotListed();\\n }\\n\\n /// @notice Calculates the amount of collateral to be seized when a position is undercollateralized.\\n /// @param repayMarket market from where the debt will be repaid.\\n /// @param seizeMarket market from where the assets will be seized by the liquidator.\\n /// @param borrower account in which assets are being seized.\\n /// @param actualRepayAssets amount being repaid.\\n /// @return lendersAssets amount to be added for other lenders as a compensation of bad debt clearing.\\n /// @return seizeAssets amount that can be seized by the liquidator.\\n function calculateSeize(\\n Market repayMarket,\\n Market seizeMarket,\\n address borrower,\\n uint256 actualRepayAssets\\n ) external view returns (uint256 lendersAssets, uint256 seizeAssets) {\\n LiquidationIncentive memory memIncentive = liquidationIncentive;\\n lendersAssets = actualRepayAssets.mulWadDown(memIncentive.lenders);\\n\\n // read prices for borrowed and collateral markets\\n uint256 priceBorrowed = assetPrice(markets[repayMarket].priceFeed);\\n uint256 priceCollateral = assetPrice(markets[seizeMarket].priceFeed);\\n uint256 baseAmount = actualRepayAssets.mulDivUp(priceBorrowed, 10 ** markets[repayMarket].decimals);\\n\\n seizeAssets = Math.min(\\n baseAmount.mulDivUp(10 ** markets[seizeMarket].decimals, priceCollateral).mulWadUp(\\n 1e18 + memIncentive.liquidator + memIncentive.lenders\\n ),\\n seizeMarket.maxWithdraw(borrower)\\n );\\n }\\n\\n /// @notice Checks if account has debt with no collateral, if so then call `clearBadDebt` from each market.\\n /// @dev Collateral is multiplied by price and adjust factor to be accurately evaluated as positive collateral asset.\\n /// @param account account in which debt is being checked.\\n function handleBadDebt(address account) external {\\n uint256 memMarketMap = accountMarkets[account];\\n uint256 marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) {\\n Market market = marketList[i];\\n MarketData storage m = markets[market];\\n uint256 assets = market.maxWithdraw(account);\\n if (assets.mulDivDown(assetPrice(m.priceFeed), 10 ** m.decimals).mulWadDown(m.adjustFactor) > 0) return;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n marketMap = memMarketMap;\\n for (uint256 i = 0; marketMap != 0; marketMap >>= 1) {\\n if (marketMap & 1 != 0) marketList[i].clearBadDebt(account);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the asset price of a price feed.\\n /// @dev If Chainlink's asset price is <= 0 the call is reverted.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price.\\n /// @return The price of the asset scaled to 18-digit decimals.\\n function assetPrice(IPriceFeed priceFeed) public view returns (uint256) {\\n if (address(priceFeed) == BASE_FEED) return basePrice;\\n\\n int256 price = priceFeed.latestAnswer();\\n if (price <= 0) revert InvalidPrice();\\n return uint256(price) * baseFactor;\\n }\\n\\n /// @notice Retrieves all markets.\\n function allMarkets() external view returns (Market[] memory) {\\n return marketList;\\n }\\n\\n /// @notice Enables a certain market.\\n /// @dev Enabling more than 256 markets will cause an overflow when casting market index to uint8.\\n /// @param market market to add to the protocol.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n /// @param adjustFactor market's adjust factor for the underlying asset.\\n function enableMarket(\\n Market market,\\n IPriceFeed priceFeed,\\n uint128 adjustFactor\\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (market.auditor() != this) revert AuditorMismatch();\\n if (markets[market].isListed) revert MarketAlreadyListed();\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n\\n uint8 decimals = market.decimals();\\n markets[market] = MarketData({\\n isListed: true,\\n adjustFactor: adjustFactor,\\n decimals: decimals,\\n index: uint8(marketList.length),\\n priceFeed: priceFeed\\n });\\n\\n marketList.push(market);\\n\\n emit MarketListed(market, decimals);\\n emit PriceFeedSet(market, priceFeed);\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the adjust factor for a certain market.\\n /// @param market address of the market to change adjust factor for.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n function setAdjustFactor(Market market, uint128 adjustFactor) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (!markets[market].isListed) revert MarketNotListed();\\n\\n markets[market].adjustFactor = adjustFactor;\\n emit AdjustFactorSet(market, adjustFactor);\\n }\\n\\n /// @notice Sets the Chainlink Price Feed Aggregator source for a market.\\n /// @param market market address of the asset.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n function setPriceFeed(Market market, IPriceFeed priceFeed) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(priceFeed) != BASE_FEED && priceFeed.decimals() != priceDecimals) revert InvalidPriceFeed();\\n markets[market].priceFeed = priceFeed;\\n emit PriceFeedSet(market, priceFeed);\\n }\\n\\n /// @notice Sets liquidation incentive (liquidator and lenders) for the whole ecosystem.\\n /// @param liquidationIncentive_ new liquidation incentive.\\n function setLiquidationIncentive(\\n LiquidationIncentive memory liquidationIncentive_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n liquidationIncentive = liquidationIncentive_;\\n emit LiquidationIncentiveSet(liquidationIncentive_);\\n }\\n\\n /// @notice Emitted when a new market is listed for borrow/lending.\\n /// @param market address of the market that was listed.\\n /// @param decimals decimals of the market's underlying asset.\\n event MarketListed(Market indexed market, uint8 decimals);\\n\\n /// @notice Emitted when an account enters a market to use his deposit as collateral for a loan.\\n /// @param market address of the market that the account entered.\\n /// @param account address of the account that just entered a market.\\n event MarketEntered(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when an account leaves a market.\\n /// Means that they would stop using their deposit as collateral and won't ask for any loans in this market.\\n /// @param market address of the market that the account just left.\\n /// @param account address of the account that just left a market.\\n event MarketExited(Market indexed market, address indexed account);\\n\\n /// @notice Emitted when a adjust factor is changed by admin.\\n /// @param market address of the market that has a new adjust factor.\\n /// @param adjustFactor adjust factor for the underlying asset.\\n event AdjustFactorSet(Market indexed market, uint256 adjustFactor);\\n\\n /// @notice Emitted when a new liquidationIncentive has been set.\\n /// @param liquidationIncentive represented with 18 decimals.\\n event LiquidationIncentiveSet(LiquidationIncentive liquidationIncentive);\\n\\n /// @notice Emitted when a market and prie feed is changed by admin.\\n /// @param market address of the asset used to get the price.\\n /// @param priceFeed address of Chainlink's Price Feed aggregator used to query the asset price in base.\\n event PriceFeedSet(Market indexed market, IPriceFeed indexed priceFeed);\\n\\n /// @notice Stores the market parameters used for liquidity calculations.\\n /// @param adjustFactor used to asses the lending power of the market's underlying asset.\\n /// @param decimals number of decimals of the market's underlying asset.\\n /// @param index index of the market in the `marketList`.\\n /// @param isListed true if the market is enabled.\\n /// @param priceFeed address of the price feed used to query the asset's price.\\n struct MarketData {\\n uint128 adjustFactor;\\n uint8 decimals;\\n uint8 index;\\n bool isListed;\\n IPriceFeed priceFeed;\\n }\\n\\n /// @notice Stores the liquidator and lenders factors used in liquidations to calculate the amount to seize.\\n /// @param liquidator factor used to calculate the extra bonus a liquidator can seize.\\n /// @param lenders factor used to calculate the bonus that the pool lenders receive.\\n struct LiquidationIncentive {\\n uint128 liquidator;\\n uint128 lenders;\\n }\\n\\n /// @notice Used as memory access to temporary store account liquidity data.\\n /// @param balance collateral balance of the account.\\n /// @param borrowBalance borrow balance of the account.\\n /// @param price asset price returned by the price feed with 18 decimals.\\n struct AccountLiquidity {\\n uint256 balance;\\n uint256 borrowBalance;\\n uint256 price;\\n }\\n}\\n\\nerror AuditorMismatch();\\nerror InsufficientAccountLiquidity();\\nerror InsufficientShortfall();\\nerror InvalidPrice();\\nerror InvalidPriceFeed();\\nerror MarketAlreadyListed();\\nerror MarketNotListed();\\nerror NotMarket();\\nerror RemainingDebt();\\n\\nstruct MarketVars {\\n uint256 price;\\n uint256 baseUnit;\\n uint128 adjustFactor;\\n}\\n\\nstruct LiquidityVars {\\n uint256 totalDebt;\\n uint256 totalCollateral;\\n uint256 adjustedDebt;\\n uint256 adjustedCollateral;\\n uint256 seizeAvailable;\\n}\\n\",\"keccak256\":\"0x5110a03bc02c12d47bc64ccb39250e2c9eaa4c4089e63ed143e0513bf7ede5d8\",\"license\":\"BUSL-1.1\"},\"contracts/InterestRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts-v4/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts-v4/utils/math/SafeCast.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract InterestRateModel {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for int256;\\n using SafeCast for uint256;\\n using SafeCast for int256;\\n\\n /// @notice Scale factor of the floating curve.\\n uint256 public immutable floatingCurveA;\\n /// @notice Origin intercept of the floating curve.\\n int256 public immutable floatingCurveB;\\n /// @notice Asymptote of the floating curve.\\n uint256 public immutable floatingMaxUtilization;\\n\\n /// @notice natural level of utilization, represented with 18 decimals.\\n uint256 public immutable naturalUtilization;\\n /// @notice speed of growth for the base rate, represented with 18 decimals.\\n int256 public immutable growthSpeed;\\n /// @notice speed of the sigmoid curve, represented with 18 decimals.\\n int256 public immutable sigmoidSpeed;\\n /// @notice spread factor for the fixed rate, represented with 18 decimals.\\n int256 public immutable spreadFactor;\\n /// @notice speed of maturity for the fixed rate, represented with 18 decimals.\\n int256 public immutable maturitySpeed;\\n /// @notice time preference for the fixed rate, represented with 18 decimals.\\n int256 public immutable timePreference;\\n /// @notice liquidity naturally designated to fixed pools, represented with 18 decimals.\\n uint256 public immutable fixedAllocation;\\n /// @notice maximum interest rate, represented with 18 decimals.\\n uint256 public immutable maxRate;\\n\\n /// @dev maximum input value for expWad, ~ln((2^255 - 1) / 1e18), represented with 18 decimals.\\n int256 internal constant EXP_THRESHOLD = 135305999368893231588;\\n /// @dev auxiliary variable to save an extra operation.\\n int256 internal immutable auxSigmoid;\\n\\n /// @notice set of parameters used to initialize the interest rate model.\\n Parameters internal _parameters;\\n\\n constructor(Parameters memory p, Market market_) {\\n assert(\\n p.minRate > 0 &&\\n p.naturalRate > 0 &&\\n p.maxUtilization > 1e18 &&\\n p.naturalUtilization > 0 &&\\n p.naturalUtilization < 1e18 &&\\n p.growthSpeed > 0 &&\\n p.sigmoidSpeed > 0 &&\\n p.spreadFactor > 0 &&\\n p.maturitySpeed > 0 &&\\n p.maxRate > 0 &&\\n p.maxRate <= 15_000e16\\n );\\n\\n _parameters = p;\\n growthSpeed = p.growthSpeed.toInt256();\\n sigmoidSpeed = p.sigmoidSpeed.toInt256();\\n spreadFactor = p.spreadFactor.toInt256();\\n maturitySpeed = p.maturitySpeed.toInt256();\\n floatingMaxUtilization = p.maxUtilization;\\n naturalUtilization = p.naturalUtilization;\\n\\n floatingCurveA =\\n ((p.naturalRate.mulWadUp(\\n uint256(((growthSpeed * (1e18 - int256(p.naturalUtilization / 2)).lnWad()) / 1e18).expWad())\\n ) - p.minRate) *\\n (p.maxUtilization - p.naturalUtilization) *\\n (p.maxUtilization)) /\\n (p.naturalUtilization * 1e18);\\n floatingCurveB = int256(p.minRate) - int256(floatingCurveA.divWadDown(p.maxUtilization));\\n\\n market = market_;\\n fixedCurveA = address(market_) != address(0) ? floatingCurveA : 0;\\n fixedCurveB = address(market_) != address(0) ? floatingCurveB : int256(0);\\n fixedMaxUtilization = address(market_) != address(0) ? p.maxUtilization : 0;\\n\\n timePreference = p.timePreference;\\n fixedAllocation = p.fixedAllocation;\\n maxRate = p.maxRate;\\n\\n auxSigmoid = int256(naturalUtilization.divWadDown(1e18 - naturalUtilization)).lnWad();\\n\\n // reverts if it's an invalid curve (such as one yielding a negative interest rate).\\n fixedRate(block.timestamp + FixedLib.INTERVAL - (block.timestamp % FixedLib.INTERVAL), 2, 1, 1, 2);\\n baseRate(1e18 - 1, 1e18 - 1);\\n }\\n\\n /// @notice fixed rate with given conditions, represented with 18 decimals.\\n /// @param maturity maturity of the pool.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param uFixed fixed utilization of the pool.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `base * spread` and `maxRate` with given conditions.\\n function fixedRate(\\n uint256 maturity,\\n uint256 maxPools,\\n uint256 uFixed,\\n uint256 uFloating,\\n uint256 uGlobal\\n ) public view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n if (uFixed > uGlobal) revert UtilizationExceeded();\\n if (uGlobal == 0) return baseRate(uFloating, 0);\\n\\n FixedVars memory v;\\n v.sqFNatPools = (maxPools * 1e18).divWadDown(fixedAllocation);\\n v.fNatPools = (v.sqFNatPools * 1e18).sqrt();\\n v.fixedFactor = (maxPools * uFixed).mulDivDown(1e36, uGlobal * fixedAllocation);\\n v.natPools =\\n ((2e18 - v.sqFNatPools.toInt256()) * 1e36) /\\n (v.fNatPools.toInt256() * (1e18 - v.fNatPools.toInt256()));\\n v.maturityFactor = (maturity - block.timestamp).divWadDown(maxPools * FixedLib.INTERVAL);\\n\\n uint256 spread = (1e18 +\\n (((maturitySpeed * (v.maturityFactor).toInt256().lnWad()) / 1e18).expWad() *\\n (timePreference +\\n (spreadFactor *\\n ((v.natPools * (v.fixedFactor * 1e18).sqrt().toInt256()) /\\n 1e18 +\\n ((1e18 - v.natPools) * v.fixedFactor.toInt256()) /\\n 1e18 -\\n 1e18)) /\\n 1e18)) /\\n 1e18).toUint256();\\n uint256 base = baseRate(uFloating, uGlobal);\\n\\n if (base >= maxRate.divWadDown(spread)) return maxRate;\\n return base.mulWadUp(spread);\\n }\\n\\n /// @notice base rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the base rate, without capping.\\n function baseRate(uint256 uFloating, uint256 uGlobal) internal view returns (uint256) {\\n if (uFloating > uGlobal) revert UtilizationExceeded();\\n if (uGlobal >= 1e18) return type(uint256).max;\\n\\n uint256 r = ((floatingCurveA.divWadDown(floatingMaxUtilization - uFloating)).toInt256() + floatingCurveB)\\n .toUint256();\\n\\n if (uGlobal == 0) return r;\\n\\n int256 x = -((sigmoidSpeed * (int256(uGlobal.divWadDown(1e18 - uGlobal)).lnWad() - auxSigmoid)) / 1e18);\\n uint256 sigmoid = x > EXP_THRESHOLD ? 0 : uint256(1e18).divWadDown(1e18 + x.expWad().toUint256());\\n x = (-growthSpeed * (1e18 - sigmoid.mulWadDown(uGlobal)).toInt256().lnWad()) / 1e18;\\n uint256 globalFactor = ((x > EXP_THRESHOLD ? EXP_THRESHOLD : x).expWad()).toUint256();\\n\\n if (globalFactor > type(uint256).max / r) return type(uint256).max;\\n\\n return r.mulWadUp(globalFactor);\\n }\\n\\n /// @notice floating rate with given conditions, represented with 18 decimals.\\n /// @param uFloating floating utilization of the pool.\\n /// @param uGlobal global utilization of the pool.\\n /// @return the minimum between `baseRate` and `maxRate` with given conditions.\\n function floatingRate(uint256 uFloating, uint256 uGlobal) public view returns (uint256) {\\n return Math.min(baseRate(uFloating, uGlobal), maxRate);\\n }\\n\\n function parameters() external view returns (Parameters memory) {\\n return _parameters;\\n }\\n\\n // Legacy interface, kept for compatibility.\\n\\n /// @notice Market where the interest rate model is used. Keeps compatibility with legacy interest rate model.\\n Market public immutable market;\\n uint256 public immutable fixedCurveA;\\n int256 public immutable fixedCurveB;\\n uint256 public immutable fixedMaxUtilization;\\n\\n /// @dev Deprecated in favor of `floatingRate(uFloating, uGlobal)`.\\n function floatingRate(uint256) public view returns (uint256) {\\n uint256 floatingAssets = market.floatingAssets();\\n uint256 floatingDebt = market.floatingDebt();\\n return\\n floatingRate(\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed())\\n );\\n }\\n\\n /// @dev Deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function fixedBorrowRate(\\n uint256 maturity,\\n uint256 amount,\\n uint256 borrowed,\\n uint256 supplied,\\n uint256\\n ) external view returns (uint256) {\\n if (block.timestamp >= maturity) revert AlreadyMatured();\\n uint256 floatingAssets = previewFloatingAssetsAverage(maturity);\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n uint256 newBorrowed = borrowed + amount;\\n uint256 backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, supplied), newBorrowed);\\n\\n return\\n fixedRate(\\n maturity,\\n market.maxFuturePools(),\\n fixedUtilization(supplied, newBorrowed, floatingAssets),\\n floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0,\\n globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed() + backupDebtAddition)\\n ).mulDivDown(maturity - block.timestamp, 365 days);\\n }\\n\\n /// @dev deprecated in favor of `fixedRate(maturity, maxPools, uFixed, uFloating, uGlobal)`\\n function minFixedRate(uint256, uint256, uint256) external view returns (uint256 rate, uint256 utilization) {\\n uint256 floatingAssets = market.floatingAssetsAverage();\\n uint256 floatingDebt = market.totalFloatingBorrowAssets();\\n utilization = globalUtilization(floatingAssets, floatingDebt, market.floatingBackupBorrowed());\\n rate = baseRate(floatingAssets != 0 ? floatingDebt.divWadUp(floatingAssets) : 0, utilization);\\n }\\n\\n function previewFloatingAssetsAverage(uint256 maturity) internal view returns (uint256) {\\n FixedLib.Pool memory pool;\\n (pool.borrowed, pool.supplied, pool.unassignedEarnings, pool.lastAccrual) = market.fixedPools(maturity);\\n uint256 memFloatingAssets = market.floatingAssets() +\\n pool.unassignedEarnings.mulDivDown(block.timestamp - pool.lastAccrual, maturity - pool.lastAccrual);\\n uint256 memFloatingAssetsAverage = market.floatingAssetsAverage();\\n uint256 averageFactor = (1e18 -\\n (\\n -int256(\\n memFloatingAssets < memFloatingAssetsAverage\\n ? market.dampSpeedDown()\\n : market.dampSpeedUp() * (block.timestamp - market.lastAverageUpdate())\\n )\\n ).expWad()).toUint256();\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n function globalUtilization(\\n uint256 floatingAssets,\\n uint256 floatingDebt,\\n uint256 backupBorrowed\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 ? (floatingDebt + backupBorrowed).divWadUp(floatingAssets) : 0;\\n }\\n\\n function fixedUtilization(\\n uint256 supplied,\\n uint256 borrowed,\\n uint256 floatingAssets\\n ) internal pure returns (uint256) {\\n return floatingAssets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(floatingAssets) : 0;\\n }\\n}\\n\\nerror AlreadyMatured();\\nerror UtilizationExceeded();\\n\\nstruct Parameters {\\n uint256 minRate;\\n uint256 naturalRate;\\n uint256 maxUtilization;\\n uint256 naturalUtilization;\\n uint256 growthSpeed;\\n uint256 sigmoidSpeed;\\n uint256 spreadFactor;\\n uint256 maturitySpeed;\\n int256 timePreference;\\n uint256 fixedAllocation;\\n uint256 maxRate;\\n}\\n\\nstruct FixedVars {\\n uint256 sqFNatPools;\\n uint256 fNatPools;\\n uint256 fixedFactor;\\n int256 natPools;\\n uint256 maturityFactor;\\n}\\n\",\"keccak256\":\"0x21b3897afb0da4e23559f3122f2292deb79516d8850a4995ece47b8c4d278004\",\"license\":\"BUSL-1.1\"},\"contracts/Market.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { PausableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\\\";\\nimport { ERC4626, ERC20, SafeTransferLib } from \\\"solmate/src/mixins/ERC4626.sol\\\";\\nimport { InterestRateModel } from \\\"./InterestRateModel.sol\\\";\\nimport { RewardsController } from \\\"./RewardsController.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Auditor } from \\\"./Auditor.sol\\\";\\n\\ncontract Market is Initializable, AccessControlUpgradeable, PausableUpgradeable, ERC4626 {\\n using FixedPointMathLib for int256;\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint128;\\n using SafeTransferLib for ERC20;\\n using FixedLib for FixedLib.Pool;\\n using FixedLib for FixedLib.Position;\\n using FixedLib for uint256;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant EMERGENCY_ADMIN_ROLE = keccak256(\\\"EMERGENCY_ADMIN_ROLE\\\");\\n\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n Auditor public immutable auditor;\\n\\n /// @notice Tracks account's fixed deposit positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedDepositPositions;\\n /// @notice Tracks account's fixed borrow positions by maturity, account and position.\\n mapping(uint256 => mapping(address => FixedLib.Position)) public fixedBorrowPositions;\\n /// @notice Tracks fixed pools state by maturity.\\n mapping(uint256 => FixedLib.Pool) public fixedPools;\\n\\n /// @notice Tracks fixed deposit and borrow map and floating borrow shares of an account.\\n mapping(address => Account) public accounts;\\n\\n /// @notice Amount of assets lent by the floating pool to the fixed pools.\\n uint256 public floatingBackupBorrowed;\\n /// @notice Amount of assets lent by the floating pool to accounts.\\n uint256 public floatingDebt;\\n\\n /// @notice Accumulated earnings from extraordinary sources to be gradually distributed.\\n uint256 public earningsAccumulator;\\n /// @notice Rate per second to be charged to delayed fixed pools borrowers after maturity.\\n uint256 public penaltyRate;\\n /// @notice Rate charged to the fixed pool to be retained by the floating pool for initially providing liquidity.\\n uint256 public backupFeeRate;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is higher.\\n uint256 public dampSpeedUp;\\n /// @notice Damp speed factor to update `floatingAssetsAverage` when `floatingAssets` is lower.\\n uint256 public dampSpeedDown;\\n\\n /// @notice Number of fixed pools to be active at the same time.\\n uint8 public maxFuturePools;\\n /// @notice Last time the accumulator distributed earnings.\\n uint32 public lastAccumulatorAccrual;\\n /// @notice Last time the floating debt was updated.\\n uint32 public lastFloatingDebtUpdate;\\n /// @notice Last time the floating assets average was updated.\\n uint32 public lastAverageUpdate;\\n\\n /// @notice Interest rate model contract used to get the borrow rates.\\n InterestRateModel public interestRateModel;\\n\\n /// @notice Factor used for gradual accrual of earnings to the floating pool.\\n uint128 public earningsAccumulatorSmoothFactor;\\n /// @notice Percentage factor that represents the liquidity reserves that can't be borrowed.\\n uint128 public reserveFactor;\\n\\n /// @notice Amount of floating assets deposited to the pool.\\n uint256 public floatingAssets;\\n /// @notice Average of the floating assets to get fixed borrow rates and prevent rate manipulation.\\n uint256 public floatingAssetsAverage;\\n\\n /// @notice Total amount of floating borrow shares assigned to floating borrow accounts.\\n uint256 public totalFloatingBorrowShares;\\n\\n /// @dev gap from deprecated state.\\n /// @custom:oz-renamed-from floatingUtilization\\n uint256 private __gap;\\n\\n /// @notice Address of the treasury that will receive the allocated earnings.\\n address public treasury;\\n /// @notice Rate to be charged by the treasury to floating and fixed borrows.\\n uint256 public treasuryFeeRate;\\n\\n /// @notice Address of the rewards controller that will accrue rewards for accounts operating with the Market.\\n RewardsController public rewardsController;\\n\\n /// @notice Flag to prevent new borrows and deposits.\\n bool public isFrozen;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(ERC20 asset_, Auditor auditor_) ERC4626(asset_, \\\"\\\", \\\"\\\") {\\n auditor = auditor_;\\n\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n function initialize(\\n string calldata assetSymbol,\\n uint8 maxFuturePools_,\\n uint128 earningsAccumulatorSmoothFactor_,\\n InterestRateModel interestRateModel_,\\n uint256 penaltyRate_,\\n uint256 backupFeeRate_,\\n uint128 reserveFactor_,\\n uint256 dampSpeedUp_,\\n uint256 dampSpeedDown_\\n ) external initializer {\\n __AccessControl_init();\\n __Pausable_init();\\n\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n lastAverageUpdate = uint32(block.timestamp);\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n setAssetSymbol(assetSymbol);\\n setMaxFuturePools(maxFuturePools_);\\n setEarningsAccumulatorSmoothFactor(earningsAccumulatorSmoothFactor_);\\n setInterestRateModel(interestRateModel_);\\n setPenaltyRate(penaltyRate_);\\n setBackupFeeRate(backupFeeRate_);\\n setReserveFactor(reserveFactor_);\\n setDampSpeed(dampSpeedUp_, dampSpeedDown_);\\n }\\n\\n /// @notice Borrows a certain amount from the floating pool.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return borrowShares shares corresponding to the borrowed assets.\\n function borrow(\\n uint256 assets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 borrowShares) {\\n if (assets == 0) revert ZeroBorrow();\\n spendAllowance(borrower, assets);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n\\n borrowShares = previewBorrow(assets);\\n\\n uint256 newFloatingDebt = floatingDebt + assets;\\n floatingDebt = newFloatingDebt;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed, also considering the reserves\\n if (floatingBackupBorrowed + newFloatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n\\n totalFloatingBorrowShares += borrowShares;\\n accounts[borrower].floatingBorrowShares += borrowShares;\\n\\n emit Borrow(msg.sender, receiver, borrower, assets, borrowShares);\\n emitMarketUpdate();\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Repays a certain amount of assets to the floating pool.\\n /// @param assets assets to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepay the actual amount that should be transferred into the protocol.\\n /// @return borrowShares subtracted shares from the borrower's accountability.\\n function repay(\\n uint256 assets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepay, uint256 borrowShares) {\\n (actualRepay, borrowShares) = noTransferRefund(previewRepay(assets), borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), actualRepay);\\n }\\n\\n /// @notice Repays a certain amount of shares to the floating pool.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower address of the account that has the debt.\\n /// @return assets subtracted assets from the borrower's accountability.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function refund(\\n uint256 borrowShares,\\n address borrower\\n ) external whenNotPaused returns (uint256 assets, uint256 actualShares) {\\n (assets, actualShares) = noTransferRefund(borrowShares, borrower);\\n emitMarketUpdate();\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Allows to (partially) repay a floating borrow. It does not transfer assets.\\n /// @param borrowShares shares to be subtracted from the borrower's accountability.\\n /// @param borrower the address of the account that has the debt.\\n /// @return assets the actual amount that should be transferred into the protocol.\\n /// @return actualShares actual subtracted shares from the borrower's accountability.\\n function noTransferRefund(\\n uint256 borrowShares,\\n address borrower\\n ) internal returns (uint256 assets, uint256 actualShares) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n depositToTreasury(updateFloatingDebt());\\n Account storage account = accounts[borrower];\\n uint256 accountBorrowShares = account.floatingBorrowShares;\\n actualShares = Math.min(borrowShares, accountBorrowShares);\\n assets = previewRefund(actualShares);\\n\\n if (assets == 0) revert ZeroRepay();\\n\\n floatingDebt -= assets;\\n account.floatingBorrowShares = accountBorrowShares - actualShares;\\n totalFloatingBorrowShares -= actualShares;\\n\\n emit Repay(msg.sender, borrower, assets, actualShares);\\n }\\n\\n /// @notice Deposits a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be deposited.\\n /// @param assets amount to receive from the msg.sender.\\n /// @param minAssetsRequired minimum amount of assets required by the depositor for the transaction to be accepted.\\n /// @param receiver address that will be able to withdraw the deposited assets.\\n /// @return positionAssets total amount of assets (principal + fee) to be withdrawn at maturity.\\n function depositAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 minAssetsRequired,\\n address receiver\\n ) external whenNotPaused whenNotFrozen returns (uint256 positionAssets) {\\n if (assets == 0) revert ZeroDeposit();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n depositToTreasury(updateFloatingDebt());\\n floatingAssets += backupEarnings;\\n\\n (uint256 fee, uint256 backupFee) = pool.calculateDeposit(assets, backupFeeRate);\\n positionAssets = assets + fee;\\n if (positionAssets < minAssetsRequired) revert Disagreement();\\n\\n floatingBackupBorrowed -= pool.deposit(assets);\\n pool.unassignedEarnings -= fee + backupFee;\\n earningsAccumulator += backupFee;\\n\\n // update account's position\\n FixedLib.Position storage position = fixedDepositPositions[maturity][receiver];\\n\\n // if account doesn't have a current position, add it to the list\\n if (position.principal == 0) {\\n Account storage account = accounts[receiver];\\n account.fixedDeposits = account.fixedDeposits.setMaturity(maturity);\\n }\\n\\n position.principal += assets;\\n position.fee += fee;\\n\\n emit DepositAtMaturity(maturity, msg.sender, receiver, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n }\\n\\n /// @notice Borrows a certain amount from a maturity.\\n /// @param maturity maturity date for repayment.\\n /// @param assets amount to be sent to receiver and repaid by borrower.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept.\\n /// @param receiver address that will receive the borrowed assets.\\n /// @param borrower address that will repay the borrowed assets.\\n /// @return assetsOwed total amount of assets (principal + fee) to be repaid at maturity.\\n function borrowAtMaturity(\\n uint256 maturity,\\n uint256 assets,\\n uint256 maxAssets,\\n address receiver,\\n address borrower\\n ) external whenNotPaused whenNotFrozen returns (uint256 assetsOwed) {\\n if (assets == 0) revert ZeroBorrow();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.NONE);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n depositToTreasury(updateFloatingDebt());\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n {\\n uint256 backupDebtAddition = pool.borrow(assets);\\n if (backupDebtAddition != 0) {\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed + backupDebtAddition;\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets.mulWadDown(1e18 - reserveFactor)) {\\n revert InsufficientProtocolLiquidity();\\n }\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n }\\n uint256 fee;\\n {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, floatingBackupBorrowed)\\n );\\n fee = assets.mulWadUp(fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n }\\n assetsOwed = assets + fee;\\n\\n // validate that the account is not taking arbitrary fees\\n if (assetsOwed > maxAssets) revert Disagreement();\\n\\n spendAllowance(borrower, assetsOwed);\\n\\n {\\n // if account doesn't have a current position, add it to the list\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n if (position.principal == 0) {\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.setMaturity(maturity);\\n }\\n\\n // calculate what portion of the fees are to be accrued and what portion goes to earnings accumulator\\n (uint256 newUnassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(fee),\\n assets\\n );\\n if (newUnassignedEarnings != 0) pool.unassignedEarnings += newUnassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n fixedBorrowPositions[maturity][borrower] = FixedLib.Position(position.principal + assets, position.fee + fee);\\n }\\n\\n emit BorrowAtMaturity(maturity, msg.sender, receiver, borrower, assets, fee);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n auditor.checkBorrow(this, borrower);\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /// @notice Withdraws a certain amount from a maturity.\\n /// @param maturity maturity date where the assets will be withdrawn.\\n /// @param positionAssets position size to be reduced.\\n /// @param minAssetsRequired minimum amount required by the account (if discount included for early withdrawal).\\n /// @param receiver address that will receive the withdrawn assets.\\n /// @param owner address that previously deposited the assets.\\n /// @return assetsDiscounted amount of assets withdrawn (can include a discount for early withdraw).\\n function withdrawAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 minAssetsRequired,\\n address receiver,\\n address owner\\n ) external whenNotPaused returns (uint256 assetsDiscounted) {\\n if (positionAssets == 0) revert ZeroWithdraw();\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n depositToTreasury(updateFloatingDebt());\\n floatingAssets += pool.accrueEarnings(maturity);\\n\\n FixedLib.Position memory position = fixedDepositPositions[maturity][owner];\\n\\n if (positionAssets > position.principal + position.fee) positionAssets = position.principal + position.fee;\\n\\n {\\n // remove the supply from the fixed rate pool\\n uint256 newFloatingBackupBorrowed = floatingBackupBorrowed +\\n pool.withdraw(\\n FixedLib.Position(position.principal, position.fee).scaleProportionally(positionAssets).principal\\n );\\n if (newFloatingBackupBorrowed + floatingDebt > floatingAssets) revert InsufficientProtocolLiquidity();\\n floatingBackupBorrowed = newFloatingBackupBorrowed;\\n }\\n\\n // verify if there are any penalties/fee for the account because of early withdrawal, if so discount\\n if (block.timestamp < maturity) {\\n uint256 memFloatingAssetsAverage = previewFloatingAssetsAverage();\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingBackupBorrowed = floatingBackupBorrowed;\\n\\n uint256 fixedRate = interestRateModel.fixedRate(\\n maturity,\\n maxFuturePools,\\n fixedUtilization(pool.supplied, pool.borrowed, memFloatingAssetsAverage),\\n floatingUtilization(memFloatingAssetsAverage, memFloatingDebt),\\n globalUtilization(memFloatingAssetsAverage, memFloatingDebt, memFloatingBackupBorrowed)\\n );\\n assetsDiscounted = positionAssets.divWadDown(1e18 + fixedRate.mulDivDown(maturity - block.timestamp, 365 days));\\n } else {\\n assetsDiscounted = positionAssets;\\n }\\n\\n if (assetsDiscounted < minAssetsRequired) revert Disagreement();\\n\\n spendAllowance(owner, assetsDiscounted);\\n\\n // all the fees go to unassigned or to the floating pool\\n (uint256 unassignedEarnings, uint256 newBackupEarnings) = pool.distributeEarnings(\\n chargeTreasuryFee(positionAssets - assetsDiscounted),\\n assetsDiscounted\\n );\\n pool.unassignedEarnings += unassignedEarnings;\\n collectFreeLunch(newBackupEarnings);\\n\\n // the account gets discounted the full amount\\n position.reduceProportionally(positionAssets);\\n if (position.principal | position.fee == 0) {\\n delete fixedDepositPositions[maturity][owner];\\n Account storage account = accounts[owner];\\n account.fixedDeposits = account.fixedDeposits.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedDepositPositions[maturity][owner] = position;\\n }\\n\\n emit WithdrawAtMaturity(maturity, msg.sender, receiver, owner, positionAssets, assetsDiscounted);\\n emitMarketUpdate();\\n emitFixedEarningsUpdate(maturity);\\n\\n asset.safeTransfer(receiver, assetsDiscounted);\\n }\\n\\n /// @notice Repays a certain amount to a maturity.\\n /// @param maturity maturity date where the assets will be repaid.\\n /// @param positionAssets amount to be paid for the borrower's debt.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower address of the account that has the debt.\\n /// @return actualRepayAssets the actual amount that was transferred into the protocol.\\n function repayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower\\n ) external whenNotPaused returns (uint256 actualRepayAssets) {\\n // reverts on failure\\n FixedLib.checkPoolState(maturity, maxFuturePools, FixedLib.State.VALID, FixedLib.State.MATURED);\\n\\n actualRepayAssets = noTransferRepayAtMaturity(maturity, positionAssets, maxAssets, borrower, true);\\n emitMarketUpdate();\\n\\n asset.safeTransferFrom(msg.sender, address(this), actualRepayAssets);\\n }\\n\\n /// @notice Allows to (partially) repay a fixed rate position. It does not transfer assets.\\n /// @param maturity the maturity to access the pool.\\n /// @param positionAssets the amount of debt of the pool that should be paid.\\n /// @param maxAssets maximum amount of debt that the account is willing to accept to be repaid.\\n /// @param borrower the address of the account that has the debt.\\n /// @param canDiscount should early repay discounts be applied.\\n /// @return actualRepayAssets the actual amount that should be transferred into the protocol.\\n function noTransferRepayAtMaturity(\\n uint256 maturity,\\n uint256 positionAssets,\\n uint256 maxAssets,\\n address borrower,\\n bool canDiscount\\n ) internal returns (uint256 actualRepayAssets) {\\n if (positionAssets == 0) revert ZeroRepay();\\n\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n\\n uint256 backupEarnings = pool.accrueEarnings(maturity);\\n depositToTreasury(updateFloatingDebt());\\n floatingAssets += backupEarnings;\\n\\n FixedLib.Position memory position = fixedBorrowPositions[maturity][borrower];\\n\\n uint256 debtCovered = Math.min(positionAssets, position.principal + position.fee);\\n\\n uint256 principalCovered = FixedLib\\n .Position(position.principal, position.fee)\\n .scaleProportionally(debtCovered)\\n .principal;\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n\\n // early repayment allows a discount from the unassigned earnings\\n if (block.timestamp < maturity) {\\n // calculate the deposit fee considering the amount of debt the account'll pay\\n (uint256 discountFee, uint256 backupFee) = pool.calculateDeposit(principalCovered, backupFeeRate);\\n\\n // remove the fee from unassigned earnings\\n pool.unassignedEarnings -= discountFee + backupFee;\\n if (canDiscount) {\\n // the fee charged to the fixed pool supplier goes to the earnings accumulator\\n earningsAccumulator += backupFee;\\n\\n // the fee gets discounted from the account through `actualRepayAssets`\\n actualRepayAssets = debtCovered - discountFee;\\n } else {\\n // all fees go to the earnings accumulator\\n earningsAccumulator += discountFee + backupFee;\\n\\n // there is no discount due to liquidation\\n actualRepayAssets = debtCovered;\\n }\\n } else {\\n actualRepayAssets = debtCovered + debtCovered.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n\\n // all penalties go to the earnings accumulator\\n earningsAccumulator += actualRepayAssets - debtCovered;\\n }\\n\\n // verify that the account agrees to this discount or penalty\\n if (actualRepayAssets > maxAssets) revert Disagreement();\\n\\n // reduce the borrowed from the pool and might decrease the floating backup borrowed\\n floatingBackupBorrowed -= pool.repay(principalCovered);\\n\\n // update the account position\\n position.reduceProportionally(debtCovered);\\n if (position.principal | position.fee == 0) {\\n delete fixedBorrowPositions[maturity][borrower];\\n Account storage account = accounts[borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n } else {\\n // proportionally reduce the values\\n fixedBorrowPositions[maturity][borrower] = position;\\n }\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, actualRepayAssets, debtCovered);\\n emitFixedEarningsUpdate(maturity);\\n }\\n\\n /// @notice Liquidates undercollateralized fixed/floating (or both) position(s).\\n /// @dev Msg.sender liquidates borrower's position(s) and repays a certain amount of debt for the floating pool,\\n /// or/and for multiple fixed pools, seizing a portion of borrower's collateral.\\n /// @param borrower account that has an outstanding debt across floating or fixed pools.\\n /// @param maxAssets maximum amount of debt that the liquidator is willing to accept. (it can be less)\\n /// @param seizeMarket market from which the collateral will be seized to give to the liquidator.\\n /// @return repaidAssets actual amount repaid.\\n function liquidate(\\n address borrower,\\n uint256 maxAssets,\\n Market seizeMarket\\n ) external whenNotPaused returns (uint256 repaidAssets) {\\n if (msg.sender == borrower) revert SelfLiquidation();\\n floatingAssets += accrueAccumulatedEarnings();\\n\\n maxAssets = auditor.checkLiquidation(this, seizeMarket, borrower, maxAssets);\\n if (maxAssets == 0) revert ZeroRepay();\\n\\n Account storage account = accounts[borrower];\\n\\n {\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0 && maxAssets != 0) {\\n if (packedMaturities & 1 != 0) {\\n uint256 actualRepay;\\n if (block.timestamp < maturity) {\\n actualRepay = noTransferRepayAtMaturity(maturity, maxAssets, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n } else {\\n uint256 position;\\n {\\n FixedLib.Position storage p = fixedBorrowPositions[maturity][borrower];\\n position = p.principal + p.fee;\\n }\\n uint256 debt = position + position.mulWadDown((block.timestamp - maturity) * penaltyRate);\\n actualRepay = debt > maxAssets ? maxAssets.mulDivDown(position, debt) : maxAssets;\\n\\n if (actualRepay == 0) maxAssets = 0;\\n else {\\n actualRepay = noTransferRepayAtMaturity(maturity, actualRepay, maxAssets, borrower, false);\\n maxAssets -= actualRepay;\\n }\\n }\\n repaidAssets += actualRepay;\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n\\n if (maxAssets != 0 && account.floatingBorrowShares != 0) {\\n uint256 borrowShares = previewRepay(maxAssets);\\n if (borrowShares != 0) {\\n (uint256 actualRepayAssets, ) = noTransferRefund(borrowShares, borrower);\\n repaidAssets += actualRepayAssets;\\n }\\n }\\n\\n // reverts on failure\\n (uint256 lendersAssets, uint256 seizeAssets) = auditor.calculateSeize(this, seizeMarket, borrower, repaidAssets);\\n earningsAccumulator += lendersAssets;\\n\\n asset.safeTransferFrom(msg.sender, address(this), repaidAssets + lendersAssets);\\n\\n if (address(seizeMarket) == address(this)) {\\n internalSeize(this, msg.sender, borrower, seizeAssets);\\n } else {\\n seizeMarket.seize(msg.sender, borrower, seizeAssets);\\n\\n emitMarketUpdate();\\n }\\n\\n emit Liquidate(msg.sender, borrower, repaidAssets, lendersAssets, seizeMarket, seizeAssets);\\n\\n auditor.handleBadDebt(borrower);\\n }\\n\\n /// @notice Clears floating and fixed debt for an account spreading the losses to the `earningsAccumulator`.\\n /// @dev Can only be called from the auditor.\\n /// @param borrower account with insufficient collateral to be cleared the debt.\\n function clearBadDebt(address borrower) external {\\n if (msg.sender != address(auditor)) revert NotAuditor();\\n\\n floatingAssets += accrueAccumulatedEarnings();\\n Account storage account = accounts[borrower];\\n uint256 accumulator = earningsAccumulator;\\n uint256 totalBadDebt = 0;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 badDebt = position.principal + position.fee;\\n if (accumulator >= badDebt) {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleBorrow(borrower);\\n accumulator -= badDebt;\\n totalBadDebt += badDebt;\\n uint256 backupDebtReduction = fixedPools[maturity].repay(position.principal);\\n\\n if (backupDebtReduction != 0) {\\n floatingBackupBorrowed -= backupDebtReduction;\\n uint256 yield = fixedPools[maturity].unassignedEarnings.mulDivDown(\\n Math.min(position.principal, backupDebtReduction),\\n backupDebtReduction\\n );\\n fixedPools[maturity].unassignedEarnings -= yield;\\n earningsAccumulator += yield;\\n accumulator += yield;\\n }\\n\\n delete fixedBorrowPositions[maturity][borrower];\\n account.fixedBorrows = account.fixedBorrows.clearMaturity(maturity);\\n\\n emit RepayAtMaturity(maturity, msg.sender, borrower, badDebt, badDebt);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n if (account.floatingBorrowShares != 0 && (accumulator = previewRepay(accumulator)) != 0) {\\n (uint256 badDebt, ) = noTransferRefund(accumulator, borrower);\\n totalBadDebt += badDebt;\\n }\\n if (totalBadDebt != 0) {\\n earningsAccumulator -= totalBadDebt;\\n emit SpreadBadDebt(borrower, totalBadDebt);\\n }\\n emitMarketUpdate();\\n }\\n\\n /// @notice Public function to seize a certain amount of assets.\\n /// @dev Public function for liquidator to seize borrowers assets in the floating pool.\\n /// This function will only be called from another Market, on `liquidation` calls.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function seize(address liquidator, address borrower, uint256 assets) external whenNotPaused {\\n internalSeize(Market(msg.sender), liquidator, borrower, assets);\\n }\\n\\n /// @notice Internal function to seize a certain amount of assets.\\n /// @dev Internal function for liquidator to seize borrowers assets in the floating pool.\\n /// Will only be called from this Market on `liquidation` or through `seize` calls from another Market.\\n /// That's why msg.sender needs to be passed to the internal function (to be validated as a Market).\\n /// @param seizeMarket address which is calling the seize function (see `seize` public function).\\n /// @param liquidator address which will receive the seized assets.\\n /// @param borrower address from which the assets will be seized.\\n /// @param assets amount to be removed from borrower's possession.\\n function internalSeize(Market seizeMarket, address liquidator, address borrower, uint256 assets) internal {\\n if (assets == 0) revert ZeroWithdraw();\\n\\n // reverts on failure\\n auditor.checkSeize(seizeMarket, this);\\n\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(borrower);\\n uint256 shares = previewWithdraw(assets);\\n beforeWithdraw(assets, shares);\\n _burn(borrower, shares);\\n emit Withdraw(msg.sender, liquidator, borrower, assets, shares);\\n emit Seize(liquidator, borrower, assets);\\n emitMarketUpdate();\\n\\n asset.safeTransfer(liquidator, assets);\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be withdrawn from the floating pool.\\n function beforeWithdraw(uint256 assets, uint256) internal override whenNotPaused {\\n updateFloatingAssetsAverage();\\n depositToTreasury(updateFloatingDebt());\\n uint256 earnings = accrueAccumulatedEarnings();\\n uint256 newFloatingAssets = floatingAssets + earnings - assets;\\n // check if the underlying liquidity that the account wants to withdraw is borrowed\\n if (floatingBackupBorrowed + floatingDebt > newFloatingAssets) revert InsufficientProtocolLiquidity();\\n floatingAssets = newFloatingAssets;\\n }\\n\\n /// @notice Hook to update the floating pool average, floating pool balance and distribute earnings from accumulator.\\n /// @param assets amount of assets to be deposited to the floating pool.\\n function afterDeposit(uint256 assets, uint256) internal override whenNotPaused whenNotFrozen {\\n updateFloatingAssetsAverage();\\n uint256 treasuryFee = updateFloatingDebt();\\n uint256 earnings = accrueAccumulatedEarnings();\\n floatingAssets += earnings + assets;\\n depositToTreasury(treasuryFee);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Withdraws the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param assets amount of underlying to be withdrawn.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return shares amount of shares redeemed for underlying asset.\\n function withdraw(uint256 assets, address receiver, address owner) public override returns (uint256 shares) {\\n auditor.checkShortfall(this, owner, assets);\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n shares = super.withdraw(assets, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n /// @notice Redeems the owner's floating pool assets to the receiver address.\\n /// @dev Makes sure that the owner doesn't have shortfall after withdrawing.\\n /// @param shares amount of shares to be redeemed for underlying asset.\\n /// @param receiver address to which the assets will be transferred.\\n /// @param owner address which owns the floating pool assets.\\n /// @return assets amount of underlying asset that was withdrawn.\\n function redeem(uint256 shares, address receiver, address owner) public override returns (uint256 assets) {\\n auditor.checkShortfall(this, owner, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(owner);\\n assets = super.redeem(shares, receiver, owner);\\n emitMarketUpdate();\\n }\\n\\n function _mint(address to, uint256 amount) internal override {\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) memRewardsController.handleDeposit(to);\\n super._mint(to, amount);\\n }\\n\\n /// @notice Moves amount of shares from the caller's account to `to`.\\n /// @dev Makes sure that the caller doesn't have shortfall after transferring.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transfer(address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, msg.sender, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(msg.sender);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transfer(to, shares);\\n }\\n\\n /// @notice Moves amount of shares from `from` to `to` using the allowance mechanism.\\n /// @dev Makes sure that `from` address doesn't have shortfall after transferring.\\n /// @param from address from which the assets will be transferred.\\n /// @param to address to which the assets will be transferred.\\n /// @param shares amount of shares to be transferred.\\n function transferFrom(address from, address to, uint256 shares) public override whenNotPaused returns (bool) {\\n auditor.checkShortfall(this, from, previewRedeem(shares));\\n RewardsController memRewardsController = rewardsController;\\n if (address(memRewardsController) != address(0)) {\\n memRewardsController.handleDeposit(from);\\n memRewardsController.handleDeposit(to);\\n }\\n return super.transferFrom(from, to, shares);\\n }\\n\\n /// @notice Gets current snapshot for an account across all maturities.\\n /// @param account account to return status snapshot in the specified maturity date.\\n /// @return the amount deposited to the floating pool and the amount owed to floating and fixed pools.\\n function accountSnapshot(address account) external view returns (uint256, uint256) {\\n return (convertToAssets(balanceOf[account]), previewDebt(account));\\n }\\n\\n /// @notice Gets all borrows and penalties for an account.\\n /// @param borrower account to return status snapshot for fixed and floating borrows.\\n /// @return debt the total debt, denominated in number of assets.\\n function previewDebt(address borrower) public view returns (uint256 debt) {\\n Account storage account = accounts[borrower];\\n uint256 memPenaltyRate = penaltyRate;\\n uint256 packedMaturities = account.fixedBorrows;\\n uint256 maturity = packedMaturities & ((1 << 32) - 1);\\n packedMaturities = packedMaturities >> 32;\\n // calculate all maturities using the base maturity and the following bits representing the following intervals\\n while (packedMaturities != 0) {\\n if (packedMaturities & 1 != 0) {\\n FixedLib.Position storage position = fixedBorrowPositions[maturity][borrower];\\n uint256 positionAssets = position.principal + position.fee;\\n\\n debt += positionAssets;\\n\\n if (block.timestamp > maturity) {\\n debt += positionAssets.mulWadDown((block.timestamp - maturity) * memPenaltyRate);\\n }\\n }\\n packedMaturities >>= 1;\\n maturity += FixedLib.INTERVAL;\\n }\\n // calculate floating borrowed debt\\n uint256 shares = account.floatingBorrowShares;\\n if (shares != 0) debt += previewRefund(shares);\\n }\\n\\n /// @notice Charges treasury fee to certain amount of earnings.\\n /// @param earnings amount of earnings.\\n /// @return earnings minus the fees charged by the treasury.\\n function chargeTreasuryFee(uint256 earnings) internal returns (uint256) {\\n uint256 fee = earnings.mulWadDown(treasuryFeeRate);\\n depositToTreasury(fee);\\n return earnings - fee;\\n }\\n\\n /// @notice Collects all earnings that are charged to borrowers that make use of fixed pool deposits' assets.\\n /// @param earnings amount of earnings.\\n function collectFreeLunch(uint256 earnings) internal {\\n if (earnings == 0) return;\\n\\n if (treasuryFeeRate != 0) {\\n depositToTreasury(earnings);\\n } else {\\n earningsAccumulator += earnings;\\n }\\n }\\n\\n /// @notice Deposits amount of assets on behalf of the treasury address.\\n /// @param fee amount of assets to be deposited.\\n function depositToTreasury(uint256 fee) internal {\\n if (fee != 0) {\\n _mint(treasury, previewDeposit(fee));\\n floatingAssets += fee;\\n }\\n }\\n\\n /// @notice Calculates the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings to be distributed from the accumulator.\\n function accumulatedEarnings() internal view returns (uint256 earnings) {\\n uint256 elapsed = block.timestamp - lastAccumulatorAccrual;\\n if (elapsed == 0) return 0;\\n return\\n earningsAccumulator.mulDivDown(\\n elapsed,\\n elapsed + earningsAccumulatorSmoothFactor.mulWadDown(maxFuturePools * FixedLib.INTERVAL)\\n );\\n }\\n\\n /// @notice Accrues the earnings to be distributed from the accumulator given the current timestamp.\\n /// @return earnings distributed from the accumulator.\\n function accrueAccumulatedEarnings() internal returns (uint256 earnings) {\\n earnings = accumulatedEarnings();\\n\\n earningsAccumulator -= earnings;\\n lastAccumulatorAccrual = uint32(block.timestamp);\\n emit AccumulatorAccrual(block.timestamp);\\n }\\n\\n /// @notice Updates the `floatingAssetsAverage`.\\n function updateFloatingAssetsAverage() internal {\\n floatingAssetsAverage = previewFloatingAssetsAverage();\\n lastAverageUpdate = uint32(block.timestamp);\\n }\\n\\n /// @notice Returns the current `floatingAssetsAverage` without updating the storage variable.\\n /// @return projected `floatingAssetsAverage`.\\n function previewFloatingAssetsAverage() public view returns (uint256) {\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 memFloatingAssetsAverage = floatingAssetsAverage;\\n uint256 dampSpeedFactor = memFloatingAssets < memFloatingAssetsAverage ? dampSpeedDown : dampSpeedUp;\\n uint256 averageFactor = uint256(1e18 - (-int256(dampSpeedFactor * (block.timestamp - lastAverageUpdate))).expWad());\\n return memFloatingAssetsAverage.mulWadDown(1e18 - averageFactor) + averageFactor.mulWadDown(memFloatingAssets);\\n }\\n\\n /// @notice Updates the floating pool borrows' variables.\\n /// @return treasuryFee amount of fees charged by the treasury to the new calculated floating debt.\\n function updateFloatingDebt() internal returns (uint256 treasuryFee) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 utilization = floatingUtilization(memFloatingAssets, memFloatingDebt);\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(utilization, globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed))\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n\\n memFloatingDebt += newDebt;\\n treasuryFee = newDebt.mulWadDown(treasuryFeeRate);\\n floatingAssets = memFloatingAssets + newDebt - treasuryFee;\\n floatingDebt = memFloatingDebt;\\n lastFloatingDebtUpdate = uint32(block.timestamp);\\n emit FloatingDebtUpdate(block.timestamp, utilization);\\n }\\n\\n /// @notice Calculates the total floating debt, considering elapsed time since last update and current interest rate.\\n /// @return actual floating debt plus projected interest.\\n function totalFloatingBorrowAssets() public view returns (uint256) {\\n uint256 memFloatingDebt = floatingDebt;\\n uint256 memFloatingAssets = floatingAssets;\\n uint256 newDebt = memFloatingDebt.mulWadDown(\\n interestRateModel\\n .floatingRate(\\n floatingUtilization(memFloatingAssets, memFloatingDebt),\\n globalUtilization(memFloatingAssets, memFloatingDebt, floatingBackupBorrowed)\\n )\\n .mulDivDown(block.timestamp - lastFloatingDebtUpdate, 365 days)\\n );\\n return memFloatingDebt + newDebt;\\n }\\n\\n /// @notice Calculates the floating pool balance plus earnings to be accrued at current timestamp\\n /// from maturities and accumulator.\\n /// @return actual floatingAssets plus earnings to be accrued at current timestamp.\\n function totalAssets() public view override returns (uint256) {\\n unchecked {\\n uint256 backupEarnings = 0;\\n\\n uint256 latestMaturity = block.timestamp - (block.timestamp % FixedLib.INTERVAL);\\n uint256 maxMaturity = latestMaturity + maxFuturePools * FixedLib.INTERVAL;\\n\\n for (uint256 maturity = latestMaturity; maturity <= maxMaturity; maturity += FixedLib.INTERVAL) {\\n FixedLib.Pool storage pool = fixedPools[maturity];\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (maturity > lastAccrual) {\\n backupEarnings += block.timestamp < maturity\\n ? pool.unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual)\\n : pool.unassignedEarnings;\\n }\\n }\\n\\n return\\n floatingAssets +\\n backupEarnings +\\n accumulatedEarnings() +\\n (totalFloatingBorrowAssets() - floatingDebt).mulWadDown(1e18 - treasuryFeeRate);\\n }\\n }\\n\\n /// @notice Simulates the effects of a borrow at the current time, given current contract conditions.\\n /// @param assets amount of assets to borrow.\\n /// @return amount of shares that will be asigned to the account after the borrow.\\n function previewBorrow(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a repay at the current time, given current contract conditions.\\n /// @param assets amount of assets to repay.\\n /// @return amount of shares that will be subtracted from the account after the repay.\\n function previewRepay(uint256 assets) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalFloatingBorrowAssets());\\n }\\n\\n /// @notice Simulates the effects of a refund at the current time, given current contract conditions.\\n /// @param shares amount of shares to subtract from caller's accountability.\\n /// @return amount of assets that will be repaid.\\n function previewRefund(uint256 shares) public view returns (uint256) {\\n uint256 supply = totalFloatingBorrowShares; // Saves an extra SLOAD if totalFloatingBorrowShares is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalFloatingBorrowAssets(), supply);\\n }\\n\\n /// @notice Checks msg.sender's allowance over account's assets.\\n /// @param account account in which the allowance will be checked.\\n /// @param assets assets from account that msg.sender wants to operate on.\\n function spendAllowance(address account, uint256 assets) internal {\\n if (msg.sender != account) {\\n uint256 allowed = allowance[account][msg.sender]; // saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[account][msg.sender] = allowed - previewWithdraw(assets);\\n }\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed amount of the fixed pool.\\n function fixedPoolBorrowed(uint256 maturity) external view returns (uint256) {\\n return fixedPools[maturity].borrowed;\\n }\\n\\n /// @notice Retrieves a fixed pool's borrowed and supplied amount.\\n /// @param maturity maturity date of the fixed pool.\\n /// @return borrowed and supplied amount of the fixed pool.\\n function fixedPoolBalance(uint256 maturity) external view returns (uint256, uint256) {\\n return (fixedPools[maturity].borrowed, fixedPools[maturity].supplied);\\n }\\n\\n /// @notice Retrieves fixed utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function fixedUtilization(uint256 supplied, uint256 borrowed, uint256 assets) internal pure returns (uint256) {\\n return assets != 0 && borrowed > supplied ? (borrowed - supplied).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves global utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function globalUtilization(uint256 assets, uint256 debt, uint256 backupBorrowed) internal pure returns (uint256) {\\n return assets != 0 ? (debt + backupBorrowed).divWadUp(assets) : 0;\\n }\\n\\n /// @notice Retrieves floating utilization of the floating pool.\\n /// @dev Internal function to avoid code duplication.\\n function floatingUtilization(uint256 assets, uint256 debt) internal pure returns (uint256) {\\n return assets != 0 ? debt.divWadUp(assets) : 0;\\n }\\n\\n /// @notice Emits MarketUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitMarketUpdate() internal {\\n emit MarketUpdate(\\n block.timestamp,\\n totalSupply,\\n floatingAssets,\\n totalFloatingBorrowShares,\\n floatingDebt,\\n earningsAccumulator\\n );\\n }\\n\\n /// @notice Emits FixedEarningsUpdate event.\\n /// @dev Internal function to avoid code duplication.\\n function emitFixedEarningsUpdate(uint256 maturity) internal {\\n emit FixedEarningsUpdate(block.timestamp, maturity, fixedPools[maturity].unassignedEarnings);\\n }\\n\\n /// @notice Sets name and symbol for the Market.\\n /// @param assetSymbol the symbol for the underlying asset.\\n function setAssetSymbol(string calldata assetSymbol) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n name = string.concat(\\\"exactly \\\", assetSymbol);\\n symbol = string.concat(\\\"exa\\\", assetSymbol);\\n }\\n\\n /// @notice Sets the rate charged to the fixed depositors that the floating pool suppliers will retain for initially\\n /// providing liquidity.\\n /// @param backupFeeRate_ percentage amount represented with 18 decimals.\\n function setBackupFeeRate(uint256 backupFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n backupFeeRate = backupFeeRate_;\\n emit BackupFeeRateSet(backupFeeRate_);\\n }\\n\\n /// @notice Sets the damp speed used to update the floatingAssetsAverage.\\n /// @param up damp speed up, represented with 18 decimals.\\n /// @param down damp speed down, represented with 18 decimals.\\n function setDampSpeed(uint256 up, uint256 down) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n updateFloatingAssetsAverage();\\n dampSpeedUp = up;\\n dampSpeedDown = down;\\n emit DampSpeedSet(up, down);\\n }\\n\\n /// @notice Sets the factor used when smoothly accruing earnings to the floating pool.\\n /// @param earningsAccumulatorSmoothFactor_ represented with 18 decimals.\\n function setEarningsAccumulatorSmoothFactor(\\n uint128 earningsAccumulatorSmoothFactor_\\n ) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n floatingAssets += accrueAccumulatedEarnings();\\n emitMarketUpdate();\\n earningsAccumulatorSmoothFactor = earningsAccumulatorSmoothFactor_;\\n emit EarningsAccumulatorSmoothFactorSet(earningsAccumulatorSmoothFactor_);\\n }\\n\\n /// @notice Sets the interest rate model to be used to calculate rates.\\n /// @param interestRateModel_ new interest rate model.\\n function setInterestRateModel(InterestRateModel interestRateModel_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(interestRateModel) != address(0)) depositToTreasury(updateFloatingDebt());\\n\\n interestRateModel = interestRateModel_;\\n emitMarketUpdate();\\n emit InterestRateModelSet(interestRateModel_);\\n }\\n\\n /// @notice Sets the rewards controller to update account rewards when operating with the Market.\\n /// @param rewardsController_ new rewards controller.\\n function setRewardsController(RewardsController rewardsController_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n rewardsController = rewardsController_;\\n emit RewardsControllerSet(rewardsController_);\\n }\\n\\n /// @notice Sets the protocol's max future pools for fixed borrowing and lending.\\n /// @dev If value is decreased, VALID maturities will become NOT_READY.\\n /// @param futurePools number of pools to be active at the same time.\\n function setMaxFuturePools(uint8 futurePools) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n maxFuturePools = futurePools;\\n emit MaxFuturePoolsSet(futurePools);\\n }\\n\\n /// @notice Sets the penalty rate per second.\\n /// @param penaltyRate_ percentage represented with 18 decimals.\\n function setPenaltyRate(uint256 penaltyRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n penaltyRate = penaltyRate_;\\n emit PenaltyRateSet(penaltyRate_);\\n }\\n\\n /// @notice Sets the percentage that represents the liquidity reserves that can't be borrowed.\\n /// @param reserveFactor_ parameter represented with 18 decimals.\\n function setReserveFactor(uint128 reserveFactor_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n reserveFactor = reserveFactor_;\\n emit ReserveFactorSet(reserveFactor_);\\n }\\n\\n /// @notice Sets the treasury variables.\\n /// @param treasury_ address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate_ represented with 18 decimals.\\n function setTreasury(address treasury_, uint256 treasuryFeeRate_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n depositToTreasury(updateFloatingDebt());\\n treasury = treasury_;\\n treasuryFeeRate = treasuryFeeRate_;\\n emit TreasurySet(treasury_, treasuryFeeRate_);\\n }\\n\\n /// @notice Sets the pause state to true in case of emergency, triggered by an authorized account.\\n function pause() external onlyPausingRoles {\\n _pause();\\n }\\n\\n /// @notice Sets the pause state to false when threat is gone, triggered by an authorized account.\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @notice Sets `isFrozen` state, triggered by an authorized account.\\n function setFrozen(bool isFrozen_) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (isFrozen == isFrozen_) return;\\n isFrozen = isFrozen_;\\n emit Frozen(msg.sender, isFrozen_);\\n }\\n\\n /// @dev Throws if the market is frozen.\\n function requireNotFrozen() internal view {\\n if (isFrozen) revert MarketFrozen();\\n }\\n\\n /// @dev Modifier to make a function callable only when the market is not frozen.\\n modifier whenNotFrozen() {\\n requireNotFrozen();\\n _;\\n }\\n\\n /// @dev Throws if the caller is not an `EMERGENCY_ADMIN_ROLE` or `PAUSER_ROLE`.\\n function requirePausingRoles() internal view {\\n if (!hasRole(EMERGENCY_ADMIN_ROLE, msg.sender) && !hasRole(PAUSER_ROLE, msg.sender)) {\\n revert NotPausingRole();\\n }\\n }\\n\\n /// @dev Modifier to make a function callable only by pausing roles.\\n modifier onlyPausingRoles() {\\n requirePausingRoles();\\n _;\\n }\\n\\n /// @notice Event emitted when an account borrows amount of assets from a floating pool.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of assets that were borrowed.\\n /// @param shares amount of borrow shares assigned to the account.\\n event Borrow(\\n address indexed caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /// @notice Emitted when an account repays amount of assets to a floating pool.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of assets that was repaid.\\n /// @param shares amount of borrow shares that were subtracted from the account's accountability.\\n event Repay(address indexed caller, address indexed borrower, uint256 assets, uint256 shares);\\n\\n /// @notice Emitted when an account deposits an amount of an asset to a certain fixed rate pool,\\n /// collecting fees at the end of the period.\\n /// @param maturity maturity at which the account will be able to collect his deposit + his fee.\\n /// @param caller address which deposited the assets.\\n /// @param owner address that will be able to withdraw the deposited assets.\\n /// @param assets amount of the asset that were deposited.\\n /// @param fee is the extra amount that it will be collected at maturity.\\n event DepositAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed owner,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account withdraws from a fixed rate pool.\\n /// @param maturity maturity where the account withdraw its deposits.\\n /// @param caller address which withdraw the asset.\\n /// @param receiver address which will be collecting the assets.\\n /// @param owner address which had the assets withdrawn.\\n /// @param positionAssets position size reduced.\\n /// @param assets amount of assets withdrawn (can include a discount for early withdraw).\\n event WithdrawAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 positionAssets,\\n uint256 assets\\n );\\n\\n /// @notice Emitted when an account borrows amount of an asset from a certain maturity date.\\n /// @param maturity maturity in which the account will have to repay the loan.\\n /// @param caller address which borrowed the asset.\\n /// @param receiver address that received the borrowed assets.\\n /// @param borrower address which will be repaying the borrowed assets.\\n /// @param assets amount of the asset that were borrowed.\\n /// @param fee extra amount that will need to be paid at maturity.\\n event BorrowAtMaturity(\\n uint256 indexed maturity,\\n address caller,\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 fee\\n );\\n\\n /// @notice Emitted when an account repays its borrows after maturity.\\n /// @param maturity maturity where the account repaid its borrowed amounts.\\n /// @param caller address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount that was repaid.\\n /// @param positionAssets amount of the debt that was covered in this repayment (penalties could have been repaid).\\n event RepayAtMaturity(\\n uint256 indexed maturity,\\n address indexed caller,\\n address indexed borrower,\\n uint256 assets,\\n uint256 positionAssets\\n );\\n\\n /// @notice Emitted when an account's position had a liquidation.\\n /// @param receiver address which repaid the previously borrowed amount.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount of the asset that were repaid.\\n /// @param lendersAssets incentive paid to lenders.\\n /// @param seizeMarket address of the asset that were seized by the liquidator.\\n /// @param seizedAssets amount seized of the collateral.\\n event Liquidate(\\n address indexed receiver,\\n address indexed borrower,\\n uint256 assets,\\n uint256 lendersAssets,\\n Market indexed seizeMarket,\\n uint256 seizedAssets\\n );\\n\\n /// @notice Emitted when an account's collateral has been seized.\\n /// @param liquidator address which seized this collateral.\\n /// @param borrower address which had the original debt.\\n /// @param assets amount seized of the collateral.\\n event Seize(address indexed liquidator, address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when an account is cleared from bad debt.\\n /// @param borrower address which was cleared from bad debt.\\n /// @param assets amount that was subtracted from the borrower's debt and spread to the `earningsAccumulator`.\\n event SpreadBadDebt(address indexed borrower, uint256 assets);\\n\\n /// @notice Emitted when the backupFeeRate parameter is changed by admin.\\n /// @param backupFeeRate rate charged to the fixed pools to be accrued by the floating depositors.\\n event BackupFeeRateSet(uint256 backupFeeRate);\\n\\n /// @notice Emitted when the damp speeds are changed by admin.\\n /// @param dampSpeedUp represented with 18 decimals.\\n /// @param dampSpeedDown represented with 18 decimals.\\n event DampSpeedSet(uint256 dampSpeedUp, uint256 dampSpeedDown);\\n\\n /// @notice Emitted when the earningsAccumulatorSmoothFactor is changed by admin.\\n /// @param earningsAccumulatorSmoothFactor factor represented with 18 decimals.\\n event EarningsAccumulatorSmoothFactorSet(uint256 earningsAccumulatorSmoothFactor);\\n\\n /// @notice Emitted when the interestRateModel is changed by admin.\\n /// @param interestRateModel new interest rate model to be used to calculate rates.\\n event InterestRateModelSet(InterestRateModel indexed interestRateModel);\\n\\n /// @notice Emitted when the maxFuturePools is changed by admin.\\n /// @param maxFuturePools represented with 0 decimals.\\n event MaxFuturePoolsSet(uint256 maxFuturePools);\\n\\n /// @notice Emitted when the penaltyRate is changed by admin.\\n /// @param penaltyRate penaltyRate percentage per second represented with 18 decimals.\\n event PenaltyRateSet(uint256 penaltyRate);\\n\\n /// @notice Emitted when the reserveFactor is changed by admin.\\n /// @param reserveFactor reserveFactor percentage.\\n event ReserveFactorSet(uint256 reserveFactor);\\n\\n /// @notice Emitted when the treasury variables are changed by admin.\\n /// @param treasury address of the treasury that will receive the minted eTokens.\\n /// @param treasuryFeeRate represented with 18 decimals.\\n event TreasurySet(address indexed treasury, uint256 treasuryFeeRate);\\n\\n /// @notice Emitted when the rewardsController is changed by admin.\\n /// @param rewardsController new rewards controller to update account rewards when operating with the Market.\\n event RewardsControllerSet(RewardsController indexed rewardsController);\\n\\n /// @notice Emitted when market state is updated.\\n /// @param timestamp current timestamp.\\n /// @param floatingDepositShares total floating supply shares.\\n /// @param floatingAssets total floating supply assets.\\n /// @param floatingBorrowShares total floating borrow shares.\\n /// @param floatingDebt total floating borrow assets.\\n /// @param earningsAccumulator earnings accumulator.\\n event MarketUpdate(\\n uint256 timestamp,\\n uint256 floatingDepositShares,\\n uint256 floatingAssets,\\n uint256 floatingBorrowShares,\\n uint256 floatingDebt,\\n uint256 earningsAccumulator\\n );\\n\\n /// @notice Emitted when the earnings of a maturity are updated.\\n /// @param timestamp current timestamp.\\n /// @param maturity maturity date where the earnings were updated.\\n /// @param unassignedEarnings pending unassigned earnings.\\n event FixedEarningsUpdate(uint256 timestamp, uint256 indexed maturity, uint256 unassignedEarnings);\\n\\n /// @notice Emitted when accumulator distributes earnings.\\n /// @param timestamp current timestamp.\\n event AccumulatorAccrual(uint256 timestamp);\\n\\n /// @notice Emitted when the floating debt is updated.\\n /// @param timestamp current timestamp.\\n /// @param utilization new floating utilization.\\n event FloatingDebtUpdate(uint256 timestamp, uint256 utilization);\\n\\n /// @notice Emitted when `account` sets the `isFrozen` flag.\\n event Frozen(address indexed account, bool isFrozen);\\n\\n /// @notice Stores fixed deposits and fixed borrows map and floating borrow shares of an account.\\n /// @param fixedDeposits encoded map maturity dates where the account supplied to.\\n /// @param fixedBorrows encoded map maturity dates where the account borrowed from.\\n /// @param floatingBorrowShares number of floating borrow shares assigned to the account.\\n struct Account {\\n uint256 fixedDeposits;\\n uint256 fixedBorrows;\\n uint256 floatingBorrowShares;\\n }\\n}\\n\\nerror Disagreement();\\nerror InsufficientProtocolLiquidity();\\nerror MarketFrozen();\\nerror NotAuditor();\\nerror NotPausingRole();\\nerror SelfLiquidation();\\nerror ZeroBorrow();\\nerror ZeroDeposit();\\nerror ZeroRepay();\\nerror ZeroWithdraw();\\n\",\"keccak256\":\"0xea262e9a46d356f8626b4ea1d2bf9017e009b3d4f95809f5f33331b0236b3ce6\",\"license\":\"BUSL-1.1\"},\"contracts/RewardsController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable-v4/proxy/utils/Initializable.sol\\\";\\nimport { MathUpgradeable as Math } from \\\"@openzeppelin/contracts-upgradeable-v4/utils/math/MathUpgradeable.sol\\\";\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable-v4/access/AccessControlUpgradeable.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\nimport { SafeTransferLib } from \\\"solmate/src/utils/SafeTransferLib.sol\\\";\\nimport { ERC20 } from \\\"solmate/src/tokens/ERC20.sol\\\";\\nimport { IPriceFeed } from \\\"./utils/IPriceFeed.sol\\\";\\nimport { FixedLib } from \\\"./utils/FixedLib.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\n\\ncontract RewardsController is Initializable, AccessControlUpgradeable {\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for uint64;\\n using FixedPointMathLib for int256;\\n using SafeTransferLib for ERC20;\\n\\n /// @notice Max utilization supported by the sigmoid function not to cause a division by zero (1e18 = WAD).\\n uint256 public constant UTILIZATION_CAP = 1e18 - 1;\\n /// @notice Tracks the reward distribution data for a given market.\\n mapping(Market => Distribution) public distribution;\\n /// @notice Tracks enabled asset rewards.\\n mapping(ERC20 => bool) public rewardEnabled;\\n /// @notice Stores registered asset rewards.\\n ERC20[] public rewardList;\\n /// @notice Stores Markets with distributions set.\\n Market[] public marketList;\\n /// @notice Tracks the owner nonces for the claim permit.\\n mapping(address => uint256) public nonces;\\n /// @notice Temporarily stores the claim permit owner or `msg.sender` of the claim call.\\n address private _claimSender;\\n /// @notice Tracks the allowed `keeper` to claim on behalf of `account`.\\n mapping(address account => address keeper) public keepers;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev Can only be called once.\\n function initialize() external initializer {\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded deposit.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleDeposit(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n ops[0] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n update(account, market, dist.availableRewards[r], ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Hook to be called by the Market to update the index of the account that made a rewarded borrow.\\n /// @dev There's no need to check that `msg.sender` is a valid Market as it won't have available rewards if it's not.\\n /// @param account The account to which the index is updated.\\n function handleBorrow(address account) external {\\n Market market = Market(msg.sender);\\n AccountOperation[] memory ops = new AccountOperation[](1);\\n (, , uint256 accountFloatingBorrowShares) = market.accounts(account);\\n\\n Distribution storage dist = distribution[market];\\n uint256 available = dist.availableRewardsCount;\\n for (uint128 r = 0; r < available; ) {\\n ERC20 reward = dist.availableRewards[r];\\n ops[0] = AccountOperation({\\n operation: true,\\n balance: accountFloatingBorrowShares + accountFixedBorrowShares(market, account, dist.rewards[reward].start)\\n });\\n update(account, Market(msg.sender), reward, ops);\\n unchecked {\\n ++r;\\n }\\n }\\n }\\n\\n /// @notice Claims `account` rewards for the given operations and reward assets.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param account The account to claim the rewards for.\\n /// @param rewardsList The list of rewards assets to claim.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claimOnBehalfOf(\\n MarketOperation[] memory marketOps,\\n address account,\\n ERC20[] memory rewardsList\\n ) external returns (ERC20[] memory, uint256[] memory) {\\n if (keepers[account] != msg.sender) revert NotKeeper();\\n return claim(marketOps, account, account, rewardsList);\\n }\\n\\n /// @notice Claims all `msg.sender` rewards to the given account.\\n /// @param to The address to send the rewards to.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claimAll(address to) external returns (ERC20[] memory rewardsList, uint256[] memory claimedAmounts) {\\n return claim(allMarketsOperations(), to, rewardList);\\n }\\n\\n /// @notice Claims `msg.sender` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param to The address to send the rewards to.\\n /// @param rewardsList The list of rewards assets to claim.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n address to,\\n ERC20[] memory rewardsList\\n ) public claimSender returns (ERC20[] memory, uint256[] memory) {\\n return claim(marketOps, _claimSender, to, rewardsList);\\n }\\n\\n function claim(\\n MarketOperation[] memory marketOps,\\n address account,\\n address to,\\n ERC20[] memory rewardsList\\n ) internal returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n claimedAmounts = new uint256[](rewardsList.length);\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n for (uint128 r = 0; r < dist.availableRewardsCount; ) {\\n update(\\n account,\\n marketOperation.market,\\n dist.availableRewards[r],\\n accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n account,\\n dist.rewards[dist.availableRewards[r]].start\\n )\\n );\\n unchecked {\\n ++r;\\n }\\n }\\n for (uint256 r = 0; r < rewardsList.length; ) {\\n RewardData storage rewardData = dist.rewards[rewardsList[r]];\\n for (uint256 o = 0; o < marketOperation.operations.length; ) {\\n uint256 rewardAmount = rewardData.accounts[account][marketOperation.operations[o]].accrued;\\n if (rewardAmount != 0) {\\n claimedAmounts[r] += rewardAmount;\\n rewardData.accounts[account][marketOperation.operations[o]].accrued = 0;\\n }\\n unchecked {\\n ++o;\\n }\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 r = 0; r < rewardsList.length; ) {\\n uint256 claimedAmount = claimedAmounts[r];\\n if (claimedAmount > 0) {\\n rewardsList[r].safeTransfer(to, claimedAmount);\\n emit Claim(account, rewardsList[r], to, claimedAmount);\\n }\\n unchecked {\\n ++r;\\n }\\n }\\n return (rewardsList, claimedAmounts);\\n }\\n\\n /// @notice Claims `permit.owner` rewards for the given operations and reward assets to the given account.\\n /// @param marketOps The operations to claim rewards for.\\n /// @param permit Arguments and signature from `permit.owner`.\\n /// @return rewardsList The list of rewards assets.\\n /// @return claimedAmounts The list of claimed amounts.\\n function claim(\\n MarketOperation[] memory marketOps,\\n ClaimPermit calldata permit\\n ) external permitSender(permit) returns (ERC20[] memory, uint256[] memory claimedAmounts) {\\n return claim(marketOps, msg.sender, permit.assets);\\n }\\n\\n /// @notice Gets the configuration of a given distribution.\\n /// @param market The market to get the distribution configuration for.\\n /// @param reward The reward asset.\\n /// @return The distribution configuration.\\n function rewardConfig(Market market, ERC20 reward) external view returns (Config memory) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return\\n Config({\\n market: market,\\n reward: reward,\\n priceFeed: rewardData.priceFeed,\\n start: rewardData.start,\\n distributionPeriod: rewardData.end - rewardData.start,\\n targetDebt: rewardData.targetDebt,\\n totalDistribution: rewardData.totalDistribution,\\n undistributedFactor: rewardData.undistributedFactor,\\n flipSpeed: rewardData.flipSpeed,\\n compensationFactor: rewardData.compensationFactor,\\n transitionFactor: rewardData.transitionFactor,\\n borrowAllocationWeightFactor: rewardData.borrowAllocationWeightFactor,\\n depositAllocationWeightAddend: rewardData.depositAllocationWeightAddend,\\n depositAllocationWeightFactor: rewardData.depositAllocationWeightFactor\\n });\\n }\\n\\n /// @notice Gets the amount of reward assets that are being distributed for a Market.\\n /// @param market Market to get the number of available rewards to distribute.\\n /// @return The amount reward assets set to a Market.\\n function availableRewardsCount(Market market) external view returns (uint256) {\\n return distribution[market].availableRewardsCount;\\n }\\n\\n /// @notice Gets the account data of a given account, Market, operation and reward asset.\\n /// @param account The account to get the operation data from.\\n /// @param market The market in which the operation was made.\\n /// @param operation True if the operation was a borrow, false if it was a deposit.\\n /// @param reward The reward asset.\\n /// @return accrued The accrued amount.\\n /// @return index The account index.\\n function accountOperation(\\n address account,\\n Market market,\\n bool operation,\\n ERC20 reward\\n ) external view returns (uint256, uint256) {\\n Account storage operationAccount = distribution[market].rewards[reward].accounts[account][operation];\\n return (operationAccount.accrued, operationAccount.index);\\n }\\n\\n /// @notice Gets the distribution `start`, `end` and `lastUpdate` value of a given market and reward.\\n /// @param market The market to get the distribution times.\\n /// @param reward The reward asset.\\n /// @return The distribution `start`, `end` and `lastUpdate` time.\\n function distributionTime(Market market, ERC20 reward) external view returns (uint32, uint32, uint32) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.start, rewardData.end, rewardData.lastUpdate);\\n }\\n\\n /// @notice Retrieves all rewards addresses.\\n function allRewards() external view returns (ERC20[] memory) {\\n return rewardList;\\n }\\n\\n /// @notice Gets all market and operations.\\n /// @return marketOps The list of market operations.\\n function allMarketsOperations() public view returns (MarketOperation[] memory marketOps) {\\n Market[] memory markets = marketList;\\n marketOps = new MarketOperation[](markets.length);\\n for (uint256 m = 0; m < markets.length; ) {\\n bool[] memory ops = new bool[](2);\\n ops[0] = true;\\n ops[1] = false;\\n marketOps[m] = MarketOperation({ market: markets[m], operations: ops });\\n unchecked {\\n ++m;\\n }\\n }\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account and reward asset.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function allClaimable(address account, ERC20 reward) external view returns (uint256 unclaimedRewards) {\\n return claimable(allMarketsOperations(), account, reward);\\n }\\n\\n /// @notice Gets the claimable amount of rewards for a given account, Market operations and reward asset.\\n /// @param marketOps The list of Market operations to get the accrued and pending rewards from.\\n /// @param account The account to get the claimable amount for.\\n /// @param reward The reward asset.\\n /// @return unclaimedRewards The claimable amount for the given account.\\n function claimable(\\n MarketOperation[] memory marketOps,\\n address account,\\n ERC20 reward\\n ) public view returns (uint256 unclaimedRewards) {\\n for (uint256 i = 0; i < marketOps.length; ) {\\n MarketOperation memory marketOperation = marketOps[i];\\n Distribution storage dist = distribution[marketOperation.market];\\n RewardData storage rewardData = dist.rewards[reward];\\n if (dist.availableRewardsCount == 0) {\\n unchecked {\\n ++i;\\n }\\n continue;\\n }\\n\\n AccountOperation[] memory ops = accountBalanceOperations(\\n marketOperation.market,\\n marketOperation.operations,\\n account,\\n rewardData.start\\n );\\n uint256 balance;\\n for (uint256 o = 0; o < ops.length; ) {\\n unclaimedRewards += rewardData.accounts[account][ops[o].operation].accrued;\\n balance += ops[o].balance;\\n unchecked {\\n ++o;\\n }\\n }\\n if (balance > 0) {\\n unclaimedRewards += pendingRewards(\\n account,\\n reward,\\n AccountMarketOperation({ market: marketOperation.market, accountOperations: ops })\\n );\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Iterates and accrues all rewards for the operations of the given account in the given market.\\n /// @param account The account to accrue the rewards for.\\n /// @param market The Market in which the operations where made.\\n /// @param reward The reward asset.\\n /// @param ops The operations to accrue the rewards for.\\n function update(address account, Market market, ERC20 reward, AccountOperation[] memory ops) internal {\\n uint256 baseUnit = distribution[market].baseUnit;\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n {\\n uint256 lastUpdate = rewardData.lastUpdate;\\n // `lastUpdate` can be greater than `block.timestamp` if distribution is set to start on a future date\\n if (block.timestamp > lastUpdate && (lastUpdate < rewardData.end || rewardData.lastUndistributed != 0)) {\\n (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) = previewAllocation(\\n rewardData,\\n market,\\n block.timestamp - lastUpdate\\n );\\n if (borrowIndex > type(uint128).max || depositIndex > type(uint128).max) revert IndexOverflow();\\n rewardData.borrowIndex = uint128(borrowIndex);\\n rewardData.depositIndex = uint128(depositIndex);\\n rewardData.lastUpdate = uint32(block.timestamp);\\n rewardData.lastUndistributed = newUndistributed;\\n emit IndexUpdate(market, reward, borrowIndex, depositIndex, newUndistributed, block.timestamp);\\n }\\n }\\n\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 i = 0; i < ops.length; ) {\\n AccountOperation memory op = ops[i];\\n Account storage accountData = operationAccount[op.operation];\\n uint256 accountIndex = accountData.index;\\n uint256 newAccountIndex;\\n if (op.operation) {\\n newAccountIndex = rewardData.borrowIndex;\\n } else {\\n newAccountIndex = rewardData.depositIndex;\\n }\\n if (accountIndex != newAccountIndex) {\\n accountData.index = uint128(newAccountIndex);\\n if (op.balance != 0) {\\n uint256 rewardsAccrued = accountRewards(op.balance, newAccountIndex, accountIndex, baseUnit);\\n accountData.accrued += uint128(rewardsAccrued);\\n emit Accrue(market, reward, account, op.operation, accountIndex, newAccountIndex, rewardsAccrued);\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Gets the equivalent of borrow shares from fixed pool principal borrows of an account.\\n /// @param market The Market to get the fixed borrows from.\\n /// @param account The account that borrowed from fixed pools.\\n /// @return fixedDebt The fixed borrow shares.\\n function accountFixedBorrowShares(\\n Market market,\\n address account,\\n uint32 start\\n ) internal view returns (uint256 fixedDebt) {\\n uint256 firstMaturity = start - (start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 principal, ) = market.fixedBorrowPositions(maturity, account);\\n fixedDebt += principal;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n fixedDebt = market.previewRepay(fixedDebt);\\n }\\n\\n /// @notice Gets the reward indexes and last amount of undistributed rewards for a given market and reward asset.\\n /// @param market The market to get the reward indexes for.\\n /// @param reward The reward asset to get the reward indexes for.\\n /// @return borrowIndex The index for the floating and fixed borrow operation.\\n /// @return depositIndex The index for the floating deposit operation.\\n /// @return lastUndistributed The last amount of undistributed rewards.\\n function rewardIndexes(Market market, ERC20 reward) external view returns (uint256, uint256, uint256) {\\n RewardData storage rewardData = distribution[market].rewards[reward];\\n return (rewardData.borrowIndex, rewardData.depositIndex, rewardData.lastUndistributed);\\n }\\n\\n /// @notice Calculates the rewards not accrued yet for the given operations of a given account and reward asset.\\n /// @param account The account to get the pending rewards for.\\n /// @param reward The reward asset to get the pending rewards for.\\n /// @param ops The operations to get the pending rewards for.\\n /// @return rewards The pending rewards for the given operations.\\n function pendingRewards(\\n address account,\\n ERC20 reward,\\n AccountMarketOperation memory ops\\n ) internal view returns (uint256 rewards) {\\n RewardData storage rewardData = distribution[ops.market].rewards[reward];\\n uint256 baseUnit = distribution[ops.market].baseUnit;\\n uint256 lastUpdate = rewardData.lastUpdate;\\n (uint256 borrowIndex, uint256 depositIndex, ) = previewAllocation(\\n rewardData,\\n ops.market,\\n block.timestamp > lastUpdate ? block.timestamp - lastUpdate : 0\\n );\\n mapping(bool => Account) storage operationAccount = rewardData.accounts[account];\\n for (uint256 o = 0; o < ops.accountOperations.length; ) {\\n uint256 nextIndex;\\n if (ops.accountOperations[o].operation) {\\n nextIndex = borrowIndex;\\n } else {\\n nextIndex = depositIndex;\\n }\\n\\n rewards += accountRewards(\\n ops.accountOperations[o].balance,\\n nextIndex,\\n operationAccount[ops.accountOperations[o].operation].index,\\n baseUnit\\n );\\n unchecked {\\n ++o;\\n }\\n }\\n }\\n\\n /// @notice Calculates and returns the new amount of rewards given by the difference between the `accountIndex` and\\n /// the `globalIndex`.\\n /// @param balance The account's balance in the operation's pool.\\n /// @param globalIndex Current index of the distribution.\\n /// @param accountIndex Last index stored for the account.\\n /// @param baseUnit One unit of the Market's asset (10**decimals).\\n /// @return The amount of new rewards to be accrued by the account.\\n function accountRewards(\\n uint256 balance,\\n uint256 globalIndex,\\n uint256 accountIndex,\\n uint256 baseUnit\\n ) internal pure returns (uint256) {\\n return balance.mulDivDown(globalIndex - accountIndex, baseUnit);\\n }\\n\\n /// @notice Retrieves projected distribution indexes and new undistributed amount for a given `deltaTime`.\\n /// @param market The market to calculate the indexes for.\\n /// @param reward The reward asset to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n Market market,\\n ERC20 reward,\\n uint256 deltaTime\\n ) external view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n return previewAllocation(distribution[market].rewards[reward], market, deltaTime);\\n }\\n\\n /// @notice Calculates and returns the distribution indexes and new undistributed tokens for a given `rewardData`.\\n /// @param rewardData The distribution's data.\\n /// @param market The market to calculate the indexes for.\\n /// @param deltaTime The elapsed time since the last update.\\n /// @return borrowIndex The index for the borrow operation.\\n /// @return depositIndex The index for the deposit operation.\\n /// @return newUndistributed The new undistributed rewards of the distribution.\\n function previewAllocation(\\n RewardData storage rewardData,\\n Market market,\\n uint256 deltaTime\\n ) internal view returns (uint256 borrowIndex, uint256 depositIndex, uint256 newUndistributed) {\\n TotalMarketBalance memory m;\\n m.floatingDebt = market.floatingDebt();\\n m.floatingAssets = market.floatingAssets();\\n TimeVars memory t;\\n t.start = rewardData.start;\\n t.end = rewardData.end;\\n {\\n uint256 firstMaturity = t.start - (t.start % FixedLib.INTERVAL) + FixedLib.INTERVAL;\\n uint256 maxMaturity = block.timestamp -\\n (block.timestamp % FixedLib.INTERVAL) +\\n (FixedLib.INTERVAL * market.maxFuturePools());\\n uint256 fixedDebt;\\n for (uint256 maturity = firstMaturity; maturity <= maxMaturity; ) {\\n (uint256 borrowed, ) = market.fixedPoolBalance(maturity);\\n fixedDebt += borrowed;\\n unchecked {\\n maturity += FixedLib.INTERVAL;\\n }\\n }\\n m.debt = m.floatingDebt + fixedDebt;\\n m.fixedBorrowShares = market.previewRepay(fixedDebt);\\n }\\n uint256 target;\\n {\\n uint256 targetDebt = rewardData.targetDebt;\\n target = m.debt < targetDebt ? m.debt.divWadDown(targetDebt) : 1e18;\\n }\\n uint256 rewards;\\n {\\n uint256 releaseRate = rewardData.releaseRate;\\n uint256 lastUndistributed = rewardData.lastUndistributed;\\n t.period = t.end - t.start;\\n uint256 distributionFactor = t.period > 0\\n ? rewardData.undistributedFactor.mulDivDown(target, t.period * 1e18)\\n : 0;\\n if (block.timestamp <= t.end) {\\n if (distributionFactor > 0) {\\n uint256 exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n } else if (rewardData.lastUpdate > t.end) {\\n newUndistributed =\\n lastUndistributed -\\n lastUndistributed.mulWadUp(1e18 - uint256((-int256(distributionFactor * deltaTime)).expWad()));\\n rewards = uint256(-(int256(newUndistributed) - int256(lastUndistributed)));\\n } else {\\n uint256 exponential;\\n deltaTime = t.end - rewardData.lastUpdate;\\n if (distributionFactor > 0) {\\n exponential = uint256((-int256(distributionFactor * deltaTime)).expWad());\\n newUndistributed =\\n lastUndistributed.mulWadDown(exponential) +\\n releaseRate.mulDivDown(1e18 - target, distributionFactor).mulWadUp(1e18 - exponential);\\n } else {\\n newUndistributed = lastUndistributed + releaseRate.mulWadDown(1e18 - target) * deltaTime;\\n }\\n exponential = uint256((-int256(distributionFactor * (block.timestamp - t.end))).expWad());\\n newUndistributed = newUndistributed - newUndistributed.mulWadUp(1e18 - exponential);\\n rewards = uint256(int256(releaseRate * deltaTime) - (int256(newUndistributed) - int256(lastUndistributed)));\\n }\\n if (rewards == 0) return (rewardData.borrowIndex, rewardData.depositIndex, newUndistributed);\\n }\\n {\\n AllocationVars memory v;\\n v.globalUtilization = Math.min(\\n m.floatingAssets != 0\\n ? 1e18 - (m.floatingAssets - m.floatingDebt - market.floatingBackupBorrowed()).divWadDown(m.floatingAssets)\\n : 0,\\n UTILIZATION_CAP\\n );\\n v.transitionFactor = rewardData.transitionFactor;\\n v.flipSpeed = rewardData.flipSpeed;\\n v.borrowAllocationWeightFactor = rewardData.borrowAllocationWeightFactor;\\n v.sigmoid = v.globalUtilization > 0\\n ? uint256(1e18).divWadDown(\\n 1e18 +\\n uint256(\\n (-(v.flipSpeed *\\n (int256(v.globalUtilization.divWadDown(1e18 - v.globalUtilization)).lnWad() -\\n int256(v.transitionFactor.divWadDown(1e18 - v.transitionFactor)).lnWad())) / 1e18).expWad()\\n )\\n )\\n : 0;\\n v.borrowRewardRule = rewardData\\n .compensationFactor\\n .mulWadDown(\\n market\\n .interestRateModel()\\n .floatingRate(m.floatingAssets != 0 ? m.floatingDebt.divWadDown(m.floatingAssets) : 0, v.globalUtilization)\\n .mulWadDown(1e18 - v.globalUtilization.mulWadUp(1e18 - market.treasuryFeeRate())) +\\n v.borrowAllocationWeightFactor\\n )\\n .mulWadDown(1e18 - v.sigmoid);\\n v.depositRewardRule =\\n rewardData.depositAllocationWeightAddend.mulWadDown(1e18 - v.sigmoid) +\\n rewardData.depositAllocationWeightFactor.mulWadDown(v.sigmoid);\\n v.borrowAllocation = v.borrowRewardRule.divWadDown(v.borrowRewardRule + v.depositRewardRule);\\n v.depositAllocation = 1e18 - v.borrowAllocation;\\n {\\n uint256 totalDepositSupply = market.totalSupply();\\n uint256 totalBorrowSupply = market.totalFloatingBorrowShares() + m.fixedBorrowShares;\\n uint256 baseUnit = distribution[market].baseUnit;\\n borrowIndex =\\n rewardData.borrowIndex +\\n (totalBorrowSupply > 0 ? rewards.mulWadDown(v.borrowAllocation).mulDivDown(baseUnit, totalBorrowSupply) : 0);\\n depositIndex =\\n rewardData.depositIndex +\\n (\\n totalDepositSupply > 0\\n ? rewards.mulWadDown(v.depositAllocation).mulDivDown(baseUnit, totalDepositSupply)\\n : 0\\n );\\n }\\n }\\n }\\n\\n /// @notice Get account balances of the given Market operations.\\n /// @param market The address of the Market.\\n /// @param ops List of operations to retrieve account balance.\\n /// @param account Account to get the balance from.\\n /// @param distributionStart Timestamp of the start of the distribution to correctly get the rewarded fixed pools.\\n /// @return accountBalanceOps contains a list with account balance per each operation.\\n function accountBalanceOperations(\\n Market market,\\n bool[] memory ops,\\n address account,\\n uint32 distributionStart\\n ) internal view returns (AccountOperation[] memory accountBalanceOps) {\\n accountBalanceOps = new AccountOperation[](ops.length);\\n for (uint256 i = 0; i < ops.length; ) {\\n if (ops[i]) {\\n (, , uint256 floatingBorrowShares) = market.accounts(account);\\n accountBalanceOps[i] = AccountOperation({\\n operation: true,\\n balance: floatingBorrowShares + accountFixedBorrowShares(market, account, distributionStart)\\n });\\n } else {\\n accountBalanceOps[i] = AccountOperation({ operation: false, balance: market.balanceOf(account) });\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @notice Sets the `keeper` address for the given `account`.\\n /// @param account The account to set the `keeper` for.\\n /// @param keeper The address to set as the `keeper`.\\n function setKeeper(address account, address keeper) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n keepers[account] = keeper;\\n }\\n\\n /// @notice Withdraws the contract's balance of the given asset to the given address.\\n /// @param asset The asset to withdraw.\\n /// @param to The address to withdraw the asset to.\\n function withdraw(ERC20 asset, address to) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n asset.safeTransfer(to, asset.balanceOf(address(this)));\\n }\\n\\n /// @notice Enables or updates the reward distribution for the given markets and rewards.\\n /// @param configs The configurations to update each RewardData with.\\n function config(Config[] memory configs) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n for (uint256 i = 0; i < configs.length; ) {\\n // transitionFactor cannot be eq or higher than 1e18 to avoid division by zero or underflow\\n if (configs[i].transitionFactor >= 1e18) revert InvalidConfig();\\n // depositAllocationWeightFactor cannot be zero to avoid division by zero when sigmoid equals 1e18\\n if (configs[i].depositAllocationWeightFactor == 0) revert InvalidConfig();\\n\\n Distribution storage dist = distribution[configs[i].market];\\n RewardData storage rewardData = dist.rewards[configs[i].reward];\\n\\n if (dist.baseUnit == 0) {\\n // never initialized before, adding to the list of markets\\n marketList.push(configs[i].market);\\n }\\n if (!rewardEnabled[configs[i].reward]) {\\n // add reward address to global rewards list if still not enabled\\n rewardEnabled[configs[i].reward] = true;\\n rewardList.push(configs[i].reward);\\n }\\n if (rewardData.lastUpdate == 0) {\\n // add reward address to distribution data's available rewards if distribution is new\\n dist.availableRewards[dist.availableRewardsCount++] = configs[i].reward;\\n dist.baseUnit = 10 ** configs[i].market.decimals();\\n // set initial parameters if distribution is new\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n } else {\\n uint32 start = rewardData.start;\\n uint32 end = rewardData.end;\\n // update global indexes before updating distribution values\\n bool[] memory ops = new bool[](1);\\n ops[0] = true;\\n update(\\n address(0),\\n configs[i].market,\\n configs[i].reward,\\n accountBalanceOperations(configs[i].market, ops, address(0), start)\\n );\\n // properly update release rate\\n if (block.timestamp < end) {\\n uint256 released = 0;\\n uint256 elapsed = 0;\\n if (block.timestamp > start) {\\n released =\\n rewardData.lastConfigReleased +\\n rewardData.releaseRate *\\n (block.timestamp - Math.max(rewardData.lastConfig, start));\\n elapsed = block.timestamp - start;\\n if (configs[i].totalDistribution <= released || configs[i].distributionPeriod <= elapsed) {\\n revert InvalidConfig();\\n }\\n rewardData.lastConfigReleased = released;\\n }\\n\\n rewardData.releaseRate =\\n (configs[i].totalDistribution - released) /\\n (configs[i].distributionPeriod - elapsed);\\n } else if (rewardData.start != configs[i].start) {\\n rewardData.start = configs[i].start;\\n rewardData.lastUpdate = configs[i].start;\\n rewardData.releaseRate = configs[i].totalDistribution / configs[i].distributionPeriod;\\n rewardData.lastConfigReleased = 0;\\n }\\n }\\n rewardData.lastConfig = uint32(block.timestamp);\\n rewardData.end = rewardData.start + uint32(configs[i].distributionPeriod);\\n rewardData.priceFeed = configs[i].priceFeed;\\n // set emission and distribution parameters\\n rewardData.totalDistribution = configs[i].totalDistribution;\\n rewardData.targetDebt = configs[i].targetDebt;\\n rewardData.undistributedFactor = configs[i].undistributedFactor;\\n rewardData.flipSpeed = configs[i].flipSpeed;\\n rewardData.compensationFactor = configs[i].compensationFactor;\\n rewardData.borrowAllocationWeightFactor = configs[i].borrowAllocationWeightFactor;\\n rewardData.depositAllocationWeightAddend = configs[i].depositAllocationWeightAddend;\\n rewardData.transitionFactor = configs[i].transitionFactor;\\n rewardData.depositAllocationWeightFactor = configs[i].depositAllocationWeightFactor;\\n\\n emit DistributionSet(configs[i].market, configs[i].reward, configs[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(\\\"RewardsController\\\"),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n modifier claimSender() {\\n if (_claimSender == address(0)) _claimSender = msg.sender;\\n _;\\n delete _claimSender;\\n }\\n\\n modifier permitSender(ClaimPermit calldata permit) {\\n assert(_claimSender == address(0));\\n assert(permit.deadline >= block.timestamp);\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\\"ClaimPermit(address owner,address spender,address[] assets,uint256 deadline)\\\"),\\n permit.owner,\\n msg.sender,\\n permit.assets,\\n nonces[permit.owner]++,\\n permit.deadline\\n )\\n )\\n )\\n ),\\n permit.v,\\n permit.r,\\n permit.s\\n );\\n assert(recoveredAddress != address(0) && recoveredAddress == permit.owner);\\n _claimSender = permit.owner;\\n }\\n _;\\n assert(_claimSender == address(0));\\n }\\n\\n struct TotalMarketBalance {\\n uint256 debt;\\n uint256 fixedBorrowShares;\\n uint256 floatingDebt;\\n uint256 floatingAssets;\\n }\\n\\n struct TimeVars {\\n uint256 start;\\n uint256 end;\\n uint256 period;\\n }\\n\\n struct AllocationVars {\\n uint256 globalUtilization;\\n uint256 sigmoid;\\n uint256 borrowRewardRule;\\n uint256 depositRewardRule;\\n uint256 borrowAllocation;\\n uint256 depositAllocation;\\n uint256 transitionFactor;\\n int256 flipSpeed;\\n uint256 borrowAllocationWeightFactor;\\n }\\n\\n struct AccountOperation {\\n bool operation;\\n uint256 balance;\\n }\\n\\n struct MarketOperation {\\n Market market;\\n bool[] operations;\\n }\\n\\n struct AccountMarketOperation {\\n Market market;\\n AccountOperation[] accountOperations;\\n }\\n\\n struct Account {\\n // liquidity index of the reward distribution for the account\\n uint128 index;\\n // amount of accrued rewards for the account since last account index update\\n uint128 accrued;\\n }\\n\\n struct Config {\\n Market market;\\n ERC20 reward;\\n IPriceFeed priceFeed;\\n uint32 start;\\n uint256 distributionPeriod;\\n uint256 targetDebt;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n }\\n\\n struct RewardData {\\n // distribution model\\n uint256 targetDebt;\\n uint256 releaseRate;\\n uint256 totalDistribution;\\n uint256 undistributedFactor;\\n uint256 lastUndistributed;\\n // allocation model\\n int128 flipSpeed;\\n uint64 compensationFactor;\\n uint64 transitionFactor;\\n uint64 borrowAllocationWeightFactor;\\n uint64 depositAllocationWeightAddend;\\n uint64 depositAllocationWeightFactor;\\n // liquidity indexes of the reward distribution\\n uint128 borrowIndex;\\n uint128 depositIndex;\\n // distribution timestamps\\n uint32 start;\\n uint32 end;\\n uint32 lastUpdate;\\n // config helpers\\n uint32 lastConfig;\\n uint256 lastConfigReleased;\\n // price feed\\n IPriceFeed priceFeed;\\n // account addresses and their rewards data (index & accrued)\\n mapping(address => mapping(bool => Account)) accounts;\\n }\\n\\n struct Distribution {\\n // reward assets and their data\\n mapping(ERC20 => RewardData) rewards;\\n // list of reward asset addresses for the market\\n mapping(uint128 => ERC20) availableRewards;\\n // count of reward tokens for the market\\n uint8 availableRewardsCount;\\n // base unit of the market\\n uint256 baseUnit;\\n }\\n\\n /// @notice Emitted when rewards are accrued by an account.\\n /// @param market Market where the operation was made.\\n /// @param reward reward asset.\\n /// @param account account that accrued the rewards.\\n /// @param operation true if the operation was a borrow, false if it was a deposit.\\n /// @param accountIndex previous account index.\\n /// @param operationIndex new operation index that is assigned to the `accountIndex`.\\n /// @param rewardsAccrued amount of rewards accrued.\\n event Accrue(\\n Market indexed market,\\n ERC20 indexed reward,\\n address indexed account,\\n bool operation,\\n uint256 accountIndex,\\n uint256 operationIndex,\\n uint256 rewardsAccrued\\n );\\n\\n /// @notice Emitted when rewards are claimed by an account.\\n /// @param account account that claimed the rewards.\\n /// @param reward reward asset.\\n /// @param to account that received the rewards.\\n /// @param amount amount of rewards claimed.\\n event Claim(address indexed account, ERC20 indexed reward, address indexed to, uint256 amount);\\n\\n /// @notice Emitted when a distribution is set.\\n /// @param market Market whose distribution was set.\\n /// @param reward reward asset to be distributed when operating with the Market.\\n /// @param config configuration struct containing the distribution parameters.\\n event DistributionSet(Market indexed market, ERC20 indexed reward, Config config);\\n\\n /// @notice Emitted when the distribution indexes are updated.\\n /// @param market Market of the distribution.\\n /// @param reward reward asset.\\n /// @param borrowIndex index of the borrow operations of a distribution.\\n /// @param depositIndex index of the deposit operations of a distribution.\\n /// @param newUndistributed amount of undistributed rewards.\\n /// @param lastUpdate current timestamp.\\n event IndexUpdate(\\n Market indexed market,\\n ERC20 indexed reward,\\n uint256 borrowIndex,\\n uint256 depositIndex,\\n uint256 newUndistributed,\\n uint256 lastUpdate\\n );\\n}\\n\\nerror IndexOverflow();\\nerror InvalidConfig();\\nerror NotKeeper();\\n\\nstruct ClaimPermit {\\n address owner;\\n ERC20[] assets;\\n uint256 deadline;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n}\\n\",\"keccak256\":\"0xab502e9e6c6fdd56878d80fde0aee78c360234b15b1db8d7cb6508fe3c430163\",\"license\":\"BUSL-1.1\"},\"contracts/StakedEXA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\nimport { IERC6372 } from \\\"@openzeppelin/contracts/interfaces/IERC6372.sol\\\";\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { AccessControlUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport { PausableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\\\";\\nimport {\\n ERC20PermitUpgradeable,\\n ERC20Upgradeable,\\n IERC20Permit\\n} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol\\\";\\nimport { ERC4626Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC4626Upgradeable.sol\\\";\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\n\\nimport { Market } from \\\"./Market.sol\\\";\\n\\n/// @title StakedEXA Contract\\n/// @notice This contract allows users to stake EXA tokens and earn rewards.\\n/// The rewards are subject to a penalty if the staking duration is not optimal.\\n/// The optimal staking duration is defined by `refTime`.\\n/// Staking for a duration less than `minTime` results in no rewards,\\n/// the closer the staking duration is to `refTime`, the lower the penalty.\\ncontract StakedEXA is\\n Initializable,\\n AccessControlUpgradeable,\\n PausableUpgradeable,\\n ERC4626Upgradeable,\\n ERC20PermitUpgradeable,\\n IERC6372\\n{\\n using FixedPointMathLib for uint256;\\n using FixedPointMathLib for int256;\\n using SafeERC20 for IERC20;\\n using SafeCast for int256;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant EMERGENCY_ADMIN_ROLE = keccak256(\\\"EMERGENCY_ADMIN_ROLE\\\");\\n\\n /// @notice Rewards tokens.\\n IERC20[] public rewardsTokens;\\n /// @notice Maximum amount of rewards token.\\n uint256 public constant MAX_REWARDS_TOKENS = 100;\\n\\n /// @notice Minimum time to stake and get rewards.\\n uint256 public minTime;\\n /// @notice Reference period to stake and get full rewards. Not possible to change after initilization.\\n uint256 public refTime;\\n /// @notice Discount factor for excess exposure. Not possible to change after initilization.\\n uint256 public excessFactor;\\n /// @notice Penalty growth factor.\\n uint256 public penaltyGrowth;\\n /// @notice Threshold penalty factor for withdrawing before the reference time.\\n uint256 public penaltyThreshold;\\n\\n /// @notice market from which to harvest.\\n Market public market;\\n /// @notice provider of rewards when harvesting.\\n address public provider;\\n /// @notice savings address to send the rewards.\\n address public savings;\\n /// @notice ratio of withdrawn assets to provide when harvesting. The rest goes to savings\\n uint256 public providerRatio;\\n\\n /// @notice Rewards data per token.\\n mapping(IERC20 reward => RewardData data) public rewards;\\n /// @notice Average starting time with the tokens staked per account.\\n mapping(address account => uint256 time) public avgStart;\\n /// @notice Accounts average indexes per reward token.\\n mapping(address account => mapping(IERC20 reward => uint256 index)) public avgIndexes;\\n /// @notice Accounts claimed rewards per reward token.\\n mapping(address account => mapping(IERC20 reward => uint256 claimed)) public claimed;\\n /// @notice Accounts saved rewards per reward token.\\n mapping(address account => mapping(IERC20 reward => uint256 saved)) public saved;\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the contract.\\n /// @dev can only be called once.\\n /// @param p The parameters for initialization.\\n function initialize(Parameters memory p) external initializer {\\n __ERC20_init(\\\"staked EXA\\\", \\\"stEXA\\\");\\n __ERC4626_init(p.asset);\\n __ERC20Permit_init(\\\"staked EXA\\\");\\n\\n __AccessControl_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n\\n if (p.refTime == 0 || p.refTime <= p.minTime || p.excessFactor > 1e18) revert InvalidRange();\\n setMinTime(p.minTime);\\n refTime = p.refTime;\\n excessFactor = p.excessFactor;\\n setPenaltyGrowth(p.penaltyGrowth);\\n setPenaltyThreshold(p.penaltyThreshold);\\n\\n setMarket(p.market);\\n setRewardsDuration(IERC20(address(p.market)), p.duration);\\n\\n setProvider(p.provider);\\n setProviderRatio(p.providerRatio);\\n setSavings(p.savings);\\n }\\n\\n /// @notice Updates the reward index for a given reward token.\\n /// @param reward The reward token to update.\\n function updateIndex(IERC20 reward) internal {\\n RewardData storage rewardData = rewards[reward];\\n rewardData.index = globalIndex(reward);\\n rewardData.updatedAt = uint40(lastTimeRewardApplicable(rewardData.finishAt));\\n }\\n\\n /// @notice Hook to handle updates during token transfer.\\n /// @param from The address transferring the tokens.\\n /// @param to The address receiving the tokens.\\n /// @param amount The amount of tokens being transferred.\\n function _update(address from, address to, uint256 amount) internal override whenNotPaused {\\n if (amount == 0) revert ZeroAmount();\\n if (from == address(0)) {\\n if (to != msg.sender && allowance(to, msg.sender) == 0) revert NotAllowed();\\n uint256 start = avgStart[to];\\n uint256 time = start != 0 ? block.timestamp * 1e18 - start : 0;\\n uint256 memRefTime = refTime * 1e18;\\n uint256 balance = balanceOf(to);\\n uint256 total = amount + balance;\\n\\n uint256 length = rewardsTokens.length;\\n for (uint256 i = 0; i < length; ++i) {\\n IERC20 reward = rewardsTokens[i];\\n updateIndex(reward);\\n\\n if (time > memRefTime) {\\n if (balance != 0) claimWithdraw(reward, to, balance);\\n avgIndexes[to][reward] = rewards[reward].index;\\n } else {\\n if (balance != 0) claim_(reward, to);\\n uint256 numerator = avgIndexes[to][reward] * balance + rewards[reward].index * amount;\\n avgIndexes[to][reward] = numerator == 0 ? 0 : (numerator - 1) / total + 1;\\n }\\n }\\n if (time > memRefTime) avgStart[to] = block.timestamp * 1e18;\\n else {\\n uint256 numerator = start * balance + block.timestamp * 1e18 * amount;\\n avgStart[to] = numerator == 0 ? 0 : (numerator - 1) / total + 1;\\n }\\n try this.harvest() {} catch {} // solhint-disable-line no-empty-blocks\\n } else if (to == address(0)) {\\n uint256 length = rewardsTokens.length;\\n for (uint256 i = 0; i < length; ++i) {\\n IERC20 reward = rewardsTokens[i];\\n updateIndex(reward);\\n claimWithdraw(reward, from, amount);\\n }\\n } else revert Untransferable();\\n\\n super._update(from, to, amount);\\n }\\n\\n /// @notice Permits a spender and deposits assets in a single transaction.\\n /// @param assets The amount of assets to deposit.\\n /// @param receiver The address receiving the deposited assets.\\n /// @param p The permit parameters.\\n /// @return The number of shares received.\\n function permitAndDeposit(uint256 assets, address receiver, Permit calldata p) external returns (uint256) {\\n // solhint-disable-next-line no-empty-blocks\\n try IERC20Permit(asset()).permit(receiver, address(this), p.value, p.deadline, p.v, p.r, p.s) {} catch {}\\n\\n uint256 maxAssets = maxDeposit(receiver);\\n if (assets > maxAssets) revert ERC4626ExceededMaxDeposit(receiver, assets, maxAssets);\\n\\n uint256 shares = previewDeposit(assets);\\n _deposit(receiver, receiver, assets, shares);\\n\\n return shares;\\n }\\n\\n /// @notice Claims unclaimed rewards when withdrawing an amount of assets.\\n /// @param reward The reward token to claim.\\n /// @param account The account receiving the withdrawn assets and rewards.\\n /// @param amount The amount of assets being withdrawn.\\n function claimWithdraw(IERC20 reward, address account, uint256 amount) internal {\\n uint256 balance = balanceOf(account);\\n uint256 claimedAmount = (claimed[account][reward] * amount) / balance;\\n claimed[account][reward] -= claimedAmount;\\n\\n uint256 savedAmount = (saved[account][reward] * amount) / balance;\\n saved[account][reward] -= savedAmount;\\n\\n uint256 claimableAmount = Math.max(rawClaimable(reward, account, amount), claimedAmount); // due to excess exposure\\n uint256 claimAmount = claimableAmount - claimedAmount;\\n if (claimAmount != 0) {\\n reward.safeTransfer(account, claimAmount);\\n emit RewardPaid(reward, account, claimAmount);\\n }\\n\\n uint256 rawEarned = earned(reward, account, amount);\\n // due to rounding\\n uint256 saveAmount = rawEarned <= claimableAmount + savedAmount ? 0 : rawEarned - claimableAmount - savedAmount;\\n if (saveAmount != 0) reward.safeTransfer(savings, saveAmount);\\n }\\n\\n /// @notice Notifies the contract about a reward amount.\\n /// @param reward The reward token.\\n /// @param amount The amount of reward tokens.\\n /// @param notifier The address notifying the reward amount.\\n function notifyRewardAmount(IERC20 reward, uint256 amount, address notifier) internal onlyReward(reward) {\\n updateIndex(reward);\\n RewardData storage rewardData = rewards[reward];\\n if (block.timestamp >= rewardData.finishAt) {\\n rewardData.rate = (amount * 1e18) / rewardData.duration;\\n } else {\\n uint256 remainingRewards = (rewardData.finishAt - block.timestamp) * rewardData.rate;\\n rewardData.rate = (amount * 1e18 + remainingRewards) / rewardData.duration;\\n }\\n\\n if (rewardData.rate == 0) revert ZeroRate();\\n if (\\n rewardData.rate.mulWadDown(rewardData.duration) >\\n reward.balanceOf(address(this)) - (address(reward) == asset() ? totalAssets() : 0)\\n ) revert InsufficientBalance();\\n\\n rewardData.finishAt = uint40(block.timestamp) + rewardData.duration;\\n rewardData.updatedAt = uint40(block.timestamp);\\n\\n emit RewardAmountNotified(reward, notifier, amount);\\n }\\n\\n /// @notice Calculates the discount factor based on the staked time.\\n /// @param time The time staked, represented with 18 decimals.\\n /// @return The discount factor, which is always between 0 and 1e18.\\n function discountFactor(uint256 time) internal view returns (uint256) {\\n uint256 memMinTime = minTime * 1e18;\\n if (time <= memMinTime) return 0;\\n uint256 memRefTime = refTime * 1e18;\\n if (time >= memRefTime) {\\n uint256 memExcessFactor = excessFactor;\\n return (1e18 - memExcessFactor).mulWadDown((memRefTime * 1e18) / time) + memExcessFactor;\\n }\\n\\n uint256 timeRatio = ((time - memMinTime) * 1e18) / (memRefTime - memMinTime);\\n if (timeRatio == 0) return 0;\\n\\n uint256 penalties = uint256(((int256(penaltyGrowth) * int256(timeRatio).lnWad()) / 1e18).expWad());\\n\\n uint256 memPenaltyThreshold = penaltyThreshold;\\n return Math.min((1e18 - memPenaltyThreshold).mulWadDown(penalties) + memPenaltyThreshold, 1e18);\\n }\\n\\n /// @notice Ensures the caller has pausing roles.\\n /// @dev Throws if the caller is not an `EMERGENCY_ADMIN_ROLE` or `PAUSER_ROLE`.\\n function requirePausingRoles() internal view {\\n if (!hasRole(EMERGENCY_ADMIN_ROLE, msg.sender) && !hasRole(PAUSER_ROLE, msg.sender)) {\\n revert NotPausingRole();\\n }\\n }\\n\\n /// @dev Modifier to restrict functions to pausing roles.\\n modifier onlyPausingRoles() {\\n requirePausingRoles();\\n _;\\n }\\n\\n /// @notice Modifier to restrict functions to enabled reward tokens.\\n /// @param reward The reward token.\\n modifier onlyReward(IERC20 reward) {\\n if (rewards[reward].finishAt == 0) revert RewardNotListed();\\n _;\\n }\\n\\n /// @notice Returns the last time rewards are applicable.\\n /// @param finishAt The time when the reward period finishes.\\n /// @return The last applicable time.\\n function lastTimeRewardApplicable(uint256 finishAt) public view returns (uint256) {\\n return uint40(Math.min(finishAt, block.timestamp));\\n }\\n\\n /// @notice Returns the global index for a reward token.\\n /// @param reward The reward token.\\n /// @return The global index.\\n function globalIndex(IERC20 reward) public view returns (uint256) {\\n RewardData storage rewardData = rewards[reward];\\n if (totalSupply() == 0) return rewardData.index;\\n\\n return\\n rewardData.index +\\n rewardData.rate.mulDivDown(lastTimeRewardApplicable(rewardData.finishAt) - rewardData.updatedAt, totalSupply());\\n }\\n\\n /// @notice Returns the average index for a reward token and account.\\n /// @param reward The reward token.\\n /// @param account The account.\\n /// @return The average index.\\n function avgIndex(IERC20 reward, address account) public view returns (uint256) {\\n return avgIndexes[account][reward];\\n }\\n\\n /// @notice Calculates the earned rewards for an account, without considering penalties.\\n /// @param reward The reward token.\\n /// @param account The account.\\n /// @param shares The amount of shares.\\n /// @return The earned rewards.\\n function earned(IERC20 reward, address account, uint256 shares) public view returns (uint256) {\\n return shares.mulWadDown(globalIndex(reward) - avgIndexes[account][reward]);\\n }\\n\\n /// @notice Calculates the raw claimable rewards for an account, without considering already claimed rewards.\\n /// @param reward The reward token.\\n /// @param account The account.\\n /// @param shares The amount of shares of the account involved.\\n /// @return The raw claimable rewards.\\n function rawClaimable(IERC20 reward, address account, uint256 shares) public view returns (uint256) {\\n uint256 start = avgStart[account];\\n if (start == 0) return 0;\\n return earned(reward, account, shares).mulWadDown(discountFactor(block.timestamp * 1e18 - start));\\n }\\n\\n /// @notice Calculates the claimable rewards for an account.\\n /// @param reward The reward token.\\n /// @param account The account.\\n /// @param shares The amount of shares of the account involved.\\n /// @return The claimable rewards.\\n function claimable(IERC20 reward, address account, uint256 shares) public view returns (uint256) {\\n uint256 start = avgStart[account];\\n if (start == 0 || block.timestamp * 1e18 - start <= minTime * 1e18) return 0;\\n\\n uint256 rawClaimable_ = rawClaimable(reward, account, shares);\\n uint256 balance = balanceOf(account);\\n if (balance == 0) return 0;\\n\\n uint256 numerator = claimed[account][reward] * shares;\\n uint256 claimedAmountProportion = numerator == 0 ? 0 : (numerator - 1) / balance + 1;\\n return rawClaimable_ > claimedAmountProportion ? rawClaimable_ - claimedAmountProportion : 0;\\n }\\n\\n /// @notice Harvests provider's market assets as rewards to be distributed among stakers.\\n /// @dev This function withdraws the maximum allowable assets from the provider's market,\\n /// calculates the portion to be distributed as rewards based on `providerRatio`,\\n /// deposits any remaining assets back into savings, and notifies the contract of the new reward amount.\\n function harvest() external whenNotPaused {\\n Market memMarket = market;\\n address memProvider = provider;\\n uint256 shares = Math.min(memMarket.allowance(memProvider, address(this)), memMarket.maxRedeem(memProvider));\\n uint256 sharesReward = shares.mulWadDown(providerRatio);\\n\\n memMarket.transferFrom(provider, address(this), sharesReward);\\n uint256 save = shares - sharesReward;\\n if (save != 0) memMarket.transferFrom(memProvider, savings, save);\\n\\n notifyRewardAmount(IERC20(address(memMarket)), sharesReward, address(this));\\n }\\n\\n /// @notice Returns all reward tokens.\\n /// @return The list of reward tokens.\\n function allRewardsTokens() external view returns (IERC20[] memory) {\\n return rewardsTokens;\\n }\\n\\n /// @notice Internal function to claim rewards.\\n /// @param reward The reward token.\\n function claim_(IERC20 reward, address account) internal whenNotPaused {\\n uint256 time = block.timestamp * 1e18 - avgStart[account];\\n if (time <= minTime * 1e18) return;\\n\\n uint256 claimedAmount = claimed[account][reward];\\n // due to excess exposure\\n uint256 claimableAmount = Math.max(rawClaimable(reward, account, balanceOf(account)), claimedAmount);\\n uint256 claimAmount = claimableAmount - claimedAmount;\\n\\n if (claimAmount != 0) claimed[account][reward] = claimedAmount + claimAmount;\\n\\n if (time > refTime * 1e18) {\\n uint256 rawEarned = earned(reward, account, balanceOf(account));\\n uint256 savedAmount = saved[account][reward];\\n uint256 maxClaimed = Math.min(rawEarned, claimableAmount);\\n uint256 saveAmount = rawEarned > maxClaimed + savedAmount ? rawEarned - maxClaimed - savedAmount : 0;\\n\\n if (saveAmount != 0) {\\n saved[account][reward] = savedAmount + saveAmount;\\n reward.safeTransfer(savings, saveAmount);\\n }\\n }\\n if (claimAmount != 0) {\\n reward.safeTransfer(account, claimAmount);\\n emit RewardPaid(reward, account, claimAmount);\\n }\\n }\\n\\n /// @notice Claims rewards for a specific reward token.\\n /// @param reward The reward token.\\n function claim(IERC20 reward) external {\\n claim_(reward, msg.sender);\\n }\\n\\n /// @notice Claims rewards for all reward tokens.\\n function claimAll() external {\\n for (uint256 i = 0; i < rewardsTokens.length; ++i) {\\n claim_(rewardsTokens[i], msg.sender);\\n }\\n }\\n\\n /// @notice Withdraws `amount` of `reward` from contract to `savings`.\\n /// @param reward The reward token.\\n /// @param amount The amount of reward tokens to withdraw.\\n function withdrawRewards(IERC20 reward, uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) onlyReward(reward) {\\n if (address(reward) == asset() && amount > reward.balanceOf(address(this)) - totalAssets()) {\\n revert InsufficientBalance();\\n }\\n address memSavings = savings;\\n reward.safeTransfer(memSavings, amount);\\n emit RewardsWithdrawn(msg.sender, memSavings, reward, amount);\\n }\\n\\n /// @notice Enables a new reward token.\\n /// @param reward The reward token.\\n function enableReward(IERC20 reward) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (rewardsTokens.length >= MAX_REWARDS_TOKENS) revert MaxRewardsTokensExceeded();\\n if (rewards[reward].finishAt != 0) revert AlreadyEnabled();\\n\\n rewards[reward].finishAt = uint40(block.timestamp);\\n rewardsTokens.push(reward);\\n\\n emit RewardListed(reward, msg.sender);\\n }\\n\\n /// @notice Finishes the distribution of a reward token.\\n /// @param reward The reward token.\\n function finishDistribution(IERC20 reward) public onlyRole(DEFAULT_ADMIN_ROLE) onlyReward(reward) {\\n updateIndex(reward);\\n\\n if (block.timestamp < rewards[reward].finishAt) {\\n uint256 finishAt = rewards[reward].finishAt;\\n rewards[reward].finishAt = uint40(block.timestamp);\\n reward.safeTransfer(savings, (finishAt - block.timestamp).mulWadDown(rewards[reward].rate));\\n }\\n\\n if (reward == IERC20(address(market))) setProvider(address(0));\\n\\n emit DistributionFinished(reward, msg.sender);\\n }\\n\\n /// @notice Sets the rewards duration for a reward token.\\n /// @dev Can only change the duration if the reward is finished.\\n /// @param reward The reward token.\\n /// @param duration The new duration.\\n function setRewardsDuration(IERC20 reward, uint40 duration) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n RewardData storage rewardData = rewards[reward];\\n if (rewardData.finishAt > block.timestamp) revert NotFinished();\\n\\n rewardData.duration = duration;\\n\\n emit RewardsDurationSet(reward, msg.sender, duration);\\n }\\n\\n /// @notice Notifies the contract about a reward amount.\\n /// @param reward The reward token.\\n /// @param amount The amount of reward tokens.\\n function notifyRewardAmount(IERC20 reward, uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n notifyRewardAmount(reward, amount, msg.sender);\\n }\\n\\n /// @notice Sets the market.\\n /// @param market_ The new market.\\n function setMarket(Market market_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (address(market_) == address(0)) revert ZeroAddress();\\n market = market_;\\n\\n if (rewards[IERC20(address(market_))].finishAt == 0) enableReward(IERC20(address(market_)));\\n\\n emit MarketSet(market_, msg.sender);\\n }\\n\\n /// @notice Sets the provider address.\\n /// @param provider_ The new provider address.\\n function setProvider(address provider_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n provider = provider_;\\n emit ProviderSet(provider_, msg.sender);\\n }\\n\\n /// @notice Sets the provider ratio.\\n /// @param providerRatio_ The new provider ratio.\\n function setProviderRatio(uint256 providerRatio_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (providerRatio_ > 1e18) revert InvalidRatio();\\n providerRatio = providerRatio_;\\n emit ProviderRatioSet(providerRatio_, msg.sender);\\n }\\n\\n /// @notice Sets the savings address.\\n /// @param savings_ The new savings address.\\n function setSavings(address savings_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (savings_ == address(0)) revert ZeroAddress();\\n savings = savings_;\\n emit SavingsSet(savings_, msg.sender);\\n }\\n\\n /// @notice Sets the minimum time to stake for rewards.\\n /// @param minTime_ The new minimum time.\\n function setMinTime(uint256 minTime_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n minTime = minTime_;\\n emit MinTimeSet(minTime_, msg.sender);\\n }\\n\\n /// @notice Sets the penalty growth factor.\\n /// @param penaltyGrowth_ The new penalty growth factor.\\n function setPenaltyGrowth(uint256 penaltyGrowth_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (penaltyGrowth_ < 0.1e18 || penaltyGrowth_ > 100e18) revert InvalidRange();\\n penaltyGrowth = penaltyGrowth_;\\n emit PenaltyGrowthSet(penaltyGrowth_, msg.sender);\\n }\\n\\n /// @notice Sets the penalty threshold.\\n /// @param penaltyThreshold_ The new penalty threshold.\\n function setPenaltyThreshold(uint256 penaltyThreshold_) public onlyRole(DEFAULT_ADMIN_ROLE) {\\n if (penaltyThreshold_ > 1e18) revert InvalidRange();\\n penaltyThreshold = penaltyThreshold_;\\n emit PenaltyThresholdSet(penaltyThreshold_, msg.sender);\\n }\\n\\n /// @notice Sets the pause state to true in case of emergency, triggered by an authorized account.\\n function pause() external onlyPausingRoles {\\n _pause();\\n }\\n\\n /// @notice Sets the pause state to false when threat is gone, triggered by an authorized account.\\n function unpause() external onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @notice Returns the total assets of the contract.\\n /// @return The total assets.\\n function totalAssets() public view override returns (uint256) {\\n return totalSupply();\\n }\\n\\n /// @notice Returns the number of decimals used by the token.\\n /// @return The number of decimals.\\n function decimals() public view override(ERC4626Upgradeable, ERC20Upgradeable) returns (uint8) {\\n return ERC4626Upgradeable.decimals();\\n }\\n\\n /// @notice Returns the current timepoint of stEXA, as per ERC-6372.\\n function clock() public view override returns (uint48) {\\n return uint48(block.timestamp);\\n }\\n\\n /// @notice Returns the current clock mode of stEXA, as per ERC-6372.\\n // solhint-disable-next-line func-name-mixedcase\\n function CLOCK_MODE() public pure override returns (string memory) {\\n return \\\"mode=timestamp\\\";\\n }\\n\\n event DistributionFinished(IERC20 indexed reward, address indexed account);\\n event MarketSet(Market indexed market, address indexed account);\\n event MinTimeSet(uint256 minTime, address indexed account);\\n event PenaltyGrowthSet(uint256 penaltyGrowth, address indexed account);\\n event PenaltyThresholdSet(uint256 penaltyThreshold, address indexed account);\\n event ProviderRatioSet(uint256 providerRatio, address indexed account);\\n event ProviderSet(address indexed provider, address indexed account);\\n event RefTimeSet(uint256 refTime, address indexed account);\\n event RewardAmountNotified(IERC20 indexed reward, address indexed notifier, uint256 amount);\\n event RewardListed(IERC20 indexed reward, address indexed account);\\n event RewardPaid(IERC20 indexed reward, address indexed account, uint256 amount);\\n event RewardsDurationSet(IERC20 indexed reward, address indexed account, uint256 duration);\\n event RewardsWithdrawn(address indexed account, address indexed receiver, IERC20 indexed reward, uint256 amount);\\n event SavingsSet(address indexed savings, address indexed account);\\n}\\n\\nerror AlreadyEnabled();\\nerror InsufficientBalance();\\nerror InvalidRange();\\nerror InvalidRatio();\\nerror MaxRewardsTokensExceeded();\\nerror NotAllowed();\\nerror NotFinished();\\nerror NotPausingRole();\\nerror RewardNotListed();\\nerror Untransferable();\\nerror ZeroAddress();\\nerror ZeroRate();\\nerror ZeroAmount();\\n\\nstruct Parameters {\\n IERC20 asset;\\n uint256 minTime;\\n uint256 refTime;\\n uint256 excessFactor;\\n uint256 penaltyGrowth;\\n uint256 penaltyThreshold;\\n Market market;\\n address provider;\\n address savings;\\n uint40 duration;\\n uint256 providerRatio;\\n}\\n\\nstruct RewardData {\\n uint40 duration;\\n uint40 finishAt;\\n uint40 updatedAt;\\n uint256 index;\\n /// @notice rate in assets per second with 18 extra decimals\\n uint256 rate;\\n}\\n\\nstruct Permit {\\n uint256 value;\\n uint256 deadline;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n}\\n\",\"keccak256\":\"0x76e7814d6f2dba715c1fae971a81391c37c1ba0855ba341898342f2ebfb7525b\",\"license\":\"MIT\"},\"contracts/utils/FixedLib.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\nimport { Math } from \\\"@openzeppelin/contracts-v4/utils/math/Math.sol\\\";\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\nlibrary FixedLib {\\n using FixedPointMathLib for uint256;\\n\\n uint256 internal constant INTERVAL = 4 weeks;\\n\\n /// @notice Gets the amount of revenue sharing between the backup supplier and the new fixed pool supplier.\\n /// @param pool fixed rate pool.\\n /// @param amount amount being provided by the fixed pool supplier.\\n /// @param backupFeeRate rate charged to the fixed pool supplier to be accrued by the backup supplier.\\n /// @return yield amount to be offered to the fixed pool supplier.\\n /// @return backupFee yield to be accrued by the backup supplier for initially providing the liquidity.\\n function calculateDeposit(\\n Pool memory pool,\\n uint256 amount,\\n uint256 backupFeeRate\\n ) internal pure returns (uint256 yield, uint256 backupFee) {\\n uint256 memBackupSupplied = backupSupplied(pool);\\n if (memBackupSupplied != 0) {\\n yield = pool.unassignedEarnings.mulDivDown(Math.min(amount, memBackupSupplied), memBackupSupplied);\\n backupFee = yield.mulWadDown(backupFeeRate);\\n yield -= backupFee;\\n }\\n }\\n\\n /// @notice Registers an operation to add supply to a fixed rate pool and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be added to the supply.\\n /// @param amount amount to be added to the supply.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function deposit(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.supplied = supplied + amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to reduce borrowed amount from a fixed rate pool\\n /// and potentially reduce backup debt.\\n /// @param pool fixed rate pool where an amount will be repaid.\\n /// @param amount amount to be added to the fixed rate pool.\\n /// @return backupDebtReduction amount that will be reduced from the backup debt.\\n function repay(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtReduction) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n pool.borrowed = borrowed - amount;\\n backupDebtReduction = Math.min(borrowed - Math.min(borrowed, supplied), amount);\\n }\\n\\n /// @notice Registers an operation to increase borrowed amount of a fixed rate pool\\n /// and potentially increase backup debt.\\n /// @param pool fixed rate pool where an amount will be borrowed.\\n /// @param amount amount to be borrowed from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function borrow(Pool storage pool, uint256 amount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 newBorrowed = borrowed + amount;\\n\\n backupDebtAddition = newBorrowed - Math.min(Math.max(borrowed, pool.supplied), newBorrowed);\\n pool.borrowed = newBorrowed;\\n }\\n\\n /// @notice Registers an operation to reduce supply from a fixed rate pool and potentially increase backup debt.\\n /// @param pool fixed rate pool where amount will be withdrawn.\\n /// @param amountToDiscount amount to be withdrawn from the fixed rate pool.\\n /// @return backupDebtAddition amount of new debt that needs to be borrowed from the backup supplier.\\n function withdraw(Pool storage pool, uint256 amountToDiscount) internal returns (uint256 backupDebtAddition) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n uint256 newSupply = supplied - amountToDiscount;\\n\\n backupDebtAddition = Math.min(supplied, borrowed) - Math.min(newSupply, borrowed);\\n pool.supplied = newSupply;\\n }\\n\\n /// @notice Accrues backup earnings from `unassignedEarnings` based on the `lastAccrual` time.\\n /// @param pool fixed rate pool where earnings will be accrued.\\n /// @param maturity maturity date of the pool.\\n /// @return backupEarnings amount of earnings to be distributed to the backup supplier.\\n function accrueEarnings(Pool storage pool, uint256 maturity) internal returns (uint256 backupEarnings) {\\n uint256 lastAccrual = pool.lastAccrual;\\n\\n if (block.timestamp < maturity) {\\n uint256 unassignedEarnings = pool.unassignedEarnings;\\n pool.lastAccrual = block.timestamp;\\n backupEarnings = unassignedEarnings.mulDivDown(block.timestamp - lastAccrual, maturity - lastAccrual);\\n pool.unassignedEarnings = unassignedEarnings - backupEarnings;\\n } else if (lastAccrual == maturity) {\\n backupEarnings = 0;\\n } else {\\n pool.lastAccrual = maturity;\\n backupEarnings = pool.unassignedEarnings;\\n pool.unassignedEarnings = 0;\\n }\\n }\\n\\n /// @notice Calculates the amount that a fixed rate pool borrowed from the backup supplier.\\n /// @param pool fixed rate pool.\\n /// @return amount borrowed from the fixed rate pool.\\n function backupSupplied(Pool memory pool) internal pure returns (uint256) {\\n uint256 borrowed = pool.borrowed;\\n uint256 supplied = pool.supplied;\\n return borrowed - Math.min(borrowed, supplied);\\n }\\n\\n /// @notice Modify positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it. Needs for the amount to be less than the principal and the fee\\n /// @param position original position to be scaled.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return scaled position.\\n function scaleProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 principal = amount.mulDivDown(position.principal, position.principal + position.fee);\\n position.principal = principal;\\n position.fee = amount - principal;\\n return position;\\n }\\n\\n /// @notice Reduce positions based on a certain amount, keeping the original principal/fee ratio.\\n /// @dev modifies the original struct and returns it.\\n /// @param position original position to be reduced.\\n /// @param amount to be used as a full value (principal + interest).\\n /// @return reduced position.\\n function reduceProportionally(Position memory position, uint256 amount) internal pure returns (Position memory) {\\n uint256 positionAssets = position.principal + position.fee;\\n uint256 newPositionAssets = positionAssets - amount;\\n position.principal = newPositionAssets.mulDivDown(position.principal, positionAssets);\\n position.fee = newPositionAssets - position.principal;\\n return position;\\n }\\n\\n /// @notice Calculates what proportion of earnings would `borrowAmount` represent considering `backupSupplied`.\\n /// @param earnings amount to be distributed.\\n /// @param borrowAmount amount that will be checked if came from the backup supplier or fixed rate pool.\\n /// @return unassignedEarnings earnings to be added to `unassignedEarnings`.\\n /// @return backupEarnings earnings to be distributed to the backup supplier.\\n function distributeEarnings(\\n Pool memory pool,\\n uint256 earnings,\\n uint256 borrowAmount\\n ) internal pure returns (uint256 unassignedEarnings, uint256 backupEarnings) {\\n backupEarnings = borrowAmount == 0\\n ? 0\\n : earnings.mulDivDown(borrowAmount - Math.min(backupSupplied(pool), borrowAmount), borrowAmount);\\n unassignedEarnings = earnings - backupEarnings;\\n }\\n\\n /// @notice Adds a maturity date to the borrow or supply positions of the account.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity the new maturity where the account will borrow or supply to.\\n /// @return updated encoded maturity dates.\\n function setMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n // initialize the maturity with also the 1st bit on the 33th position set\\n if (encoded == 0) return maturity | (1 << 32);\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n if (maturity < baseMaturity) {\\n // if the new maturity is lower than the base, set it as the new base\\n // wipe clean the last 32 bits, shift the amount of `INTERVAL` and set the new value with the 33rd bit set\\n uint256 range = (baseMaturity - maturity) / INTERVAL;\\n if (encoded >> (256 - range) != 0) revert MaturityOverflow();\\n encoded = ((encoded >> 32) << (32 + range));\\n return maturity | encoded | (1 << 32);\\n } else {\\n uint256 range = (maturity - baseMaturity) / INTERVAL;\\n if (range > 223) revert MaturityOverflow();\\n return encoded | (1 << (32 + range));\\n }\\n }\\n\\n /// @notice Remove maturity from account's borrow or supplied positions.\\n /// @param encoded encoded maturity dates where the account borrowed or supplied to.\\n /// @param maturity maturity date to be removed.\\n /// @return updated encoded maturity dates.\\n function clearMaturity(uint256 encoded, uint256 maturity) internal pure returns (uint256) {\\n if (encoded == 0 || encoded == maturity | (1 << 32)) return 0;\\n\\n uint256 baseMaturity = encoded & ((1 << 32) - 1);\\n // if the baseMaturity is the one being cleaned\\n if (maturity == baseMaturity) {\\n // wipe 32 bytes + 1 for the old base flag\\n uint256 packed = encoded >> 33;\\n uint256 range = 1;\\n while ((packed & 1) == 0 && packed != 0) {\\n unchecked {\\n ++range;\\n }\\n packed >>= 1;\\n }\\n encoded = ((encoded >> (32 + range)) << 32);\\n return (maturity + (range * INTERVAL)) | encoded;\\n } else {\\n // otherwise just clear the bit\\n return encoded & ~(1 << (32 + ((maturity - baseMaturity) / INTERVAL)));\\n }\\n }\\n\\n /// @notice Verifies that a maturity is `VALID`, `MATURED`, `NOT_READY` or `INVALID`.\\n /// @dev if expected state doesn't match the calculated one, it reverts with a custom error `UnmatchedPoolState`.\\n /// @param maturity timestamp of the maturity date to be verified.\\n /// @param maxPools number of pools available in the time horizon.\\n /// @param requiredState state required by the caller to be verified (see `State` for description).\\n /// @param alternativeState state required by the caller to be verified (see `State` for description).\\n function checkPoolState(uint256 maturity, uint8 maxPools, State requiredState, State alternativeState) internal view {\\n State state;\\n if (maturity % INTERVAL != 0) {\\n state = State.INVALID;\\n } else if (maturity <= block.timestamp) {\\n state = State.MATURED;\\n } else if (maturity > block.timestamp - (block.timestamp % INTERVAL) + (INTERVAL * maxPools)) {\\n state = State.NOT_READY;\\n } else {\\n state = State.VALID;\\n }\\n\\n if (state != requiredState && state != alternativeState) {\\n if (alternativeState == State.NONE) revert UnmatchedPoolState(uint8(state), uint8(requiredState));\\n\\n revert UnmatchedPoolStates(uint8(state), uint8(requiredState), uint8(alternativeState));\\n }\\n }\\n\\n /// @notice Stores the accountability of a fixed interest rate pool.\\n /// @param borrowed total amount borrowed from the pool.\\n /// @param supplied total amount supplied to the pool.\\n /// @param unassignedEarnings total amount of earnings not yet distributed and accrued.\\n /// @param lastAccrual timestamp for the last time that some earnings have been distributed to the backup supplier.\\n struct Pool {\\n uint256 borrowed;\\n uint256 supplied;\\n uint256 unassignedEarnings;\\n uint256 lastAccrual;\\n }\\n\\n /// @notice Stores principal and fee of a borrow or a supply position of a account in a fixed rate pool.\\n /// @param principal amount borrowed or supplied to the fixed rate pool.\\n /// @param fee amount of fees to be repaid or earned at the maturity of the fixed rate pool.\\n struct Position {\\n uint256 principal;\\n uint256 fee;\\n }\\n\\n enum State {\\n NONE,\\n INVALID,\\n MATURED,\\n VALID,\\n NOT_READY\\n }\\n}\\n\\nerror MaturityOverflow();\\nerror UnmatchedPoolState(uint8 state, uint8 requiredState);\\nerror UnmatchedPoolStates(uint8 state, uint8 requiredState, uint8 alternativeState);\\n\",\"keccak256\":\"0x9eb04f02cac9a0c2fd049587524799c8ab4fa1840d9550bad02d87d81074187c\",\"license\":\"BUSL-1.1\"},\"contracts/utils/IPriceFeed.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.17;\\n\\ninterface IPriceFeed {\\n function decimals() external view returns (uint8);\\n\\n function latestAnswer() external view returns (int256);\\n}\\n\",\"keccak256\":\"0xbad2238613d27d2ed8ae0e1ac59a1845f0434fcf3c26fc83bc006b48a33808df\",\"license\":\"BUSL-1.1\"},\"solmate/src/mixins/ERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\nimport {SafeTransferLib} from \\\"../utils/SafeTransferLib.sol\\\";\\nimport {FixedPointMathLib} from \\\"../utils/FixedPointMathLib.sol\\\";\\n\\n/// @notice Minimal ERC4626 tokenized Vault implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)\\nabstract contract ERC4626 is ERC20 {\\n using SafeTransferLib for ERC20;\\n using FixedPointMathLib for uint256;\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /*//////////////////////////////////////////////////////////////\\n IMMUTABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n ERC20 public immutable asset;\\n\\n constructor(\\n ERC20 _asset,\\n string memory _name,\\n string memory _symbol\\n ) ERC20(_name, _symbol, _asset.decimals()) {\\n asset = _asset;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {\\n // Check for rounding error since we round down in previewDeposit.\\n require((shares = previewDeposit(assets)) != 0, \\\"ZERO_SHARES\\\");\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {\\n assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up.\\n\\n // Need to transfer before minting or ERC777s could reenter.\\n asset.safeTransferFrom(msg.sender, address(this), assets);\\n\\n _mint(receiver, shares);\\n\\n emit Deposit(msg.sender, receiver, assets, shares);\\n\\n afterDeposit(assets, shares);\\n }\\n\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 shares) {\\n shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up.\\n\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) public virtual returns (uint256 assets) {\\n if (msg.sender != owner) {\\n uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\\n }\\n\\n // Check for rounding error since we round down in previewRedeem.\\n require((assets = previewRedeem(shares)) != 0, \\\"ZERO_ASSETS\\\");\\n\\n beforeWithdraw(assets, shares);\\n\\n _burn(owner, shares);\\n\\n emit Withdraw(msg.sender, receiver, owner, assets, shares);\\n\\n asset.safeTransfer(receiver, assets);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ACCOUNTING LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function totalAssets() public view virtual returns (uint256);\\n\\n function convertToShares(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets());\\n }\\n\\n function convertToAssets(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply);\\n }\\n\\n function previewDeposit(uint256 assets) public view virtual returns (uint256) {\\n return convertToShares(assets);\\n }\\n\\n function previewMint(uint256 shares) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply);\\n }\\n\\n function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\\n uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\\n\\n return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\\n }\\n\\n function previewRedeem(uint256 shares) public view virtual returns (uint256) {\\n return convertToAssets(shares);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPOSIT/WITHDRAWAL LIMIT LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function maxDeposit(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxMint(address) public view virtual returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n function maxWithdraw(address owner) public view virtual returns (uint256) {\\n return convertToAssets(balanceOf[owner]);\\n }\\n\\n function maxRedeem(address owner) public view virtual returns (uint256) {\\n return balanceOf[owner];\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL HOOKS LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {}\\n\\n function afterDeposit(uint256 assets, uint256 shares) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa0e0c28a727524fa94e7e6c1f4c793a6bd1e6d1bc652b7b02b343ebaf4cd774b\",\"license\":\"MIT\"},\"solmate/src/tokens/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\\nabstract contract ERC20 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n uint8 public immutable decimals;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) public balanceOf;\\n\\n mapping(address => mapping(address => uint256)) public allowance;\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal immutable INITIAL_CHAIN_ID;\\n\\n bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\\n\\n mapping(address => uint256) public nonces;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint8 _decimals\\n ) {\\n name = _name;\\n symbol = _symbol;\\n decimals = _decimals;\\n\\n INITIAL_CHAIN_ID = block.chainid;\\n INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 amount) public virtual returns (bool) {\\n allowance[msg.sender][spender] = amount;\\n\\n emit Approval(msg.sender, spender, amount);\\n\\n return true;\\n }\\n\\n function transfer(address to, uint256 amount) public virtual returns (bool) {\\n balanceOf[msg.sender] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(msg.sender, to, amount);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual returns (bool) {\\n uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\\n\\n balanceOf[from] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n return true;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 LOGIC\\n //////////////////////////////////////////////////////////////*/\\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 ) public virtual {\\n require(deadline >= block.timestamp, \\\"PERMIT_DEADLINE_EXPIRED\\\");\\n\\n // Unchecked because the only math done is incrementing\\n // the owner's nonce which cannot realistically overflow.\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\n \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n ),\\n owner,\\n spender,\\n value,\\n nonces[owner]++,\\n deadline\\n )\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"INVALID_SIGNER\\\");\\n\\n allowance[recoveredAddress][spender] = value;\\n }\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\\n return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\\n }\\n\\n function computeDomainSeparator() internal view virtual returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 amount) internal virtual {\\n totalSupply += amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(address(0), to, amount);\\n }\\n\\n function _burn(address from, uint256 amount) internal virtual {\\n balanceOf[from] -= amount;\\n\\n // Cannot underflow because a user's balance\\n // will never be larger than the total supply.\\n unchecked {\\n totalSupply -= amount;\\n }\\n\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0x43aa1509bb753f053143530705d9c4eee415691d26a4779769bf028a74e6ac69\",\"license\":\"MIT\"},\"solmate/src/utils/FixedPointMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\n/// @notice Arithmetic library with operations for fixed-point numbers.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)\\nlibrary FixedPointMathLib {\\n /*//////////////////////////////////////////////////////////////\\n SIMPLIFIED FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.\\n\\n function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.\\n }\\n\\n function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.\\n }\\n\\n function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.\\n }\\n\\n function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.\\n }\\n\\n function powWad(int256 x, int256 y) internal pure returns (int256) {\\n // Equivalent to x to the power of y because x ** y = (e ** ln(x)) ** y = e ** (ln(x) * y)\\n return expWad((lnWad(x) * y) / int256(WAD)); // Using ln(x) means x must be greater than 0.\\n }\\n\\n function expWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n // When the result is < 0.5 we return zero. This happens when\\n // x <= floor(log(0.5e18) * 1e18) ~ -42e18\\n if (x <= -42139678854452767551) return 0;\\n\\n // When the result is > (2**255 - 1) / 1e18 we can not represent it as an\\n // int. This happens when x >= floor(log((2**255 - 1) / 1e18) * 1e18) ~ 135.\\n if (x >= 135305999368893231589) revert(\\\"EXP_OVERFLOW\\\");\\n\\n // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96\\n // for more intermediate precision and a binary basis. This base conversion\\n // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.\\n x = (x << 78) / 5**18;\\n\\n // Reduce range of x to (-\\u00bd ln 2, \\u00bd ln 2) * 2**96 by factoring out powers\\n // of two such that exp(x) = exp(x') * 2**k, where k is an integer.\\n // Solving this gives k = round(x / log(2)) and x' = x - k * log(2).\\n int256 k = ((x << 96) / 54916777467707473351141471128 + 2**95) >> 96;\\n x = x - k * 54916777467707473351141471128;\\n\\n // k is in the range [-61, 195].\\n\\n // Evaluate using a (6, 7)-term rational approximation.\\n // p is made monic, we'll multiply by a scale factor later.\\n int256 y = x + 1346386616545796478920950773328;\\n y = ((y * x) >> 96) + 57155421227552351082224309758442;\\n int256 p = y + x - 94201549194550492254356042504812;\\n p = ((p * y) >> 96) + 28719021644029726153956944680412240;\\n p = p * x + (4385272521454847904659076985693276 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n int256 q = x - 2855989394907223263936484059900;\\n q = ((q * x) >> 96) + 50020603652535783019961831881945;\\n q = ((q * x) >> 96) - 533845033583426703283633433725380;\\n q = ((q * x) >> 96) + 3604857256930695427073651918091429;\\n q = ((q * x) >> 96) - 14423608567350463180887372962807573;\\n q = ((q * x) >> 96) + 26449188498355588339934803723976023;\\n\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial won't have zeros in the domain as all its roots are complex.\\n // No scaling is necessary because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r should be in the range (0.09, 0.25) * 2**96.\\n\\n // We now need to multiply r by:\\n // * the scale factor s = ~6.031367120.\\n // * the 2**k factor from the range reduction.\\n // * the 1e18 / 2**96 factor for base conversion.\\n // We do this all at once, with an intermediate result in 2**213\\n // basis, so the final right shift is always by a positive amount.\\n r = int256((uint256(r) * 3822833074963236453042738258902158003155416615667) >> uint256(195 - k));\\n }\\n }\\n\\n function lnWad(int256 x) internal pure returns (int256 r) {\\n unchecked {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n // We want to convert x from 10**18 fixed point to 2**96 fixed point.\\n // We do this by multiplying by 2**96 / 10**18. But since\\n // ln(x * C) = ln(x) + ln(C), we can simply do nothing here\\n // and add ln(2**96 / 10**18) at the end.\\n\\n // Reduce range of x to (1, 2) * 2**96\\n // ln(2^k * x) = k * ln(2) + ln(x)\\n int256 k = int256(log2(uint256(x))) - 96;\\n x <<= uint256(159 - k);\\n x = int256(uint256(x) >> 159);\\n\\n // Evaluate using a (8, 8)-term rational approximation.\\n // p is made monic, we will multiply by a scale factor later.\\n int256 p = x + 3273285459638523848632254066296;\\n p = ((p * x) >> 96) + 24828157081833163892658089445524;\\n p = ((p * x) >> 96) + 43456485725739037958740375743393;\\n p = ((p * x) >> 96) - 11111509109440967052023855526967;\\n p = ((p * x) >> 96) - 45023709667254063763336534515857;\\n p = ((p * x) >> 96) - 14706773417378608786704636184526;\\n p = p * x - (795164235651350426258249787498 << 96);\\n\\n // We leave p in 2**192 basis so we don't need to scale it back up for the division.\\n // q is monic by convention.\\n int256 q = x + 5573035233440673466300451813936;\\n q = ((q * x) >> 96) + 71694874799317883764090561454958;\\n q = ((q * x) >> 96) + 283447036172924575727196451306956;\\n q = ((q * x) >> 96) + 401686690394027663651624208769553;\\n q = ((q * x) >> 96) + 204048457590392012362485061816622;\\n q = ((q * x) >> 96) + 31853899698501571402653359427138;\\n q = ((q * x) >> 96) + 909429971244387300277376558375;\\n assembly {\\n // Div in assembly because solidity adds a zero check despite the unchecked.\\n // The q polynomial is known not to have zeros in the domain.\\n // No scaling required because p is already 2**96 too large.\\n r := sdiv(p, q)\\n }\\n\\n // r is in the range (0, 0.125) * 2**96\\n\\n // Finalization, we need to:\\n // * multiply by the scale factor s = 5.549\\u2026\\n // * add ln(2**96 / 10**18)\\n // * add k * ln(2)\\n // * multiply by 10**18 / 2**96 = 5**18 >> 78\\n\\n // mul s * 5e18 * 2**96, base is now 5**18 * 2**192\\n r *= 1677202110996718588342820967067443963516166;\\n // add ln(2) * k * 5e18 * 2**192\\n r += 16597577552685614221487285958193947469193820559219878177908093499208371 * k;\\n // add ln(2**96 / 10**18) * 5e18 * 2**192\\n r += 600920179829731861736702779321621459595472258049074101567377883020018308;\\n // base conversion: mul 2**18 / 2**192\\n r >>= 174;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n LOW LEVEL FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function mulDivDown(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // Divide z by the denominator.\\n z := div(z, denominator)\\n }\\n }\\n\\n function mulDivUp(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n assembly {\\n // Store x * y in z for now.\\n z := mul(x, y)\\n\\n // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))\\n if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) {\\n revert(0, 0)\\n }\\n\\n // First, divide z - 1 by the denominator and add 1.\\n // We allow z - 1 to underflow if z is 0, because we multiply the\\n // end result by 0 if z is zero, ensuring we return 0 if z is zero.\\n z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1))\\n }\\n }\\n\\n function rpow(\\n uint256 x,\\n uint256 n,\\n uint256 scalar\\n ) internal pure returns (uint256 z) {\\n assembly {\\n switch x\\n case 0 {\\n switch n\\n case 0 {\\n // 0 ** 0 = 1\\n z := scalar\\n }\\n default {\\n // 0 ** n = 0\\n z := 0\\n }\\n }\\n default {\\n switch mod(n, 2)\\n case 0 {\\n // If n is even, store scalar in z for now.\\n z := scalar\\n }\\n default {\\n // If n is odd, store x in z for now.\\n z := x\\n }\\n\\n // Shifting right by 1 is like dividing by 2.\\n let half := shr(1, scalar)\\n\\n for {\\n // Shift n right by 1 before looping to halve it.\\n n := shr(1, n)\\n } n {\\n // Shift n right by 1 each iteration to halve it.\\n n := shr(1, n)\\n } {\\n // Revert immediately if x ** 2 would overflow.\\n // Equivalent to iszero(eq(div(xx, x), x)) here.\\n if shr(128, x) {\\n revert(0, 0)\\n }\\n\\n // Store x squared.\\n let xx := mul(x, x)\\n\\n // Round to the nearest number.\\n let xxRound := add(xx, half)\\n\\n // Revert if xx + half overflowed.\\n if lt(xxRound, xx) {\\n revert(0, 0)\\n }\\n\\n // Set x to scaled xxRound.\\n x := div(xxRound, scalar)\\n\\n // If n is even:\\n if mod(n, 2) {\\n // Compute z * x.\\n let zx := mul(z, x)\\n\\n // If z * x overflowed:\\n if iszero(eq(div(zx, x), z)) {\\n // Revert if x is non-zero.\\n if iszero(iszero(x)) {\\n revert(0, 0)\\n }\\n }\\n\\n // Round to the nearest number.\\n let zxRound := add(zx, half)\\n\\n // Revert if zx + half overflowed.\\n if lt(zxRound, zx) {\\n revert(0, 0)\\n }\\n\\n // Return properly scaled zxRound.\\n z := div(zxRound, scalar)\\n }\\n }\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n GENERAL NUMBER UTILITIES\\n //////////////////////////////////////////////////////////////*/\\n\\n function sqrt(uint256 x) internal pure returns (uint256 z) {\\n assembly {\\n let y := x // We start y at x, which will help us make our initial estimate.\\n\\n z := 181 // The \\\"correct\\\" value is 1, but this saves a multiplication later.\\n\\n // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad\\n // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.\\n\\n // We check y >= 2^(k + 8) but shift right by k bits\\n // each branch to ensure that if x >= 256, then y >= 256.\\n if iszero(lt(y, 0x10000000000000000000000000000000000)) {\\n y := shr(128, y)\\n z := shl(64, z)\\n }\\n if iszero(lt(y, 0x1000000000000000000)) {\\n y := shr(64, y)\\n z := shl(32, z)\\n }\\n if iszero(lt(y, 0x10000000000)) {\\n y := shr(32, y)\\n z := shl(16, z)\\n }\\n if iszero(lt(y, 0x1000000)) {\\n y := shr(16, y)\\n z := shl(8, z)\\n }\\n\\n // Goal was to get z*z*y within a small factor of x. More iterations could\\n // get y in a tighter range. Currently, we will have y in [256, 256*2^16).\\n // We ensured y >= 256 so that the relative difference between y and y+1 is small.\\n // That's not possible if x < 256 but we can just verify those cases exhaustively.\\n\\n // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.\\n // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.\\n // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.\\n\\n // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range\\n // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.\\n\\n // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate\\n // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.\\n\\n // There is no overflow risk here since y < 2^136 after the first branch above.\\n z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.\\n\\n // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n\\n // If x+1 is a perfect square, the Babylonian method cycles between\\n // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.\\n // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\\n // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.\\n // If you don't care whether the floor or ceil square root is returned, you can remove this statement.\\n z := sub(z, lt(div(x, z), z))\\n }\\n }\\n\\n function log2(uint256 x) internal pure returns (uint256 r) {\\n require(x > 0, \\\"UNDEFINED\\\");\\n\\n assembly {\\n r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))\\n r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))\\n r := or(r, shl(5, lt(0xffffffff, shr(r, x))))\\n r := or(r, shl(4, lt(0xffff, shr(r, x))))\\n r := or(r, shl(3, lt(0xff, shr(r, x))))\\n r := or(r, shl(2, lt(0xf, shr(r, x))))\\n r := or(r, shl(1, lt(0x3, shr(r, x))))\\n r := or(r, lt(0x1, shr(r, x)))\\n }\\n }\\n\\n function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := mod(x, y)\\n }\\n }\\n\\n function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // z will equal 0 if y is 0, unlike in Solidity where it will revert.\\n z := div(x, y)\\n }\\n }\\n\\n /// @dev Will return 0 instead of reverting if y is zero.\\n function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n assembly {\\n // Add 1 to x * y if x % y > 0.\\n z := add(gt(mod(x, y), 0), div(x, y))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0bf1d4f3999a4471e0fded0a2f67e7fe328e2a27385348571b1fc0a8d9c9f62e\",\"license\":\"MIT\"},\"solmate/src/utils/SafeTransferLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.0;\\n\\nimport {ERC20} from \\\"../tokens/ERC20.sol\\\";\\n\\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)\\n/// @dev Caution! This library won't check that a token has code, responsibility is delegated to the caller.\\nlibrary SafeTransferLib {\\n /*//////////////////////////////////////////////////////////////\\n ETH OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n bool success;\\n\\n assembly {\\n // Transfer the ETH and store if it succeeded or not.\\n success := call(gas(), to, amount, 0, 0, 0, 0)\\n }\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function safeTransferFrom(\\n ERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\\n mstore(4, and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \\\"from\\\" argument.\\n mstore(36, and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \\\"to\\\" argument.\\n mstore(68, amount) // Append the \\\"amount\\\" argument. Masking not required as it's a full 32 byte type.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 100 because that's the total length of our calldata (4 + 32 * 3)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 100, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\\n mstore(4, and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument. Masking not required as it's a full 32 byte type.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n ERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n bool success;\\n\\n assembly {\\n // We'll write our calldata to this slot below, but restore it later.\\n let memPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(0, 0x095ea7b300000000000000000000000000000000000000000000000000000000)\\n mstore(4, to) // Append the \\\"to\\\" argument.\\n mstore(36, amount) // Append the \\\"amount\\\" argument.\\n\\n success := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because that's the total length of our calldata (4 + 32 * 2)\\n // Counterintuitively, this call() must be positioned after the or() in the\\n // surrounding and() because and() evaluates its arguments from right to left.\\n call(gas(), token, 0, 0, 68, 0, 32)\\n )\\n\\n mstore(0x60, 0) // Restore the zero slot to zero.\\n mstore(0x40, memPointer) // Restore the memPointer.\\n }\\n\\n require(success, \\\"APPROVE_FAILED\\\");\\n }\\n}\\n\",\"keccak256\":\"0xbb4580ec2c735b5f31bb176567c886a87c2800b3eff132eda15ddc2b28cc2932\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052348015600e575f80fd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615650806100d65f395ff3fe608060405234801561000f575f80fd5b5060043610610580575f3560e01c80638456cb59116102db578063c483021011610187578063d547741f116100e8578063e63ab1e91161009e578063f2be153611610079578063f2be153614610d1d578063f804a99014610d3c578063f8d7eb9e14610d4f575f80fd5b8063e63ab1e914610ce3578063eeca156214610d0a578063ef8b30f714610ba6575f80fd5b8063d8d5eaf4116100ce578063d8d5eaf414610c4f578063d905777e14610c79578063dd62ed3e14610c8c575f80fd5b8063d547741f14610c29578063d6ef7af014610c3c575f80fd5b8063ce96cb771161013d578063d1058e5911610123578063d1058e5914610bfb578063d19fb4fb14610c03578063d505accf14610c16575f80fd5b8063ce96cb7714610bd5578063cfd8d6c014610be8575f80fd5b8063c6e6f5921161016d578063c6e6f59214610ba6578063c86d6ae414610bb9578063c91e514914610bcc575f80fd5b8063c483021014610b9e578063c63d75b614610867575f80fd5b8063a9059cbb1161023c578063b460af94116101f2578063b6d0dcd8116101cd578063b6d0dcd814610b65578063b81ff16114610b78578063ba08765214610b8b575f80fd5b8063b460af9414610b36578063b66503cf14610b49578063b674852814610b5c575f80fd5b8063ab9ade5511610222578063ab9ade5514610b07578063afe7d3b414610b1a578063b3d7f6b914610b23575f80fd5b8063a9059cbb14610ae1578063aa5e933414610af4575f80fd5b806393f89a801161029157806395d89b411161027757806395d89b4114610abd578063a119dd9214610ac5578063a217fddf14610ada575f80fd5b806393f89a8014610a9757806394bf804d14610aaa575f80fd5b80638cc59a0a116102c15780638cc59a0a14610a2157806391d1485414610a2a57806391ddadf414610a81575f80fd5b80638456cb59146109fe57806384b0196e14610a06575f80fd5b806336568abe1161043a5780635bae7f1b1161039b5780636e76fc8f1161035157806373c8b51f1161032c57806373c8b51f146109c55780637ecebe00146109d857806380f55605146109eb575f80fd5b80636e76fc8f146109615780636e9bf17f1461098857806370a08231146109b2575f80fd5b80636dcea85f116103815780636dcea85f146109285780636e553f651461093b5780636e5c4c781461094e575f80fd5b80635bae7f1b146108c55780635c975abb146108fe575f80fd5b8063402d267d116103f05780634bf5d7e9116103d65780634bf5d7e9146108835780634cdad506146106615780634fcb7d31146108bc575f80fd5b8063402d267d146108675780634641257d1461087b575f80fd5b80633d31410c116104205780633d31410c146108395780633ee07ffb1461084c5780633f4ba83a1461085f575f80fd5b806336568abe146107f657806338d52e0f14610809575f80fd5b80631003f1a9116104e457806323b872dd1161049a5780632f2ff15d116104805780632f2ff15d146107c1578063313ce567146107d45780633644e515146107ee575f80fd5b806323b872dd1461076d578063248a9ca314610780575f80fd5b806318160ddd116104ca57806318160ddd1461072a5780631aa43078146107515780631e83409a1461075a575f80fd5b80631003f1a91461070257806314bc823714610717575f80fd5b8063085d4883116105395780630a28a4771161051f5780630a28a477146106b25780630bf0fc82146106c55780630c9cbf0e146106d8575f80fd5b8063085d488314610674578063095ea7b31461069f575f80fd5b806306fdde031161056957806306fdde03146105c25780630700037d146105d757806307a2d13a14610661575f80fd5b806301e1d1141461058457806301ffc9a71461059f575b5f80fd5b61058c610d62565b6040519081526020015b60405180910390f35b6105b26105ad366004614d87565b610d90565b6040519015158152602001610596565b6105ca610df8565b6040516105969190614ddc565b61062a6105e5366004614e12565b600a6020525f908152604090208054600182015460029092015464ffffffffff808316936501000000000084048216936a010000000000000000000090049091169185565b6040805164ffffffffff9687168152948616602086015292909416918301919091526060820152608081019190915260a001610596565b61058c61066f366004614e2d565b610eb0565b600754610687906001600160a01b031681565b6040516001600160a01b039091168152602001610596565b6105b26106ad366004614e44565b610ebb565b61058c6106c0366004614e2d565b610ed2565b61058c6106d3366004614e12565b610ede565b61058c6106e6366004614e6e565b600d60209081525f928352604080842090915290825290205481565b610715610710366004614e12565b610fa6565b005b61058c610725366004614ea5565b611104565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace025461058c565b61058c60015481565b610715610768366004614e12565b611151565b6105b261077b366004614ea5565b61115e565b61058c61078e366004614e2d565b5f9081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b6107156107cf366004614ee3565b611181565b6107dc6111ca565b60405160ff9091168152602001610596565b61058c6111d3565b610715610804366004614ee3565b6111dc565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00546001600160a01b0316610687565b61058c610847366004614f06565b61122d565b61071561085a366004614e2d565b611339565b6107156113c4565b61058c610875366004614e12565b505f1990565b6107156113f6565b60408051808201909152600e81527f6d6f64653d74696d657374616d7000000000000000000000000000000000000060208201526105ca565b61058c60035481565b61058c6108d3366004614e6e565b6001600160a01b038082165f908152600c602090815260408083209386168352929052205492915050565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff166105b2565b610715610936366004614e12565b611655565b61058c610949366004614ee3565b611717565b61071561095c366004614f9e565b611732565b61058c7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b61058c610996366004614e6e565b600e60209081525f928352604080842090915290825290205481565b61058c6109c0366004614e12565b6119dc565b6107156109d3366004615052565b611a1f565b61058c6109e6366004614e12565b611aea565b600654610687906001600160a01b031681565b610715611af4565b610a0e611b06565b6040516105969796959493929190615085565b61058c60045481565b6105b2610a38366004614ee3565b5f9182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60405165ffffffffffff42168152602001610596565b610715610aa5366004614e2d565b611ba2565b61058c610ab8366004614ee3565b611be3565b6105ca611bfe565b610acd611c4f565b6040516105969190615137565b61058c5f81565b6105b2610aef366004614e44565b611cae565b610715610b02366004614e2d565b611cbb565b61058c610b15366004614ea5565b611d25565b61058c60025481565b61058c610b31366004614e2d565b611d80565b61058c610b44366004615182565b611d8c565b610715610b57366004614e44565b611e05565b61058c60095481565b610687610b73366004614e2d565b611e1a565b610715610b86366004614e12565b611e41565b61058c610b99366004615182565b611f94565b61058c606481565b61058c610bb4366004614e2d565b61200d565b600854610687906001600160a01b031681565b61058c60055481565b61058c610be3366004614e12565b612018565b610715610bf6366004614e12565b61202b565b61071561208f565b61058c610c11366004614ea5565b6120d1565b610715610c243660046151d1565b6121e9565b610715610c37366004614ee3565b612370565b610715610c4a366004614e44565b6123b3565b61058c610c5d366004614e6e565b600c60209081525f928352604080842090915290825290205481565b61058c610c87366004614e12565b612551565b61058c610c9a366004614e6e565b6001600160a01b039182165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b61058c7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61058c610d18366004614e2d565b61255b565b61058c610d2b366004614e12565b600b6020525f908152604090205481565b610715610d4a366004614e2d565b612573565b610715610d5d366004614e12565b6125f0565b5f610d8b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace025490565b905090565b5f6001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610df257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60605f7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005b9050806003018054610e2e9061523b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e5a9061523b565b8015610ea55780601f10610e7c57610100808354040283529160200191610ea5565b820191905f5260205f20905b815481529060010190602001808311610e8857829003601f168201915b505050505091505090565b5f610df2825f61267b565b5f33610ec88185856126d2565b5060019392505050565b5f610df28260016126df565b6001600160a01b0381165f908152600a602052604081207f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02545f03610f27576001015492915050565b8054610f909064ffffffffff6a01000000000000000000008204811691610f5891650100000000009091041661255b565b610f629190615287565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02546002840154919061272d565b8160010154610f9f919061529a565b9392505050565b5f610fb08161274b565b6001600160a01b0382165f908152600a602052604081205483916501000000000090910464ffffffffff169003610ffa5760405163dd15e71560e01b815260040160405180910390fd5b61100383612755565b6001600160a01b0383165f908152600a602052604090205465010000000000900464ffffffffff164210156110ab576001600160a01b038084165f908152600a6020526040902080544264ffffffffff8181166501000000000090810269ffffffffff0000000000198516178555600854600290950154930416936110a9931691611098916110929086615287565b906127c8565b6001600160a01b03871691906127dc565b505b6006546001600160a01b03908116908416036110ca576110ca5f61202b565b60405133906001600160a01b038516907f6b32317bb85aaa626418b993ebb1b0856757f1e57b3349a89a6acaea87bd15c1905f90a3505050565b6001600160a01b038083165f908152600c602090815260408083209387168352929052908120546111499061113886610ede565b6111429190615287565b83906127c8565b949350505050565b61115b8133612850565b50565b5f3361116b858285612a80565b611176858585612b2d565b506001949350505050565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260409020600101546111ba8161274b565b6111c48383612b8a565b50505050565b5f610d8b612c56565b5f610d8b612c98565b6001600160a01b038116331461121e576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112288282612ca1565b505050565b5f61125f7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00546001600160a01b031690565b6001600160a01b031663d505accf8430853560208701356112866060890160408a016152ad565b6040516001600160e01b031960e088901b1681526001600160a01b0395861660048201529490931660248501526044840191909152606483015260ff166084820152606085013560a4820152608085013560c482015260e4015f604051808303815f87803b1580156112f6575f80fd5b505af1925050508015611307575060015b505f19611318565b60405180910390fd5b5f6113228661200d565b905061133085868884612d45565b95945050505050565b5f6113438161274b565b670de0b6b3a7640000821115611385576040517f648564d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600982905560405182815233907f8fa281d02a496c3848901321abdd8d00f14ee5706a12b8c6ff6e3a9a097afc08906020015b60405180910390a25050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6113ee8161274b565b61115b612de4565b6113fe612e56565b6006546007546040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820181905230602483015291909216915f9061151d90849063dd62ed3e90604401602060405180830381865afa158015611473573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061149791906152c6565b6040517fd905777e0000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015286169063d905777e90602401602060405180830381865afa1580156114f4573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061151891906152c6565b612eb2565b90505f611535600954836127c890919063ffffffff16565b6007546040516323b872dd60e01b81526001600160a01b039182166004820152306024820152604481018390529192508516906323b872dd906064016020604051808303815f875af115801561158d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115b191906152dd565b505f6115bd8284615287565b90508015611643576008546040516323b872dd60e01b81526001600160a01b038681166004830152918216602482015260448101839052908616906323b872dd906064016020604051808303815f875af115801561161d573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061164191906152dd565b505b61164e858330612ec7565b5050505050565b5f61165f8161274b565b6001600160a01b0382166116865760405163d92e233d60e01b815260040160405180910390fd5b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091555f908152600a602052604081205465010000000000900464ffffffffff1690036116de576116de82611e41565b60405133906001600160a01b038416907f9befd548a45bf1eebac6219d0f8cdce0f6a86fc087bc042116131d777d26c008905f90a35050565b5f5f195f6117248561200d565b905061114933858784612d45565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f8115801561177c5750825b90505f8267ffffffffffffffff1660011480156117985750303b155b9050811580156117a6575080155b156117dd576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561181157845468ff00000000000000001916680100000000000000001785555b6118726040518060400160405280600a8152602001697374616b65642045584160b01b8152506040518060400160405280600581526020017f73744558410000000000000000000000000000000000000000000000000000008152506131b9565b855161187d906131cb565b6118a86040518060400160405280600a8152602001697374616b65642045584160b01b8152506131dc565b6118b0613223565b6118ba5f33612b8a565b50604086015115806118d457508560200151866040015111155b806118ea5750670de0b6b3a76400008660600151115b156119085760405163561ce9bb60e01b815260040160405180910390fd5b6119158660200151611ba2565b60408601516002556060860151600355608086015161193390612573565b6119408660a00151611cbb565b61194d8660c00151611655565b6119608660c00151876101200151611a1f565b61196d8660e0015161202b565b61197b866101400151611339565b6119898661010001516125f0565b83156119d457845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b5f807f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005b6001600160a01b039093165f9081526020939093525050604090205490565b5f611a298161274b565b6001600160a01b0383165f908152600a602052604090208054426501000000000090910464ffffffffff161115611a8c576040517f52f0214c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805464ffffffffff191664ffffffffff8416908117825560405190815233906001600160a01b038616907f307065155c111638dfa8c188a29ab8abc925f17d3616388c7683d0d45a29a453906020015b60405180910390a350505050565b5f610df28261322b565b611afc613253565b611b046132f6565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1008054909150158015611b4457506001810154155b611b4c575f80fd5b611b54613351565b611b5c6133a2565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b5f611bac8161274b565b600182905560405182815233907fcb90293a116713eb442bb98d30c95b14fa981b1bf6f9ee8e1bf3c856e8ded54e906020016113b8565b5f5f195f611bf085611d80565b905061114933858388612d45565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060917f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0091610e2e9061523b565b60605f805480602002602001604051908101604052809291908181526020018280548015611ca457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c86575b5050505050905090565b5f33610ec8818585612b2d565b5f611cc58161274b565b670de0b6b3a7640000821115611cee5760405163561ce9bb60e01b815260040160405180910390fd5b600582905560405182815233907f33b1804f184927027d7ac0f874248c83a39e0ec20e93e8574499c14a5083886f906020016113b8565b6001600160a01b0382165f908152600b6020526040812054808203611d4d575f915050610f9f565b611330611d7582611d6642670de0b6b3a76400006152fc565b611d709190615287565b6133cb565b611092878787611104565b5f610df282600161267b565b5f80611d9783612018565b905080851115611dec576040517ffe9cceec0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018690526044810182905260640161130f565b5f611df686610ed2565b9050611330338686898561350d565b5f611e0f8161274b565b611228838333612ec7565b5f8181548110611e28575f80fd5b5f918252602090912001546001600160a01b0316905081565b5f611e4b8161274b565b5f54606411611e86576040517f9e10ac0e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f908152600a602052604090205465010000000000900464ffffffffff1615611ee5576040517ff2a5f75a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f818152600a6020526040808220805469ffffffffff00000000001916650100000000004264ffffffffff160217905581546001810183558280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56301805473ffffffffffffffffffffffffffffffffffffffff191684179055513392917f9749fb908457c4fa0afa13661b7b5b02c584a8ae47610ccc7a65d7d500951db491a35050565b5f80611f9f83612551565b905080851115611ff4576040517fb94abeec0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018690526044810182905260640161130f565b5f611ffe86610eb0565b9050611330338686848a61350d565b5f610df2825f6126df565b5f610df2612025836119dc565b5f61267b565b5f6120358161274b565b6007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040513391907f95d5fab7f1c5262ecb5edffc2c96c30c43871f674976c8ab4fe5ca8a440c3e4b905f90a35050565b5f5b5f5481101561115b576120c95f82815481106120af576120af615313565b5f918252602090912001546001600160a01b031633612850565b600101612091565b6001600160a01b0382165f908152600b6020526040812054801580612126575060015461210690670de0b6b3a76400006152fc565b8161211942670de0b6b3a76400006152fc565b6121239190615287565b11155b15612134575f915050610f9f565b5f612140868686611d25565b90505f61214c866119dc565b9050805f03612160575f9350505050610f9f565b6001600160a01b038087165f908152600d60209081526040808320938b168352929052908120546121929087906152fc565b90505f81156121c157826121a7600184615287565b6121b1919061533b565b6121bc90600161529a565b6121c3565b5f5b90508084116121d2575f6121dc565b6121dc8185615287565b9998505050505050505050565b83421115612226576040517f627913020000000000000000000000000000000000000000000000000000000081526004810185905260240161130f565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886122908c6001600160a01b03165f9081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb006020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f6122ea826135d4565b90505f6122f98287878761361b565b9050896001600160a01b0316816001600160a01b031614612359576040517f4b800e460000000000000000000000000000000000000000000000000000000081526001600160a01b0380831660048301528b16602482015260440161130f565b6123648a8a8a6126d2565b50505050505050505050565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260409020600101546123a98161274b565b6111c48383612ca1565b5f6123bd8161274b565b6001600160a01b0383165f908152600a602052604081205484916501000000000090910464ffffffffff1690036124075760405163dd15e71560e01b815260040160405180910390fd5b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00546001600160a01b0385811691161480156124b95750612446610d62565b6040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa158015612488573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124ac91906152c6565b6124b69190615287565b83115b156124d757604051631e9acf1760e31b815260040160405180910390fd5b6008546001600160a01b03908116906124f390861682866127dc565b846001600160a01b0316816001600160a01b0316336001600160a01b03167f32b1e0bba5a0cc4fd21791ce82f252a2856ac08805daa381eac01077e0232eb18760405161254291815260200190565b60405180910390a45050505050565b5f610df2826119dc565b5f6125668242612eb2565b64ffffffffff1692915050565b5f61257d8161274b565b67016345785d8a000082108061259b575068056bc75e2d6310000082115b156125b95760405163561ce9bb60e01b815260040160405180910390fd5b600482905560405182815233907fde98b8145241ddecb3a88a40e29bc18e7f3a091cf2d92e9891fffe71bf303890906020016113b8565b5f6125fa8161274b565b6001600160a01b0382166126215760405163d92e233d60e01b815260040160405180910390fd5b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040513391907ff0e8bebe3659a97126f43e3d176f7555480c335f92ca957254992ce32b551aff905f90a35050565b5f610f9f612687610d62565b61269290600161529a565b61269d5f600a615431565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02546126c9919061529a565b85919085613647565b6112288383836001613694565b5f610f9f6126ee82600a615431565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace025461271a919061529a565b612722610d62565b6126c990600161529a565b828202811515841585830485141716612744575f80fd5b0492915050565b61115b81336137ad565b6001600160a01b0381165f908152600a6020526040902061277582610ede565b600182015580546127959065010000000000900464ffffffffff1661255b565b815464ffffffffff919091166a0100000000000000000000026effffffffff000000000000000000001990911617905550565b5f610f9f8383670de0b6b3a764000061272d565b6040516001600160a01b0383811660248301526044820183905261122891859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613839565b612858612e56565b6001600160a01b0381165f908152600b602052604081205461288242670de0b6b3a76400006152fc565b61288c9190615287565b9050600154670de0b6b3a76400006128a491906152fc565b81116128af57505050565b6001600160a01b038083165f908152600d60209081526040808320938716835292905290812054906128ee6128e88686610b15816119dc565b836138b3565b90505f6128fb8383615287565b905080156129335761290d818461529a565b6001600160a01b038087165f908152600d60209081526040808320938b16835292905220555b60025461294890670de0b6b3a76400006152fc565b841115612a10575f61295e8787610725896119dc565b6001600160a01b038088165f908152600e60209081526040808320938c168352929052908120549192506129928386612eb2565b90505f61299f838361529a565b84116129ab575f6129c0565b826129b68386615287565b6129c09190615287565b90508015612a0b576129d2818461529a565b6001600160a01b03808b165f908152600e602090815260408083208f8516808552925290912092909255600854612a0b929116836127dc565b505050505b80156119d457612a2a6001600160a01b03871686836127dc565b846001600160a01b0316866001600160a01b03167f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e83604051612a6f91815260200190565b60405180910390a3505050505b5050565b6001600160a01b038381165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0160209081526040808320938616835292905220545f1981146111c45781811015612b1f576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018290526044810183905260640161130f565b6111c484848484035f613694565b6001600160a01b038316612b5657604051634b637e8f60e11b81525f600482015260240161130f565b6001600160a01b038216612b7f5760405163ec442f0560e01b81525f600482015260240161130f565b6112288383836138c1565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff16612c4d575f848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055612c033390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610df2565b5f915050610df2565b5f807f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e0090505f8154612c929190600160a01b900460ff1661543f565b91505090565b5f610d8b613d24565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff1615612c4d575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610df2565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e008054612d7d906001600160a01b0316863086613d97565b612d878483613dd0565b836001600160a01b0316856001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d78585604051612dd5929190918252602082015260400190565b60405180910390a35050505050565b612dec613e04565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a150565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff1615611b04576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f818310612ec05781610f9f565b5090919050565b6001600160a01b0383165f908152600a602052604081205484916501000000000090910464ffffffffff169003612f115760405163dd15e71560e01b815260040160405180910390fd5b612f1a84612755565b6001600160a01b0384165f908152600a60205260409020805465010000000000900464ffffffffff164210612f7857805464ffffffffff16612f6485670de0b6b3a76400006152fc565b612f6e919061533b565b6002820155612fe1565b600281015481545f9190612f9d90429065010000000000900464ffffffffff16615287565b612fa791906152fc565b825490915064ffffffffff1681612fc687670de0b6b3a76400006152fc565b612fd0919061529a565b612fda919061533b565b6002830155505b80600201545f0361301e576040517f299dcf9a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00546001600160a01b03868116911614613058575f613060565b613060610d62565b6040516370a0823160e01b81523060048201526001600160a01b038716906370a0823190602401602060405180830381865afa1580156130a2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906130c691906152c6565b6130d09190615287565b815460028301546130e79164ffffffffff166127c8565b111561310657604051631e9acf1760e31b815260040160405180910390fd5b80546131199064ffffffffff1642615458565b81547fffffffffffffffffffffffffffffffffff00000000000000000000ffffffffff166501000000000064ffffffffff928316026effffffffff000000000000000000001916176a01000000000000000000004292909216919091021781556040518481526001600160a01b0384811691908716907f73e403d263176fde0447fee5fa024d13c5d6bf70748f23cf4ad463764cc8f2f390602001612dd5565b6131c1613e5f565b612a7c8282613ec6565b6131d3613e5f565b61115b81613f29565b6131e4613e5f565b61115b816040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250613fd1565b611b04613e5f565b5f807f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00611a00565b335f9081527f7bcff4f162ccdfbe249cdf3a524fc79b31c8aeaae0e727c4887b8e830a8a2e2d602052604090205460ff161580156132bf5750335f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff16155b15611b04576040517fe8037ed800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6132fe612e56565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833612e38565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610e2e9061523b565b60605f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100610e1d565b5f80600154670de0b6b3a76400006133e391906152fc565b90508083116133f457505f92915050565b5f600254670de0b6b3a764000061340b91906152fc565b9050808410613454576003548061344a8661342e85670de0b6b3a76400006152fc565b613438919061533b565b61109284670de0b6b3a7640000615287565b611330919061529a565b5f61345f8383615287565b6134698487615287565b61347b90670de0b6b3a76400006152fc565b613485919061533b565b9050805f0361349857505f949350505050565b5f6134ca670de0b6b3a76400006134ae84614043565b6004546134bb9190615475565b6134c591906154a4565b6141f2565b600554909150613502816134ea8461109283670de0b6b3a7640000615287565b6134f4919061529a565b670de0b6b3a7640000612eb2565b979650505050505050565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e006001600160a01b038681169085161461354c5761354c848784612a80565b6135568483614386565b805461356c906001600160a01b031686856127dc565b836001600160a01b0316856001600160a01b0316876001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db86866040516135c4929190918252602082015260400190565b60405180910390a4505050505050565b5f610df26135e0612c98565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f805f8061362b888888886143ba565b92509250925061363b8282614482565b50909695505050505050565b5f80613654868686614585565b905061365f8361465d565b801561367a57505f848061367557613675615327565b868809115b156113305761368a60018261529a565b9695505050505050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006001600160a01b0385166136f7576040517fe602df050000000000000000000000000000000000000000000000000000000081525f600482015260240161130f565b6001600160a01b038416613739576040517f94280d620000000000000000000000000000000000000000000000000000000081525f600482015260240161130f565b6001600160a01b038086165f9081526001830160209081526040808320938816835292905220839055811561164e57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051612dd591815260200190565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408083206001600160a01b038516845290915290205460ff16612a7c576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024810183905260440161130f565b5f61384d6001600160a01b03841683614689565b905080515f1415801561387157508080602001905181019061386f91906152dd565b155b15611228576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260240161130f565b5f818311612ec05781610f9f565b6138c9612e56565b805f03613902576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316613c7f576001600160a01b038216331480159061396857506001600160a01b0382165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0160209081526040808320338452909152902054155b1561399f576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f908152600b6020526040812054908181036139c5575f6139e2565b816139d842670de0b6b3a76400006152fc565b6139e29190615287565b90505f600254670de0b6b3a76400006139fb91906152fc565b90505f613a07866119dc565b90505f613a14828761529a565b5f80549192505b81811015613b76575f808281548110613a3657613a36615313565b5f918252602090912001546001600160a01b03169050613a5581612755565b85871115613aa6578415613a6e57613a6e818b87614696565b6001600160a01b038082165f818152600a6020908152604080832060010154948f168352600c82528083209383529290522055613b6d565b8415613ab657613ab6818b612850565b6001600160a01b0381165f908152600a6020526040812060010154613adc908b906152fc565b6001600160a01b03808d165f908152600c6020908152604080832093871683529290522054613b0c9088906152fc565b613b16919061529a565b90508015613b445784613b2a600183615287565b613b34919061533b565b613b3f90600161529a565b613b46565b5f5b6001600160a01b03808d165f908152600c6020908152604080832093871683529290522055505b50600101613a1b565b5083851115613bae57613b9142670de0b6b3a76400006152fc565b6001600160a01b0389165f908152600b6020526040902055613c2a565b5f87613bc242670de0b6b3a76400006152fc565b613bcc91906152fc565b613bd685896152fc565b613be0919061529a565b90508015613c0e5782613bf4600183615287565b613bfe919061533b565b613c0990600161529a565b613c10565b5f5b6001600160a01b038a165f908152600b6020526040902055505b306001600160a01b0316634641257d6040518163ffffffff1660e01b81526004015f604051808303815f87803b158015613c62575f80fd5b505af1925050508015613c73575060015b50505050505050613d19565b6001600160a01b038216613ce7575f8054905b81811015613ce0575f808281548110613cad57613cad615313565b5f918252602090912001546001600160a01b03169050613ccc81612755565b613cd7818786614696565b50600101613c92565b5050613d19565b6040517f072b78c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61122883838361488b565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f613d4e6149e2565b613d56614a5d565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6040516001600160a01b0384811660248301528381166044830152606482018390526111c49186918216906323b872dd90608401612809565b6001600160a01b038216613df95760405163ec442f0560e01b81525f600482015260240161130f565b612a7c5f83836138c1565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff16611b04576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff16611b04576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613ece613e5f565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03613f1a8482615514565b50600481016111c48382615514565b613f31613e5f565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e005f80613f5d84614ab2565b9150915081613f6d576012613f6f565b805b83547fffffffffffffffffffffff00000000000000000000000000000000000000000016600160a01b60ff929092169190910273ffffffffffffffffffffffffffffffffffffffff1916176001600160a01b0394909416939093179091555050565b613fd9613e5f565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1026140258482615514565b50600381016140348382615514565b505f8082556001909101555050565b5f80821361404f575f80fd5b5f606061405b84614bb6565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d6c8c3f38e95a6b1ff2ab1c3b343619018302821d6d02384773bdf1ac5676facced60901901830290911d6cb9a025d814b29c212b8b1a07cd19019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b5f680248ce36a70cb26b3e19821361420b57505f919050565b680755bf798b4a1bf1e5821261421f575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b6001600160a01b0382166143af57604051634b637e8f60e11b81525f600482015260240161130f565b612a7c825f836138c1565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156143f357505f91506003905082614478565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015614444573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b03811661446f57505f925060019150829050614478565b92505f91508190505b9450945094915050565b5f826003811115614495576144956155cf565b0361449e575050565b60018260038111156144b2576144b26155cf565b036144e9576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028260038111156144fd576144fd6155cf565b03614537576040517ffce698f70000000000000000000000000000000000000000000000000000000081526004810182905260240161130f565b600382600381111561454b5761454b6155cf565b03612a7c576040517fd78bce0c0000000000000000000000000000000000000000000000000000000081526004810182905260240161130f565b5f838302815f1985870982811083820303915050805f036145b9578382816145af576145af615327565b0492505050610f9f565b8084116145f2576040517f227bc15300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f6002826003811115614672576146726155cf565b61467c91906155e3565b60ff166001149050919050565b6060610f9f83835f614c2d565b5f6146a0836119dc565b6001600160a01b038085165f908152600d602090815260408083209389168352929052908120549192509082906146d89085906152fc565b6146e2919061533b565b6001600160a01b038086165f908152600d60209081526040808320938a1683529290529081208054929350839290919061471d908490615287565b90915550506001600160a01b038085165f908152600e6020908152604080832093891683529290529081205483906147569086906152fc565b614760919061533b565b6001600160a01b038087165f908152600e60209081526040808320938b1683529290529081208054929350839290919061479b908490615287565b909155505f90506147b66147b0888888611d25565b846138b3565b90505f6147c38483615287565b9050801561482d576147df6001600160a01b03891688836127dc565b866001600160a01b0316886001600160a01b03167f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e8360405161482491815260200190565b60405180910390a35b5f614839898989611104565b90505f614846858561529a565b82111561486757846148588584615287565b6148629190615287565b614869565b5f5b9050801561236457600854612364906001600160a01b038c81169116836127dc565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006001600160a01b0384166148d85781816002015f8282546148cd919061529a565b909155506149619050565b6001600160a01b0384165f9081526020829052604090205482811015614943576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b0386166004820152602481018290526044810184905260640161130f565b6001600160a01b0385165f9081526020839052604090209083900390555b6001600160a01b03831661497f57600281018054839003905561499d565b6001600160a01b0383165f9081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611adc91815260200190565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081614a0d613351565b805190915015614a2557805160209091012092915050565b81548015614a34579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081614a886133a2565b805190915015614aa057805160209091012092915050565b60018201548015614a34579392505050565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f313ce5670000000000000000000000000000000000000000000000000000000017905290515f918291829182916001600160a01b03871691614b2691615604565b5f60405180830381855afa9150503d805f8114614b5e576040519150601f19603f3d011682016040523d82523d5f602084013e614b63565b606091505b5091509150818015614b7757506020815110155b15614baa575f81806020019051810190614b9191906152c6565b905060ff8111614ba8576001969095509350505050565b505b505f9485945092505050565b5f808211614bc2575f80fd5b5060016fffffffffffffffffffffffffffffffff821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b606081471015614c6b576040517fcd78605900000000000000000000000000000000000000000000000000000000815230600482015260240161130f565b5f80856001600160a01b03168486604051614c869190615604565b5f6040518083038185875af1925050503d805f8114614cc0576040519150601f19603f3d011682016040523d82523d5f602084013e614cc5565b606091505b509150915061368a868383606082614ce557614ce082614d45565b610f9f565b8151158015614cfc57506001600160a01b0384163b155b15614d3e576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161130f565b5080610f9f565b805115614d555780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60208284031215614d97575f80fd5b81356001600160e01b031981168114610f9f575f80fd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f610f9f6020830184614dae565b6001600160a01b038116811461115b575f80fd5b8035614e0d81614dee565b919050565b5f60208284031215614e22575f80fd5b8135610f9f81614dee565b5f60208284031215614e3d575f80fd5b5035919050565b5f8060408385031215614e55575f80fd5b8235614e6081614dee565b946020939093013593505050565b5f8060408385031215614e7f575f80fd5b8235614e8a81614dee565b91506020830135614e9a81614dee565b809150509250929050565b5f805f60608486031215614eb7575f80fd5b8335614ec281614dee565b92506020840135614ed281614dee565b929592945050506040919091013590565b5f8060408385031215614ef4575f80fd5b823591506020830135614e9a81614dee565b5f805f83850360e0811215614f19575f80fd5b843593506020850135614f2b81614dee565b925060a0603f1982011215614f3e575f80fd5b506040840190509250925092565b634e487b7160e01b5f52604160045260245ffd5b604051610160810167ffffffffffffffff81118282101715614f8457614f84614f4c565b60405290565b803564ffffffffff81168114614e0d575f80fd5b5f610160828403128015614fb0575f80fd5b50614fb9614f60565b614fc283614e02565b81526020838101359082015260408084013590820152606080840135908201526080808401359082015260a0808401359082015261500260c08401614e02565b60c082015261501360e08401614e02565b60e08201526150256101008401614e02565b6101008201526150386101208401614f8a565b610120820152610140928301359281019290925250919050565b5f8060408385031215615063575f80fd5b823561506e81614dee565b915061507c60208401614f8a565b90509250929050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f6150bf60e0830189614dae565b82810360408401526150d18189614dae565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b81811015615126578351835260209384019390920191600101615108565b50909b9a5050505050505050505050565b602080825282518282018190525f918401906040840190835b818110156151775783516001600160a01b0316835260209384019390920191600101615150565b509095945050505050565b5f805f60608486031215615194575f80fd5b8335925060208401356151a681614dee565b915060408401356151b681614dee565b809150509250925092565b803560ff81168114614e0d575f80fd5b5f805f805f805f60e0888a0312156151e7575f80fd5b87356151f281614dee565b9650602088013561520281614dee565b9550604088013594506060880135935061521e608089016151c1565b9699959850939692959460a0840135945060c09093013592915050565b600181811c9082168061524f57607f821691505b60208210810361526d57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610df257610df2615273565b80820180821115610df257610df2615273565b5f602082840312156152bd575f80fd5b610f9f826151c1565b5f602082840312156152d6575f80fd5b5051919050565b5f602082840312156152ed575f80fd5b81518015158114610f9f575f80fd5b8082028115828204841417610df257610df2615273565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f8261534957615349615327565b500490565b6001815b60018411156153895780850481111561536d5761536d615273565b600184161561537b57908102905b60019390931c928002615352565b935093915050565b5f8261539f57506001610df2565b816153ab57505f610df2565b81600181146153c157600281146153cb576153e7565b6001915050610df2565b60ff8411156153dc576153dc615273565b50506001821b610df2565b5060208310610133831016604e8410600b841016171561540a575081810a610df2565b6154165f19848461534e565b805f190482111561542957615429615273565b029392505050565b5f610f9f60ff841683615391565b60ff8181168382160190811115610df257610df2615273565b64ffffffffff8181168382160190811115610df257610df2615273565b8082025f8212600160ff1b8414161561549057615490615273565b8181058314821517610df257610df2615273565b5f826154b2576154b2615327565b600160ff1b82145f19841416156154cb576154cb615273565b500590565b601f82111561122857805f5260205f20601f840160051c810160208510156154f55750805b601f840160051c820191505b8181101561164e575f8155600101615501565b815167ffffffffffffffff81111561552e5761552e614f4c565b6155428161553c845461523b565b846154d0565b6020601f821160018114615574575f831561555d5750848201515b5f19600385901b1c1916600184901b17845561164e565b5f84815260208120601f198516915b828110156155a35787850151825560209485019460019092019101615583565b50848210156155c057868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b634e487b7160e01b5f52602160045260245ffd5b5f60ff8316806155f5576155f5615327565b8060ff84160691505092915050565b5f82518060208501845e5f92019182525091905056fea2646970667358221220ebe59b3a388f856339905aee9ca3cab51c211efa68189b606c3ada245282784f64736f6c634300081a0033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610580575f3560e01c80638456cb59116102db578063c483021011610187578063d547741f116100e8578063e63ab1e91161009e578063f2be153611610079578063f2be153614610d1d578063f804a99014610d3c578063f8d7eb9e14610d4f575f80fd5b8063e63ab1e914610ce3578063eeca156214610d0a578063ef8b30f714610ba6575f80fd5b8063d8d5eaf4116100ce578063d8d5eaf414610c4f578063d905777e14610c79578063dd62ed3e14610c8c575f80fd5b8063d547741f14610c29578063d6ef7af014610c3c575f80fd5b8063ce96cb771161013d578063d1058e5911610123578063d1058e5914610bfb578063d19fb4fb14610c03578063d505accf14610c16575f80fd5b8063ce96cb7714610bd5578063cfd8d6c014610be8575f80fd5b8063c6e6f5921161016d578063c6e6f59214610ba6578063c86d6ae414610bb9578063c91e514914610bcc575f80fd5b8063c483021014610b9e578063c63d75b614610867575f80fd5b8063a9059cbb1161023c578063b460af94116101f2578063b6d0dcd8116101cd578063b6d0dcd814610b65578063b81ff16114610b78578063ba08765214610b8b575f80fd5b8063b460af9414610b36578063b66503cf14610b49578063b674852814610b5c575f80fd5b8063ab9ade5511610222578063ab9ade5514610b07578063afe7d3b414610b1a578063b3d7f6b914610b23575f80fd5b8063a9059cbb14610ae1578063aa5e933414610af4575f80fd5b806393f89a801161029157806395d89b411161027757806395d89b4114610abd578063a119dd9214610ac5578063a217fddf14610ada575f80fd5b806393f89a8014610a9757806394bf804d14610aaa575f80fd5b80638cc59a0a116102c15780638cc59a0a14610a2157806391d1485414610a2a57806391ddadf414610a81575f80fd5b80638456cb59146109fe57806384b0196e14610a06575f80fd5b806336568abe1161043a5780635bae7f1b1161039b5780636e76fc8f1161035157806373c8b51f1161032c57806373c8b51f146109c55780637ecebe00146109d857806380f55605146109eb575f80fd5b80636e76fc8f146109615780636e9bf17f1461098857806370a08231146109b2575f80fd5b80636dcea85f116103815780636dcea85f146109285780636e553f651461093b5780636e5c4c781461094e575f80fd5b80635bae7f1b146108c55780635c975abb146108fe575f80fd5b8063402d267d116103f05780634bf5d7e9116103d65780634bf5d7e9146108835780634cdad506146106615780634fcb7d31146108bc575f80fd5b8063402d267d146108675780634641257d1461087b575f80fd5b80633d31410c116104205780633d31410c146108395780633ee07ffb1461084c5780633f4ba83a1461085f575f80fd5b806336568abe146107f657806338d52e0f14610809575f80fd5b80631003f1a9116104e457806323b872dd1161049a5780632f2ff15d116104805780632f2ff15d146107c1578063313ce567146107d45780633644e515146107ee575f80fd5b806323b872dd1461076d578063248a9ca314610780575f80fd5b806318160ddd116104ca57806318160ddd1461072a5780631aa43078146107515780631e83409a1461075a575f80fd5b80631003f1a91461070257806314bc823714610717575f80fd5b8063085d4883116105395780630a28a4771161051f5780630a28a477146106b25780630bf0fc82146106c55780630c9cbf0e146106d8575f80fd5b8063085d488314610674578063095ea7b31461069f575f80fd5b806306fdde031161056957806306fdde03146105c25780630700037d146105d757806307a2d13a14610661575f80fd5b806301e1d1141461058457806301ffc9a71461059f575b5f80fd5b61058c610d62565b6040519081526020015b60405180910390f35b6105b26105ad366004614d87565b610d90565b6040519015158152602001610596565b6105ca610df8565b6040516105969190614ddc565b61062a6105e5366004614e12565b600a6020525f908152604090208054600182015460029092015464ffffffffff808316936501000000000084048216936a010000000000000000000090049091169185565b6040805164ffffffffff9687168152948616602086015292909416918301919091526060820152608081019190915260a001610596565b61058c61066f366004614e2d565b610eb0565b600754610687906001600160a01b031681565b6040516001600160a01b039091168152602001610596565b6105b26106ad366004614e44565b610ebb565b61058c6106c0366004614e2d565b610ed2565b61058c6106d3366004614e12565b610ede565b61058c6106e6366004614e6e565b600d60209081525f928352604080842090915290825290205481565b610715610710366004614e12565b610fa6565b005b61058c610725366004614ea5565b611104565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace025461058c565b61058c60015481565b610715610768366004614e12565b611151565b6105b261077b366004614ea5565b61115e565b61058c61078e366004614e2d565b5f9081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b6107156107cf366004614ee3565b611181565b6107dc6111ca565b60405160ff9091168152602001610596565b61058c6111d3565b610715610804366004614ee3565b6111dc565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00546001600160a01b0316610687565b61058c610847366004614f06565b61122d565b61071561085a366004614e2d565b611339565b6107156113c4565b61058c610875366004614e12565b505f1990565b6107156113f6565b60408051808201909152600e81527f6d6f64653d74696d657374616d7000000000000000000000000000000000000060208201526105ca565b61058c60035481565b61058c6108d3366004614e6e565b6001600160a01b038082165f908152600c602090815260408083209386168352929052205492915050565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff166105b2565b610715610936366004614e12565b611655565b61058c610949366004614ee3565b611717565b61071561095c366004614f9e565b611732565b61058c7f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a6381565b61058c610996366004614e6e565b600e60209081525f928352604080842090915290825290205481565b61058c6109c0366004614e12565b6119dc565b6107156109d3366004615052565b611a1f565b61058c6109e6366004614e12565b611aea565b600654610687906001600160a01b031681565b610715611af4565b610a0e611b06565b6040516105969796959493929190615085565b61058c60045481565b6105b2610a38366004614ee3565b5f9182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60405165ffffffffffff42168152602001610596565b610715610aa5366004614e2d565b611ba2565b61058c610ab8366004614ee3565b611be3565b6105ca611bfe565b610acd611c4f565b6040516105969190615137565b61058c5f81565b6105b2610aef366004614e44565b611cae565b610715610b02366004614e2d565b611cbb565b61058c610b15366004614ea5565b611d25565b61058c60025481565b61058c610b31366004614e2d565b611d80565b61058c610b44366004615182565b611d8c565b610715610b57366004614e44565b611e05565b61058c60095481565b610687610b73366004614e2d565b611e1a565b610715610b86366004614e12565b611e41565b61058c610b99366004615182565b611f94565b61058c606481565b61058c610bb4366004614e2d565b61200d565b600854610687906001600160a01b031681565b61058c60055481565b61058c610be3366004614e12565b612018565b610715610bf6366004614e12565b61202b565b61071561208f565b61058c610c11366004614ea5565b6120d1565b610715610c243660046151d1565b6121e9565b610715610c37366004614ee3565b612370565b610715610c4a366004614e44565b6123b3565b61058c610c5d366004614e6e565b600c60209081525f928352604080842090915290825290205481565b61058c610c87366004614e12565b612551565b61058c610c9a366004614e6e565b6001600160a01b039182165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b61058c7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61058c610d18366004614e2d565b61255b565b61058c610d2b366004614e12565b600b6020525f908152604090205481565b610715610d4a366004614e2d565b612573565b610715610d5d366004614e12565b6125f0565b5f610d8b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace025490565b905090565b5f6001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610df257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60605f7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005b9050806003018054610e2e9061523b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e5a9061523b565b8015610ea55780601f10610e7c57610100808354040283529160200191610ea5565b820191905f5260205f20905b815481529060010190602001808311610e8857829003601f168201915b505050505091505090565b5f610df2825f61267b565b5f33610ec88185856126d2565b5060019392505050565b5f610df28260016126df565b6001600160a01b0381165f908152600a602052604081207f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02545f03610f27576001015492915050565b8054610f909064ffffffffff6a01000000000000000000008204811691610f5891650100000000009091041661255b565b610f629190615287565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02546002840154919061272d565b8160010154610f9f919061529a565b9392505050565b5f610fb08161274b565b6001600160a01b0382165f908152600a602052604081205483916501000000000090910464ffffffffff169003610ffa5760405163dd15e71560e01b815260040160405180910390fd5b61100383612755565b6001600160a01b0383165f908152600a602052604090205465010000000000900464ffffffffff164210156110ab576001600160a01b038084165f908152600a6020526040902080544264ffffffffff8181166501000000000090810269ffffffffff0000000000198516178555600854600290950154930416936110a9931691611098916110929086615287565b906127c8565b6001600160a01b03871691906127dc565b505b6006546001600160a01b03908116908416036110ca576110ca5f61202b565b60405133906001600160a01b038516907f6b32317bb85aaa626418b993ebb1b0856757f1e57b3349a89a6acaea87bd15c1905f90a3505050565b6001600160a01b038083165f908152600c602090815260408083209387168352929052908120546111499061113886610ede565b6111429190615287565b83906127c8565b949350505050565b61115b8133612850565b50565b5f3361116b858285612a80565b611176858585612b2d565b506001949350505050565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260409020600101546111ba8161274b565b6111c48383612b8a565b50505050565b5f610d8b612c56565b5f610d8b612c98565b6001600160a01b038116331461121e576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112288282612ca1565b505050565b5f61125f7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00546001600160a01b031690565b6001600160a01b031663d505accf8430853560208701356112866060890160408a016152ad565b6040516001600160e01b031960e088901b1681526001600160a01b0395861660048201529490931660248501526044840191909152606483015260ff166084820152606085013560a4820152608085013560c482015260e4015f604051808303815f87803b1580156112f6575f80fd5b505af1925050508015611307575060015b505f19611318565b60405180910390fd5b5f6113228661200d565b905061133085868884612d45565b95945050505050565b5f6113438161274b565b670de0b6b3a7640000821115611385576040517f648564d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600982905560405182815233907f8fa281d02a496c3848901321abdd8d00f14ee5706a12b8c6ff6e3a9a097afc08906020015b60405180910390a25050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6113ee8161274b565b61115b612de4565b6113fe612e56565b6006546007546040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820181905230602483015291909216915f9061151d90849063dd62ed3e90604401602060405180830381865afa158015611473573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061149791906152c6565b6040517fd905777e0000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015286169063d905777e90602401602060405180830381865afa1580156114f4573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061151891906152c6565b612eb2565b90505f611535600954836127c890919063ffffffff16565b6007546040516323b872dd60e01b81526001600160a01b039182166004820152306024820152604481018390529192508516906323b872dd906064016020604051808303815f875af115801561158d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115b191906152dd565b505f6115bd8284615287565b90508015611643576008546040516323b872dd60e01b81526001600160a01b038681166004830152918216602482015260448101839052908616906323b872dd906064016020604051808303815f875af115801561161d573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061164191906152dd565b505b61164e858330612ec7565b5050505050565b5f61165f8161274b565b6001600160a01b0382166116865760405163d92e233d60e01b815260040160405180910390fd5b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091555f908152600a602052604081205465010000000000900464ffffffffff1690036116de576116de82611e41565b60405133906001600160a01b038416907f9befd548a45bf1eebac6219d0f8cdce0f6a86fc087bc042116131d777d26c008905f90a35050565b5f5f195f6117248561200d565b905061114933858784612d45565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f8115801561177c5750825b90505f8267ffffffffffffffff1660011480156117985750303b155b9050811580156117a6575080155b156117dd576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561181157845468ff00000000000000001916680100000000000000001785555b6118726040518060400160405280600a8152602001697374616b65642045584160b01b8152506040518060400160405280600581526020017f73744558410000000000000000000000000000000000000000000000000000008152506131b9565b855161187d906131cb565b6118a86040518060400160405280600a8152602001697374616b65642045584160b01b8152506131dc565b6118b0613223565b6118ba5f33612b8a565b50604086015115806118d457508560200151866040015111155b806118ea5750670de0b6b3a76400008660600151115b156119085760405163561ce9bb60e01b815260040160405180910390fd5b6119158660200151611ba2565b60408601516002556060860151600355608086015161193390612573565b6119408660a00151611cbb565b61194d8660c00151611655565b6119608660c00151876101200151611a1f565b61196d8660e0015161202b565b61197b866101400151611339565b6119898661010001516125f0565b83156119d457845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b5f807f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005b6001600160a01b039093165f9081526020939093525050604090205490565b5f611a298161274b565b6001600160a01b0383165f908152600a602052604090208054426501000000000090910464ffffffffff161115611a8c576040517f52f0214c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805464ffffffffff191664ffffffffff8416908117825560405190815233906001600160a01b038616907f307065155c111638dfa8c188a29ab8abc925f17d3616388c7683d0d45a29a453906020015b60405180910390a350505050565b5f610df28261322b565b611afc613253565b611b046132f6565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1008054909150158015611b4457506001810154155b611b4c575f80fd5b611b54613351565b611b5c6133a2565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b5f611bac8161274b565b600182905560405182815233907fcb90293a116713eb442bb98d30c95b14fa981b1bf6f9ee8e1bf3c856e8ded54e906020016113b8565b5f5f195f611bf085611d80565b905061114933858388612d45565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060917f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0091610e2e9061523b565b60605f805480602002602001604051908101604052809291908181526020018280548015611ca457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c86575b5050505050905090565b5f33610ec8818585612b2d565b5f611cc58161274b565b670de0b6b3a7640000821115611cee5760405163561ce9bb60e01b815260040160405180910390fd5b600582905560405182815233907f33b1804f184927027d7ac0f874248c83a39e0ec20e93e8574499c14a5083886f906020016113b8565b6001600160a01b0382165f908152600b6020526040812054808203611d4d575f915050610f9f565b611330611d7582611d6642670de0b6b3a76400006152fc565b611d709190615287565b6133cb565b611092878787611104565b5f610df282600161267b565b5f80611d9783612018565b905080851115611dec576040517ffe9cceec0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018690526044810182905260640161130f565b5f611df686610ed2565b9050611330338686898561350d565b5f611e0f8161274b565b611228838333612ec7565b5f8181548110611e28575f80fd5b5f918252602090912001546001600160a01b0316905081565b5f611e4b8161274b565b5f54606411611e86576040517f9e10ac0e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f908152600a602052604090205465010000000000900464ffffffffff1615611ee5576040517ff2a5f75a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f818152600a6020526040808220805469ffffffffff00000000001916650100000000004264ffffffffff160217905581546001810183558280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56301805473ffffffffffffffffffffffffffffffffffffffff191684179055513392917f9749fb908457c4fa0afa13661b7b5b02c584a8ae47610ccc7a65d7d500951db491a35050565b5f80611f9f83612551565b905080851115611ff4576040517fb94abeec0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018690526044810182905260640161130f565b5f611ffe86610eb0565b9050611330338686848a61350d565b5f610df2825f6126df565b5f610df2612025836119dc565b5f61267b565b5f6120358161274b565b6007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040513391907f95d5fab7f1c5262ecb5edffc2c96c30c43871f674976c8ab4fe5ca8a440c3e4b905f90a35050565b5f5b5f5481101561115b576120c95f82815481106120af576120af615313565b5f918252602090912001546001600160a01b031633612850565b600101612091565b6001600160a01b0382165f908152600b6020526040812054801580612126575060015461210690670de0b6b3a76400006152fc565b8161211942670de0b6b3a76400006152fc565b6121239190615287565b11155b15612134575f915050610f9f565b5f612140868686611d25565b90505f61214c866119dc565b9050805f03612160575f9350505050610f9f565b6001600160a01b038087165f908152600d60209081526040808320938b168352929052908120546121929087906152fc565b90505f81156121c157826121a7600184615287565b6121b1919061533b565b6121bc90600161529a565b6121c3565b5f5b90508084116121d2575f6121dc565b6121dc8185615287565b9998505050505050505050565b83421115612226576040517f627913020000000000000000000000000000000000000000000000000000000081526004810185905260240161130f565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886122908c6001600160a01b03165f9081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb006020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f6122ea826135d4565b90505f6122f98287878761361b565b9050896001600160a01b0316816001600160a01b031614612359576040517f4b800e460000000000000000000000000000000000000000000000000000000081526001600160a01b0380831660048301528b16602482015260440161130f565b6123648a8a8a6126d2565b50505050505050505050565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260409020600101546123a98161274b565b6111c48383612ca1565b5f6123bd8161274b565b6001600160a01b0383165f908152600a602052604081205484916501000000000090910464ffffffffff1690036124075760405163dd15e71560e01b815260040160405180910390fd5b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00546001600160a01b0385811691161480156124b95750612446610d62565b6040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa158015612488573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124ac91906152c6565b6124b69190615287565b83115b156124d757604051631e9acf1760e31b815260040160405180910390fd5b6008546001600160a01b03908116906124f390861682866127dc565b846001600160a01b0316816001600160a01b0316336001600160a01b03167f32b1e0bba5a0cc4fd21791ce82f252a2856ac08805daa381eac01077e0232eb18760405161254291815260200190565b60405180910390a45050505050565b5f610df2826119dc565b5f6125668242612eb2565b64ffffffffff1692915050565b5f61257d8161274b565b67016345785d8a000082108061259b575068056bc75e2d6310000082115b156125b95760405163561ce9bb60e01b815260040160405180910390fd5b600482905560405182815233907fde98b8145241ddecb3a88a40e29bc18e7f3a091cf2d92e9891fffe71bf303890906020016113b8565b5f6125fa8161274b565b6001600160a01b0382166126215760405163d92e233d60e01b815260040160405180910390fd5b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040513391907ff0e8bebe3659a97126f43e3d176f7555480c335f92ca957254992ce32b551aff905f90a35050565b5f610f9f612687610d62565b61269290600161529a565b61269d5f600a615431565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02546126c9919061529a565b85919085613647565b6112288383836001613694565b5f610f9f6126ee82600a615431565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace025461271a919061529a565b612722610d62565b6126c990600161529a565b828202811515841585830485141716612744575f80fd5b0492915050565b61115b81336137ad565b6001600160a01b0381165f908152600a6020526040902061277582610ede565b600182015580546127959065010000000000900464ffffffffff1661255b565b815464ffffffffff919091166a0100000000000000000000026effffffffff000000000000000000001990911617905550565b5f610f9f8383670de0b6b3a764000061272d565b6040516001600160a01b0383811660248301526044820183905261122891859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613839565b612858612e56565b6001600160a01b0381165f908152600b602052604081205461288242670de0b6b3a76400006152fc565b61288c9190615287565b9050600154670de0b6b3a76400006128a491906152fc565b81116128af57505050565b6001600160a01b038083165f908152600d60209081526040808320938716835292905290812054906128ee6128e88686610b15816119dc565b836138b3565b90505f6128fb8383615287565b905080156129335761290d818461529a565b6001600160a01b038087165f908152600d60209081526040808320938b16835292905220555b60025461294890670de0b6b3a76400006152fc565b841115612a10575f61295e8787610725896119dc565b6001600160a01b038088165f908152600e60209081526040808320938c168352929052908120549192506129928386612eb2565b90505f61299f838361529a565b84116129ab575f6129c0565b826129b68386615287565b6129c09190615287565b90508015612a0b576129d2818461529a565b6001600160a01b03808b165f908152600e602090815260408083208f8516808552925290912092909255600854612a0b929116836127dc565b505050505b80156119d457612a2a6001600160a01b03871686836127dc565b846001600160a01b0316866001600160a01b03167f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e83604051612a6f91815260200190565b60405180910390a3505050505b5050565b6001600160a01b038381165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0160209081526040808320938616835292905220545f1981146111c45781811015612b1f576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018290526044810183905260640161130f565b6111c484848484035f613694565b6001600160a01b038316612b5657604051634b637e8f60e11b81525f600482015260240161130f565b6001600160a01b038216612b7f5760405163ec442f0560e01b81525f600482015260240161130f565b6112288383836138c1565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff16612c4d575f848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055612c033390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610df2565b5f915050610df2565b5f807f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e0090505f8154612c929190600160a01b900460ff1661543f565b91505090565b5f610d8b613d24565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff1615612c4d575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610df2565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e008054612d7d906001600160a01b0316863086613d97565b612d878483613dd0565b836001600160a01b0316856001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d78585604051612dd5929190918252602082015260400190565b60405180910390a35050505050565b612dec613e04565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a150565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff1615611b04576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f818310612ec05781610f9f565b5090919050565b6001600160a01b0383165f908152600a602052604081205484916501000000000090910464ffffffffff169003612f115760405163dd15e71560e01b815260040160405180910390fd5b612f1a84612755565b6001600160a01b0384165f908152600a60205260409020805465010000000000900464ffffffffff164210612f7857805464ffffffffff16612f6485670de0b6b3a76400006152fc565b612f6e919061533b565b6002820155612fe1565b600281015481545f9190612f9d90429065010000000000900464ffffffffff16615287565b612fa791906152fc565b825490915064ffffffffff1681612fc687670de0b6b3a76400006152fc565b612fd0919061529a565b612fda919061533b565b6002830155505b80600201545f0361301e576040517f299dcf9a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00546001600160a01b03868116911614613058575f613060565b613060610d62565b6040516370a0823160e01b81523060048201526001600160a01b038716906370a0823190602401602060405180830381865afa1580156130a2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906130c691906152c6565b6130d09190615287565b815460028301546130e79164ffffffffff166127c8565b111561310657604051631e9acf1760e31b815260040160405180910390fd5b80546131199064ffffffffff1642615458565b81547fffffffffffffffffffffffffffffffffff00000000000000000000ffffffffff166501000000000064ffffffffff928316026effffffffff000000000000000000001916176a01000000000000000000004292909216919091021781556040518481526001600160a01b0384811691908716907f73e403d263176fde0447fee5fa024d13c5d6bf70748f23cf4ad463764cc8f2f390602001612dd5565b6131c1613e5f565b612a7c8282613ec6565b6131d3613e5f565b61115b81613f29565b6131e4613e5f565b61115b816040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250613fd1565b611b04613e5f565b5f807f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00611a00565b335f9081527f7bcff4f162ccdfbe249cdf3a524fc79b31c8aeaae0e727c4887b8e830a8a2e2d602052604090205460ff161580156132bf5750335f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff16155b15611b04576040517fe8037ed800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6132fe612e56565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833612e38565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610e2e9061523b565b60605f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100610e1d565b5f80600154670de0b6b3a76400006133e391906152fc565b90508083116133f457505f92915050565b5f600254670de0b6b3a764000061340b91906152fc565b9050808410613454576003548061344a8661342e85670de0b6b3a76400006152fc565b613438919061533b565b61109284670de0b6b3a7640000615287565b611330919061529a565b5f61345f8383615287565b6134698487615287565b61347b90670de0b6b3a76400006152fc565b613485919061533b565b9050805f0361349857505f949350505050565b5f6134ca670de0b6b3a76400006134ae84614043565b6004546134bb9190615475565b6134c591906154a4565b6141f2565b600554909150613502816134ea8461109283670de0b6b3a7640000615287565b6134f4919061529a565b670de0b6b3a7640000612eb2565b979650505050505050565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e006001600160a01b038681169085161461354c5761354c848784612a80565b6135568483614386565b805461356c906001600160a01b031686856127dc565b836001600160a01b0316856001600160a01b0316876001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db86866040516135c4929190918252602082015260400190565b60405180910390a4505050505050565b5f610df26135e0612c98565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f805f8061362b888888886143ba565b92509250925061363b8282614482565b50909695505050505050565b5f80613654868686614585565b905061365f8361465d565b801561367a57505f848061367557613675615327565b868809115b156113305761368a60018261529a565b9695505050505050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006001600160a01b0385166136f7576040517fe602df050000000000000000000000000000000000000000000000000000000081525f600482015260240161130f565b6001600160a01b038416613739576040517f94280d620000000000000000000000000000000000000000000000000000000081525f600482015260240161130f565b6001600160a01b038086165f9081526001830160209081526040808320938816835292905220839055811561164e57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051612dd591815260200190565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408083206001600160a01b038516845290915290205460ff16612a7c576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024810183905260440161130f565b5f61384d6001600160a01b03841683614689565b905080515f1415801561387157508080602001905181019061386f91906152dd565b155b15611228576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260240161130f565b5f818311612ec05781610f9f565b6138c9612e56565b805f03613902576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316613c7f576001600160a01b038216331480159061396857506001600160a01b0382165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0160209081526040808320338452909152902054155b1561399f576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f908152600b6020526040812054908181036139c5575f6139e2565b816139d842670de0b6b3a76400006152fc565b6139e29190615287565b90505f600254670de0b6b3a76400006139fb91906152fc565b90505f613a07866119dc565b90505f613a14828761529a565b5f80549192505b81811015613b76575f808281548110613a3657613a36615313565b5f918252602090912001546001600160a01b03169050613a5581612755565b85871115613aa6578415613a6e57613a6e818b87614696565b6001600160a01b038082165f818152600a6020908152604080832060010154948f168352600c82528083209383529290522055613b6d565b8415613ab657613ab6818b612850565b6001600160a01b0381165f908152600a6020526040812060010154613adc908b906152fc565b6001600160a01b03808d165f908152600c6020908152604080832093871683529290522054613b0c9088906152fc565b613b16919061529a565b90508015613b445784613b2a600183615287565b613b34919061533b565b613b3f90600161529a565b613b46565b5f5b6001600160a01b03808d165f908152600c6020908152604080832093871683529290522055505b50600101613a1b565b5083851115613bae57613b9142670de0b6b3a76400006152fc565b6001600160a01b0389165f908152600b6020526040902055613c2a565b5f87613bc242670de0b6b3a76400006152fc565b613bcc91906152fc565b613bd685896152fc565b613be0919061529a565b90508015613c0e5782613bf4600183615287565b613bfe919061533b565b613c0990600161529a565b613c10565b5f5b6001600160a01b038a165f908152600b6020526040902055505b306001600160a01b0316634641257d6040518163ffffffff1660e01b81526004015f604051808303815f87803b158015613c62575f80fd5b505af1925050508015613c73575060015b50505050505050613d19565b6001600160a01b038216613ce7575f8054905b81811015613ce0575f808281548110613cad57613cad615313565b5f918252602090912001546001600160a01b03169050613ccc81612755565b613cd7818786614696565b50600101613c92565b5050613d19565b6040517f072b78c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61122883838361488b565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f613d4e6149e2565b613d56614a5d565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6040516001600160a01b0384811660248301528381166044830152606482018390526111c49186918216906323b872dd90608401612809565b6001600160a01b038216613df95760405163ec442f0560e01b81525f600482015260240161130f565b612a7c5f83836138c1565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff16611b04576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff16611b04576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613ece613e5f565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03613f1a8482615514565b50600481016111c48382615514565b613f31613e5f565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e005f80613f5d84614ab2565b9150915081613f6d576012613f6f565b805b83547fffffffffffffffffffffff00000000000000000000000000000000000000000016600160a01b60ff929092169190910273ffffffffffffffffffffffffffffffffffffffff1916176001600160a01b0394909416939093179091555050565b613fd9613e5f565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1026140258482615514565b50600381016140348382615514565b505f8082556001909101555050565b5f80821361404f575f80fd5b5f606061405b84614bb6565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d6c8c3f38e95a6b1ff2ab1c3b343619018302821d6d02384773bdf1ac5676facced60901901830290911d6cb9a025d814b29c212b8b1a07cd19019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b5f680248ce36a70cb26b3e19821361420b57505f919050565b680755bf798b4a1bf1e5821261421f575f80fd5b6503782dace9d9604e83901b0591505f60606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b6001600160a01b0382166143af57604051634b637e8f60e11b81525f600482015260240161130f565b612a7c825f836138c1565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156143f357505f91506003905082614478565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015614444573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b03811661446f57505f925060019150829050614478565b92505f91508190505b9450945094915050565b5f826003811115614495576144956155cf565b0361449e575050565b60018260038111156144b2576144b26155cf565b036144e9576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028260038111156144fd576144fd6155cf565b03614537576040517ffce698f70000000000000000000000000000000000000000000000000000000081526004810182905260240161130f565b600382600381111561454b5761454b6155cf565b03612a7c576040517fd78bce0c0000000000000000000000000000000000000000000000000000000081526004810182905260240161130f565b5f838302815f1985870982811083820303915050805f036145b9578382816145af576145af615327565b0492505050610f9f565b8084116145f2576040517f227bc15300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f6002826003811115614672576146726155cf565b61467c91906155e3565b60ff166001149050919050565b6060610f9f83835f614c2d565b5f6146a0836119dc565b6001600160a01b038085165f908152600d602090815260408083209389168352929052908120549192509082906146d89085906152fc565b6146e2919061533b565b6001600160a01b038086165f908152600d60209081526040808320938a1683529290529081208054929350839290919061471d908490615287565b90915550506001600160a01b038085165f908152600e6020908152604080832093891683529290529081205483906147569086906152fc565b614760919061533b565b6001600160a01b038087165f908152600e60209081526040808320938b1683529290529081208054929350839290919061479b908490615287565b909155505f90506147b66147b0888888611d25565b846138b3565b90505f6147c38483615287565b9050801561482d576147df6001600160a01b03891688836127dc565b866001600160a01b0316886001600160a01b03167f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e8360405161482491815260200190565b60405180910390a35b5f614839898989611104565b90505f614846858561529a565b82111561486757846148588584615287565b6148629190615287565b614869565b5f5b9050801561236457600854612364906001600160a01b038c81169116836127dc565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006001600160a01b0384166148d85781816002015f8282546148cd919061529a565b909155506149619050565b6001600160a01b0384165f9081526020829052604090205482811015614943576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b0386166004820152602481018290526044810184905260640161130f565b6001600160a01b0385165f9081526020839052604090209083900390555b6001600160a01b03831661497f57600281018054839003905561499d565b6001600160a01b0383165f9081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611adc91815260200190565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081614a0d613351565b805190915015614a2557805160209091012092915050565b81548015614a34579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081614a886133a2565b805190915015614aa057805160209091012092915050565b60018201548015614a34579392505050565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f313ce5670000000000000000000000000000000000000000000000000000000017905290515f918291829182916001600160a01b03871691614b2691615604565b5f60405180830381855afa9150503d805f8114614b5e576040519150601f19603f3d011682016040523d82523d5f602084013e614b63565b606091505b5091509150818015614b7757506020815110155b15614baa575f81806020019051810190614b9191906152c6565b905060ff8111614ba8576001969095509350505050565b505b505f9485945092505050565b5f808211614bc2575f80fd5b5060016fffffffffffffffffffffffffffffffff821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b606081471015614c6b576040517fcd78605900000000000000000000000000000000000000000000000000000000815230600482015260240161130f565b5f80856001600160a01b03168486604051614c869190615604565b5f6040518083038185875af1925050503d805f8114614cc0576040519150601f19603f3d011682016040523d82523d5f602084013e614cc5565b606091505b509150915061368a868383606082614ce557614ce082614d45565b610f9f565b8151158015614cfc57506001600160a01b0384163b155b15614d3e576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161130f565b5080610f9f565b805115614d555780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60208284031215614d97575f80fd5b81356001600160e01b031981168114610f9f575f80fd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f610f9f6020830184614dae565b6001600160a01b038116811461115b575f80fd5b8035614e0d81614dee565b919050565b5f60208284031215614e22575f80fd5b8135610f9f81614dee565b5f60208284031215614e3d575f80fd5b5035919050565b5f8060408385031215614e55575f80fd5b8235614e6081614dee565b946020939093013593505050565b5f8060408385031215614e7f575f80fd5b8235614e8a81614dee565b91506020830135614e9a81614dee565b809150509250929050565b5f805f60608486031215614eb7575f80fd5b8335614ec281614dee565b92506020840135614ed281614dee565b929592945050506040919091013590565b5f8060408385031215614ef4575f80fd5b823591506020830135614e9a81614dee565b5f805f83850360e0811215614f19575f80fd5b843593506020850135614f2b81614dee565b925060a0603f1982011215614f3e575f80fd5b506040840190509250925092565b634e487b7160e01b5f52604160045260245ffd5b604051610160810167ffffffffffffffff81118282101715614f8457614f84614f4c565b60405290565b803564ffffffffff81168114614e0d575f80fd5b5f610160828403128015614fb0575f80fd5b50614fb9614f60565b614fc283614e02565b81526020838101359082015260408084013590820152606080840135908201526080808401359082015260a0808401359082015261500260c08401614e02565b60c082015261501360e08401614e02565b60e08201526150256101008401614e02565b6101008201526150386101208401614f8a565b610120820152610140928301359281019290925250919050565b5f8060408385031215615063575f80fd5b823561506e81614dee565b915061507c60208401614f8a565b90509250929050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f6150bf60e0830189614dae565b82810360408401526150d18189614dae565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b81811015615126578351835260209384019390920191600101615108565b50909b9a5050505050505050505050565b602080825282518282018190525f918401906040840190835b818110156151775783516001600160a01b0316835260209384019390920191600101615150565b509095945050505050565b5f805f60608486031215615194575f80fd5b8335925060208401356151a681614dee565b915060408401356151b681614dee565b809150509250925092565b803560ff81168114614e0d575f80fd5b5f805f805f805f60e0888a0312156151e7575f80fd5b87356151f281614dee565b9650602088013561520281614dee565b9550604088013594506060880135935061521e608089016151c1565b9699959850939692959460a0840135945060c09093013592915050565b600181811c9082168061524f57607f821691505b60208210810361526d57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610df257610df2615273565b80820180821115610df257610df2615273565b5f602082840312156152bd575f80fd5b610f9f826151c1565b5f602082840312156152d6575f80fd5b5051919050565b5f602082840312156152ed575f80fd5b81518015158114610f9f575f80fd5b8082028115828204841417610df257610df2615273565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f8261534957615349615327565b500490565b6001815b60018411156153895780850481111561536d5761536d615273565b600184161561537b57908102905b60019390931c928002615352565b935093915050565b5f8261539f57506001610df2565b816153ab57505f610df2565b81600181146153c157600281146153cb576153e7565b6001915050610df2565b60ff8411156153dc576153dc615273565b50506001821b610df2565b5060208310610133831016604e8410600b841016171561540a575081810a610df2565b6154165f19848461534e565b805f190482111561542957615429615273565b029392505050565b5f610f9f60ff841683615391565b60ff8181168382160190811115610df257610df2615273565b64ffffffffff8181168382160190811115610df257610df2615273565b8082025f8212600160ff1b8414161561549057615490615273565b8181058314821517610df257610df2615273565b5f826154b2576154b2615327565b600160ff1b82145f19841416156154cb576154cb615273565b500590565b601f82111561122857805f5260205f20601f840160051c810160208510156154f55750805b601f840160051c820191505b8181101561164e575f8155600101615501565b815167ffffffffffffffff81111561552e5761552e614f4c565b6155428161553c845461523b565b846154d0565b6020601f821160018114615574575f831561555d5750848201515b5f19600385901b1c1916600184901b17845561164e565b5f84815260208120601f198516915b828110156155a35787850151825560209485019460019092019101615583565b50848210156155c057868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b634e487b7160e01b5f52602160045260245ffd5b5f60ff8316806155f5576155f5615327565b8060ff84160691505092915050565b5f82518060208501845e5f92019182525091905056fea2646970667358221220ebe59b3a388f856339905aee9ca3cab51c211efa68189b606c3ada245282784f64736f6c634300081a0033", + "devdoc": { + "errors": { + "AccessControlBadConfirmation()": [ + { + "details": "The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}." + } + ], + "AccessControlUnauthorizedAccount(address,bytes32)": [ + { + "details": "The `account` is missing a role." + } + ], + "AddressEmptyCode(address)": [ + { + "details": "There's no code at `target` (it is not a contract)." + } + ], + "AddressInsufficientBalance(address)": [ + { + "details": "The ETH balance of the account is not enough to perform the operation." + } + ], + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "ERC20InsufficientAllowance(address,uint256,uint256)": [ + { + "details": "Indicates a failure with the `spender`’s `allowance`. Used in transfers.", + "params": { + "allowance": "Amount of tokens a `spender` is allowed to operate with.", + "needed": "Minimum amount required to perform a transfer.", + "spender": "Address that may be allowed to operate on tokens without being their owner." + } + } + ], + "ERC20InsufficientBalance(address,uint256,uint256)": [ + { + "details": "Indicates an error related to the current `balance` of a `sender`. Used in transfers.", + "params": { + "balance": "Current balance for the interacting account.", + "needed": "Minimum amount required to perform a transfer.", + "sender": "Address whose tokens are being transferred." + } + } + ], + "ERC20InvalidApprover(address)": [ + { + "details": "Indicates a failure with the `approver` of a token to be approved. Used in approvals.", + "params": { + "approver": "Address initiating an approval operation." + } + } + ], + "ERC20InvalidReceiver(address)": [ + { + "details": "Indicates a failure with the token `receiver`. Used in transfers.", + "params": { + "receiver": "Address to which tokens are being transferred." + } + } + ], + "ERC20InvalidSender(address)": [ + { + "details": "Indicates a failure with the token `sender`. Used in transfers.", + "params": { + "sender": "Address whose tokens are being transferred." + } + } + ], + "ERC20InvalidSpender(address)": [ + { + "details": "Indicates a failure with the `spender` to be approved. Used in approvals.", + "params": { + "spender": "Address that may be allowed to operate on tokens without being their owner." + } + } + ], + "ERC2612ExpiredSignature(uint256)": [ + { + "details": "Permit deadline has expired." + } + ], + "ERC2612InvalidSigner(address,address)": [ + { + "details": "Mismatched signature." + } + ], + "ERC4626ExceededMaxDeposit(address,uint256,uint256)": [ + { + "details": "Attempted to deposit more assets than the max amount for `receiver`." + } + ], + "ERC4626ExceededMaxMint(address,uint256,uint256)": [ + { + "details": "Attempted to mint more shares than the max amount for `receiver`." + } + ], + "ERC4626ExceededMaxRedeem(address,uint256,uint256)": [ + { + "details": "Attempted to redeem more shares than the max amount for `receiver`." + } + ], + "ERC4626ExceededMaxWithdraw(address,uint256,uint256)": [ + { + "details": "Attempted to withdraw more assets than the max amount for `receiver`." + } + ], + "EnforcedPause()": [ + { + "details": "The operation failed because the contract is paused." + } + ], + "ExpectedPause()": [ + { + "details": "The operation failed because the contract is not paused." + } + ], + "FailedInnerCall()": [ + { + "details": "A call to an address target failed. The target may have reverted." + } + ], + "InvalidAccountNonce(address,uint256)": [ + { + "details": "The nonce used for an `account` is not the expected current nonce." + } + ], + "InvalidInitialization()": [ + { + "details": "The contract is already initialized." + } + ], + "MathOverflowedMulDiv()": [ + { + "details": "Muldiv operation overflow." + } + ], + "NotInitializing()": [ + { + "details": "The contract is not initializing." + } + ], + "SafeERC20FailedOperation(address)": [ + { + "details": "An operation with an ERC20 token failed." + } + ] + }, + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." + }, + "EIP712DomainChanged()": { + "details": "MAY be emitted to signal that the domain could have changed." + }, + "Initialized(uint64)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "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." + }, + "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`)" + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + } + }, + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}." + }, + "allRewardsTokens()": { + "returns": { + "_0": "The list of reward tokens." + } + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "asset()": { + "details": "See {IERC4626-asset}. " + }, + "avgIndex(address,address)": { + "params": { + "account": "The account.", + "reward": "The reward token." + }, + "returns": { + "_0": "The average index." + } + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "claim(address)": { + "params": { + "reward": "The reward token." + } + }, + "claimable(address,address,uint256)": { + "params": { + "account": "The account.", + "reward": "The reward token.", + "shares": "The amount of shares of the account involved." + }, + "returns": { + "_0": "The claimable rewards." + } + }, + "constructor": { + "custom:oz-upgrades-unsafe-allow": "constructor" + }, + "convertToAssets(uint256)": { + "details": "See {IERC4626-convertToAssets}. " + }, + "convertToShares(uint256)": { + "details": "See {IERC4626-convertToShares}. " + }, + "decimals()": { + "returns": { + "_0": "The number of decimals." + } + }, + "deposit(uint256,address)": { + "details": "See {IERC4626-deposit}. " + }, + "earned(address,address,uint256)": { + "params": { + "account": "The account.", + "reward": "The reward token.", + "shares": "The amount of shares." + }, + "returns": { + "_0": "The earned rewards." + } + }, + "eip712Domain()": { + "details": "See {IERC-5267}." + }, + "enableReward(address)": { + "params": { + "reward": "The reward token." + } + }, + "finishDistribution(address)": { + "params": { + "reward": "The reward token." + } + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "globalIndex(address)": { + "params": { + "reward": "The reward token." + }, + "returns": { + "_0": "The global index." + } + }, + "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." + }, + "harvest()": { + "details": "This function withdraws the maximum allowable assets from the provider's market, calculates the portion to be distributed as rewards based on `providerRatio`, deposits any remaining assets back into savings, and notifies the contract of the new reward amount." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize((address,uint256,uint256,uint256,uint256,uint256,address,address,address,uint40,uint256))": { + "details": "can only be called once.", + "params": { + "p": "The parameters for initialization." + } + }, + "lastTimeRewardApplicable(uint256)": { + "params": { + "finishAt": "The time when the reward period finishes." + }, + "returns": { + "_0": "The last applicable time." + } + }, + "maxDeposit(address)": { + "details": "See {IERC4626-maxDeposit}. " + }, + "maxMint(address)": { + "details": "See {IERC4626-maxMint}. " + }, + "maxRedeem(address)": { + "details": "See {IERC4626-maxRedeem}. " + }, + "maxWithdraw(address)": { + "details": "See {IERC4626-maxWithdraw}. " + }, + "mint(uint256,address)": { + "details": "See {IERC4626-mint}. As opposed to {deposit}, minting is allowed even if the vault is in a state where the price of a share is zero. In this case, the shares will be minted without requiring any assets to be deposited." + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times." + }, + "notifyRewardAmount(address,uint256)": { + "params": { + "amount": "The amount of reward tokens.", + "reward": "The reward token." + } + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "Sets `value` as the allowance of `spender` over ``owner``'s tokens, given ``owner``'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]. CAUTION: See Security Considerations above." + }, + "permitAndDeposit(uint256,address,(uint256,uint256,uint8,bytes32,bytes32))": { + "params": { + "assets": "The amount of assets to deposit.", + "p": "The permit parameters.", + "receiver": "The address receiving the deposited assets." + }, + "returns": { + "_0": "The number of shares received." + } + }, + "previewDeposit(uint256)": { + "details": "See {IERC4626-previewDeposit}. " + }, + "previewMint(uint256)": { + "details": "See {IERC4626-previewMint}. " + }, + "previewRedeem(uint256)": { + "details": "See {IERC4626-previewRedeem}. " + }, + "previewWithdraw(uint256)": { + "details": "See {IERC4626-previewWithdraw}. " + }, + "rawClaimable(address,address,uint256)": { + "params": { + "account": "The account.", + "reward": "The reward token.", + "shares": "The amount of shares of the account involved." + }, + "returns": { + "_0": "The raw claimable rewards." + } + }, + "redeem(uint256,address,address)": { + "details": "See {IERC4626-redeem}. " + }, + "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 `callerConfirmation`. 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." + }, + "setMarket(address)": { + "params": { + "market_": "The new market." + } + }, + "setMinTime(uint256)": { + "params": { + "minTime_": "The new minimum time." + } + }, + "setPenaltyGrowth(uint256)": { + "params": { + "penaltyGrowth_": "The new penalty growth factor." + } + }, + "setPenaltyThreshold(uint256)": { + "params": { + "penaltyThreshold_": "The new penalty threshold." + } + }, + "setProvider(address)": { + "params": { + "provider_": "The new provider address." + } + }, + "setProviderRatio(uint256)": { + "params": { + "providerRatio_": "The new provider ratio." + } + }, + "setRewardsDuration(address,uint40)": { + "details": "Can only change the duration if the reward is finished.", + "params": { + "duration": "The new duration.", + "reward": "The reward token." + } + }, + "setSavings(address)": { + "params": { + "savings_": "The new savings address." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalAssets()": { + "returns": { + "_0": "The total assets." + } + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`." + }, + "withdraw(uint256,address,address)": { + "details": "See {IERC4626-withdraw}. " + }, + "withdrawRewards(address,uint256)": { + "params": { + "amount": "The amount of reward tokens to withdraw.", + "reward": "The reward token." + } + } + }, + "title": "StakedEXA Contract", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "CLOCK_MODE()": { + "notice": "Returns the current clock mode of stEXA, as per ERC-6372." + }, + "MAX_REWARDS_TOKENS()": { + "notice": "Maximum amount of rewards token." + }, + "allRewardsTokens()": { + "notice": "Returns all reward tokens." + }, + "avgIndex(address,address)": { + "notice": "Returns the average index for a reward token and account." + }, + "avgIndexes(address,address)": { + "notice": "Accounts average indexes per reward token." + }, + "avgStart(address)": { + "notice": "Average starting time with the tokens staked per account." + }, + "claim(address)": { + "notice": "Claims rewards for a specific reward token." + }, + "claimAll()": { + "notice": "Claims rewards for all reward tokens." + }, + "claimable(address,address,uint256)": { + "notice": "Calculates the claimable rewards for an account." + }, + "claimed(address,address)": { + "notice": "Accounts claimed rewards per reward token." + }, + "clock()": { + "notice": "Returns the current timepoint of stEXA, as per ERC-6372." + }, + "decimals()": { + "notice": "Returns the number of decimals used by the token." + }, + "earned(address,address,uint256)": { + "notice": "Calculates the earned rewards for an account, without considering penalties." + }, + "enableReward(address)": { + "notice": "Enables a new reward token." + }, + "excessFactor()": { + "notice": "Discount factor for excess exposure. Not possible to change after initilization." + }, + "finishDistribution(address)": { + "notice": "Finishes the distribution of a reward token." + }, + "globalIndex(address)": { + "notice": "Returns the global index for a reward token." + }, + "harvest()": { + "notice": "Harvests provider's market assets as rewards to be distributed among stakers." + }, + "initialize((address,uint256,uint256,uint256,uint256,uint256,address,address,address,uint40,uint256))": { + "notice": "Initializes the contract." + }, + "lastTimeRewardApplicable(uint256)": { + "notice": "Returns the last time rewards are applicable." + }, + "market()": { + "notice": "market from which to harvest." + }, + "minTime()": { + "notice": "Minimum time to stake and get rewards." + }, + "notifyRewardAmount(address,uint256)": { + "notice": "Notifies the contract about a reward amount." + }, + "pause()": { + "notice": "Sets the pause state to true in case of emergency, triggered by an authorized account." + }, + "penaltyGrowth()": { + "notice": "Penalty growth factor." + }, + "penaltyThreshold()": { + "notice": "Threshold penalty factor for withdrawing before the reference time." + }, + "permitAndDeposit(uint256,address,(uint256,uint256,uint8,bytes32,bytes32))": { + "notice": "Permits a spender and deposits assets in a single transaction." + }, + "provider()": { + "notice": "provider of rewards when harvesting." + }, + "providerRatio()": { + "notice": "ratio of withdrawn assets to provide when harvesting. The rest goes to savings" + }, + "rawClaimable(address,address,uint256)": { + "notice": "Calculates the raw claimable rewards for an account, without considering already claimed rewards." + }, + "refTime()": { + "notice": "Reference period to stake and get full rewards. Not possible to change after initilization." + }, + "rewards(address)": { + "notice": "Rewards data per token." + }, + "rewardsTokens(uint256)": { + "notice": "Rewards tokens." + }, + "saved(address,address)": { + "notice": "Accounts saved rewards per reward token." + }, + "savings()": { + "notice": "savings address to send the rewards." + }, + "setMarket(address)": { + "notice": "Sets the market." + }, + "setMinTime(uint256)": { + "notice": "Sets the minimum time to stake for rewards." + }, + "setPenaltyGrowth(uint256)": { + "notice": "Sets the penalty growth factor." + }, + "setPenaltyThreshold(uint256)": { + "notice": "Sets the penalty threshold." + }, + "setProvider(address)": { + "notice": "Sets the provider address." + }, + "setProviderRatio(uint256)": { + "notice": "Sets the provider ratio." + }, + "setRewardsDuration(address,uint40)": { + "notice": "Sets the rewards duration for a reward token." + }, + "setSavings(address)": { + "notice": "Sets the savings address." + }, + "totalAssets()": { + "notice": "Returns the total assets of the contract." + }, + "unpause()": { + "notice": "Sets the pause state to false when threat is gone, triggered by an authorized account." + }, + "withdrawRewards(address,uint256)": { + "notice": "Withdraws `amount` of `reward` from contract to `savings`." + } + }, + "notice": "This contract allows users to stake EXA tokens and earn rewards. The rewards are subject to a penalty if the staking duration is not optimal. The optimal staking duration is defined by `refTime`. Staking for a duration less than `minTime` results in no rewards, the closer the staking duration is to `refTime`, the lower the penalty.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 31625, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "rewardsTokens", + "offset": 0, + "slot": "0", + "type": "t_array(t_contract(IERC20)16592)dyn_storage" + }, + { + "astId": 31632, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "minTime", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 31635, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "refTime", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 31638, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "excessFactor", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 31641, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "penaltyGrowth", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 31644, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "penaltyThreshold", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 31648, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "market", + "offset": 0, + "slot": "6", + "type": "t_contract(Market)27481" + }, + { + "astId": 31651, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "provider", + "offset": 0, + "slot": "7", + "type": "t_address" + }, + { + "astId": 31654, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "savings", + "offset": 0, + "slot": "8", + "type": "t_address" + }, + { + "astId": 31657, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "providerRatio", + "offset": 0, + "slot": "9", + "type": "t_uint256" + }, + { + "astId": 31664, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "rewards", + "offset": 0, + "slot": "10", + "type": "t_mapping(t_contract(IERC20)16592,t_struct(RewardData)33876_storage)" + }, + { + "astId": 31669, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "avgStart", + "offset": 0, + "slot": "11", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 31677, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "avgIndexes", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_address,t_mapping(t_contract(IERC20)16592,t_uint256))" + }, + { + "astId": 31685, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "claimed", + "offset": 0, + "slot": "13", + "type": "t_mapping(t_address,t_mapping(t_contract(IERC20)16592,t_uint256))" + }, + { + "astId": 31693, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "saved", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_address,t_mapping(t_contract(IERC20)16592,t_uint256))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_contract(IERC20)16592)dyn_storage": { + "base": "t_contract(IERC20)16592", + "encoding": "dynamic_array", + "label": "contract IERC20[]", + "numberOfBytes": "32" + }, + "t_contract(IERC20)16592": { + "encoding": "inplace", + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_contract(Market)27481": { + "encoding": "inplace", + "label": "contract Market", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_contract(IERC20)16592,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(contract IERC20 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_contract(IERC20)16592,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_contract(IERC20)16592,t_struct(RewardData)33876_storage)": { + "encoding": "mapping", + "key": "t_contract(IERC20)16592", + "label": "mapping(contract IERC20 => struct RewardData)", + "numberOfBytes": "32", + "value": "t_struct(RewardData)33876_storage" + }, + "t_mapping(t_contract(IERC20)16592,t_uint256)": { + "encoding": "mapping", + "key": "t_contract(IERC20)16592", + "label": "mapping(contract IERC20 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(RewardData)33876_storage": { + "encoding": "inplace", + "label": "struct RewardData", + "members": [ + { + "astId": 33866, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "duration", + "offset": 0, + "slot": "0", + "type": "t_uint40" + }, + { + "astId": 33868, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "finishAt", + "offset": 5, + "slot": "0", + "type": "t_uint40" + }, + { + "astId": 33870, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "updatedAt", + "offset": 10, + "slot": "0", + "type": "t_uint40" + }, + { + "astId": 33872, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "index", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 33875, + "contract": "contracts/StakedEXA.sol:StakedEXA", + "label": "rate", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint40": { + "encoding": "inplace", + "label": "uint40", + "numberOfBytes": "5" + } + } + } +} \ No newline at end of file diff --git a/deployments/optimism/stEXA_Proxy.json b/deployments/optimism/stEXA_Proxy.json new file mode 100644 index 00000000..8000896b --- /dev/null +++ b/deployments/optimism/stEXA_Proxy.json @@ -0,0 +1,310 @@ +{ + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "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" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "receipt": { + "to": null, + "from": "0xe61Bdef3FFF4C3CF7A07996DCB8802b5C85B665a", + "contractAddress": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "transactionIndex": 11, + "gasUsed": "964373", + "logsBloom": "0x008000040040000000000000000000004000000000000000000000000000000020000000010000000000000000000000000000808000000004000040000000000000000009000000000000000000020022000040000000000000008000000000000000000a0000000000000000000800000050a00000000008000000000000000000000800000000000800040000080000000000000080800000000000800040000000000800000000020000000000000400004000000000001000000001000000000020400000040000020000800002040000001404000100000000080020200000000000401000200000000000000020000080000000800000000000008000", + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a", + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "logs": [ + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000033c69e5c0a7a2bad42d178ec11b881acdbe682a1" + ], + "data": "0x", + "logIndex": 76, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x", + "logIndex": 77, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0xcb90293a116713eb442bb98d30c95b14fa981b1bf6f9ee8e1bf3c856e8ded54e", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 78, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0xde98b8145241ddecb3a88a40e29bc18e7f3a091cf2d92e9891fffe71bf303890", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x0000000000000000000000000000000000000000000000001bc16d674ec80000", + "logIndex": 79, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x33b1804f184927027d7ac0f874248c83a39e0ec20e93e8574499c14a5083886f", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x000000000000000000000000000000000000000000000000016345785d8a0000", + "logIndex": 80, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x9749fb908457c4fa0afa13661b7b5b02c584a8ae47610ccc7a65d7d500951db4", + "0x0000000000000000000000006926b434cce9b5b7966ae1bfeef6d0a7dcf3a8bb", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x", + "logIndex": 81, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x9befd548a45bf1eebac6219d0f8cdce0f6a86fc087bc042116131d777d26c008", + "0x0000000000000000000000006926b434cce9b5b7966ae1bfeef6d0a7dcf3a8bb", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x", + "logIndex": 82, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x307065155c111638dfa8c188a29ab8abc925f17d3616388c7683d0d45a29a453", + "0x0000000000000000000000006926b434cce9b5b7966ae1bfeef6d0a7dcf3a8bb", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000093a80", + "logIndex": 83, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x95d5fab7f1c5262ecb5edffc2c96c30c43871f674976c8ab4fe5ca8a440c3e4b", + "0x00000000000000000000000023fd464e0b0ee21cedeb929b19cabf9bd5215019", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x", + "logIndex": 84, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x8fa281d02a496c3848901321abdd8d00f14ee5706a12b8c6ff6e3a9a097afc08", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x000000000000000000000000000000000000000000000000016345785d8a0000", + "logIndex": 85, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0xf0e8bebe3659a97126f43e3d176f7555480c335f92ca957254992ce32b551aff", + "0x0000000000000000000000008a1c05c4462b3554814a637e940b3342ffbe02f2", + "0x000000000000000000000000e61bdef3fff4c3cf7a07996dcb8802b5c85b665a" + ], + "data": "0x", + "logIndex": 86, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 87, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + }, + { + "transactionIndex": 11, + "blockNumber": 124901366, + "transactionHash": "0xa9d365397c2a40ae8602cde92ae8b398e368fb35bd85ae5e2cc6dcde84b04672", + "address": "0xCEed2bFE740F02dB6094eBE89FF93b1031be752b", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fba759bcd1a99a7724c5068feddb4f5b844b941a", + "logIndex": 88, + "blockHash": "0x50da0120edf8f15fcf0fa89d9e1b2ac4be12fd634e8e56c83ad22b765a9f7a2a" + } + ], + "blockNumber": 124901366, + "cumulativeGasUsed": "4250137", + "status": 1, + "byzantium": true + }, + "args": [ + "0x33c69e5c0a7A2BAD42D178eC11b881aCDbE682a1", + "0xfBa759BCd1a99a7724c5068FEddb4F5b844b941A", + "0x6e5c4c780000000000000000000000001e925de1c68ef83bd98ee3e130ef14a50309c01b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e133800000000000000000000000000000000000000000000000000c7d713b49da00000000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000006926b434cce9b5b7966ae1bfeef6d0a7dcf3a8bb00000000000000000000000023fd464e0b0ee21cedeb929b19cabf9bd52150190000000000000000000000008a1c05c4462b3554814a637e940b3342ffbe02f20000000000000000000000000000000000000000000000000000000000093a80000000000000000000000000000000000000000000000000016345785d8a0000" + ], + "numDeployments": 1, + "solcInputHash": "6a557ee70d62b80968609ef7922ee609", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"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\"},{\"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. NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to fully implement transparency without decoding reverts caused by selector clashes between the proxy and the implementation. WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is changed.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"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}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"debug\":{\"revertStrings\":\"strip\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1111},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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-v4/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": "0x6080604052604051610b2a380380610b2a833981016040819052610022916102b7565b828161002f82825f610043565b5061003b90508261006e565b50505061039e565b61004c836100db565b5f825111806100585750805b1561006957610067838361011a565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6100ad5f80516020610ae3833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a16100d881610146565b50565b6100e481610189565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b606061013f8383604051806060016040528060278152602001610b03602791396101c3565b9392505050565b6001600160a01b038116610158575f80fd5b805f80516020610ae38339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b61019c575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610168565b60605f80856001600160a01b0316856040516101df9190610388565b5f60405180830381855af49150503d805f8114610217576040519150601f19603f3d011682016040523d82523d5f602084013e61021c565b606091505b50909250905061022e86838387610238565b9695505050505050565b606083156102625782515f0361025b576001600160a01b0385163b61025b575f80fd5b508161026c565b61026c8383610274565b949350505050565b8151156102845781518083602001fd5b5f80fd5b80516001600160a01b038116811461029e575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f805f606084860312156102c9575f80fd5b6102d284610288565b92506102e060208501610288565b60408501519092506001600160401b038111156102fb575f80fd5b8401601f8101861361030b575f80fd5b80516001600160401b03811115610324576103246102a3565b604051601f8201601f19908116603f011681016001600160401b0381118282101715610352576103526102a3565b604052818152828201602001881015610369575f80fd5b8160208401602083015e5f602083830101528093505050509250925092565b5f82518060208501845e5f920191825250919050565b610738806103ab5f395ff3fe60806040523661001357610011610017565b005b6100115b61001f61016c565b6001600160a01b031633036101625760606001600160e01b03195f35167fc9a6301a0000000000000000000000000000000000000000000000000000000081016100725761006b61019e565b915061015a565b7fb0e10d7a000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100ab5761006b6101f1565b7f70d7c690000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100e45761006b610235565b7f07ae5bc0000000000000000000000000000000000000000000000000000000006001600160e01b031982160161011d5761006b610265565b7fa39f25e5000000000000000000000000000000000000000000000000000000006001600160e01b03198216016101565761006b6102a4565b5f80fd5b815160208301f35b61016a6102b7565b565b5f7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a86102c7565b5f6101b63660048184610579565b8101906101c391906105bb565b90506101de8160405180602001604052805f8152505f6102d1565b505060408051602081019091525f815290565b60605f806102023660048184610579565b81019061020f9190610601565b9150915061021f828260016102d1565b60405180602001604052805f8152509250505090565b606061023f6102c7565b5f61024d3660048184610579565b81019061025a91906105bb565b90506101de816102fc565b606061026f6102c7565b5f61027861016c565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102ae6102c7565b5f610278610353565b61016a6102c2610353565b610361565b341561016a575f80fd5b6102da8361037f565b5f825111806102e65750805b156102f7576102f583836103be565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032561016c565b604080516001600160a01b03928316815291841660208301520160405180910390a1610350816103ea565b50565b5f61035c610458565b905090565b365f80375f80365f845af43d5f803e80801561037b573d5ff35b3d5ffd5b6103888161047f565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b60606103e383836040518060600160405280602781526020016106dc602791396104b9565b9392505050565b6001600160a01b0381166103fc575f80fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905550565b5f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018f565b6001600160a01b0381163b610492575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61041f565b60605f80856001600160a01b0316856040516104d591906106c5565b5f60405180830381855af49150503d805f811461050d576040519150601f19603f3d011682016040523d82523d5f602084013e610512565b606091505b50915091506105238683838761052d565b9695505050505050565b606083156105575782515f03610550576001600160a01b0385163b610550575f80fd5b5081610561565b6105618383610569565b949350505050565b8151156101565781518083602001fd5b5f8085851115610587575f80fd5b83861115610593575f80fd5b5050820193919092039150565b80356001600160a01b03811681146105b6575f80fd5b919050565b5f602082840312156105cb575f80fd5b6103e3826105a0565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f8060408385031215610612575f80fd5b61061b836105a0565b9150602083013567ffffffffffffffff811115610636575f80fd5b8301601f81018513610646575f80fd5b803567ffffffffffffffff811115610660576106606105d4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561068f5761068f6105d4565b6040528181528282016020018710156106a6575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82518060208501845e5f92019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d8c251ecd4d394863339f9bcd6f97d3ee0a2ad0067aa7a46ebd15dc85a73cc5464736f6c634300081a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61001f61016c565b6001600160a01b031633036101625760606001600160e01b03195f35167fc9a6301a0000000000000000000000000000000000000000000000000000000081016100725761006b61019e565b915061015a565b7fb0e10d7a000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100ab5761006b6101f1565b7f70d7c690000000000000000000000000000000000000000000000000000000006001600160e01b03198216016100e45761006b610235565b7f07ae5bc0000000000000000000000000000000000000000000000000000000006001600160e01b031982160161011d5761006b610265565b7fa39f25e5000000000000000000000000000000000000000000000000000000006001600160e01b03198216016101565761006b6102a4565b5f80fd5b815160208301f35b61016a6102b7565b565b5f7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a86102c7565b5f6101b63660048184610579565b8101906101c391906105bb565b90506101de8160405180602001604052805f8152505f6102d1565b505060408051602081019091525f815290565b60605f806102023660048184610579565b81019061020f9190610601565b9150915061021f828260016102d1565b60405180602001604052805f8152509250505090565b606061023f6102c7565b5f61024d3660048184610579565b81019061025a91906105bb565b90506101de816102fc565b606061026f6102c7565b5f61027861016c565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102ae6102c7565b5f610278610353565b61016a6102c2610353565b610361565b341561016a575f80fd5b6102da8361037f565b5f825111806102e65750805b156102f7576102f583836103be565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032561016c565b604080516001600160a01b03928316815291841660208301520160405180910390a1610350816103ea565b50565b5f61035c610458565b905090565b365f80375f80365f845af43d5f803e80801561037b573d5ff35b3d5ffd5b6103888161047f565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b60606103e383836040518060600160405280602781526020016106dc602791396104b9565b9392505050565b6001600160a01b0381166103fc575f80fd5b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905550565b5f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018f565b6001600160a01b0381163b610492575f80fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61041f565b60605f80856001600160a01b0316856040516104d591906106c5565b5f60405180830381855af49150503d805f811461050d576040519150601f19603f3d011682016040523d82523d5f602084013e610512565b606091505b50915091506105238683838761052d565b9695505050505050565b606083156105575782515f03610550576001600160a01b0385163b610550575f80fd5b5081610561565b6105618383610569565b949350505050565b8151156101565781518083602001fd5b5f8085851115610587575f80fd5b83861115610593575f80fd5b5050820193919092039150565b80356001600160a01b03811681146105b6575f80fd5b919050565b5f602082840312156105cb575f80fd5b6103e3826105a0565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f8060408385031215610612575f80fd5b61061b836105a0565b9150602083013567ffffffffffffffff811115610636575f80fd5b8301601f81018513610646575f80fd5b803567ffffffffffffffff811115610660576106606105d4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561068f5761068f6105d4565b6040528181528282016020018710156106a6575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82518060208501845e5f92019182525091905056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d8c251ecd4d394863339f9bcd6f97d3ee0a2ad0067aa7a46ebd15dc85a73cc5464736f6c634300081a0033", + "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. NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to fully implement transparency without decoding reverts caused by selector clashes between the proxy and the implementation. WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.", + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is changed." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + }, + "kind": "dev", + "methods": { + "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}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file